Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhelpful error message if unable to communicate w/Firebase #429

Open
deckyfx opened this issue Sep 28, 2016 · 5 comments
Open

Unhelpful error message if unable to communicate w/Firebase #429

deckyfx opened this issue Sep 28, 2016 · 5 comments

Comments

@deckyfx
Copy link

deckyfx commented Sep 28, 2016

Version info

e.g.
DEBUG: -------------------------------
DEBUG: Ember      : 2.8.1
DEBUG: Ember Data : 2.8.1
DEBUG: Firebase   : 3.4.1
DEBUG: EmberFire  : 0.0.0 --> (master version)
DEBUG: jQuery     : 3.1.1
DEBUG: -------------------------------

pakcage.json

"emberfire": "git://github.com/firebase/emberfire.git#4e4146b176fe974d48e03af6052712faf5bc831d",
"torii": "0.8.0"

Test case

i follow instruction in
https://www.firebase.com/docs/web/libraries/ember/guide.html#section-authentication

Steps to reproduce

just click the signin button

Expected behavior

Popup auth provider window, then follow instruction inside it to proceed

Actual behavior

The popup window is opened then immediately closed, error log traces only said "undefined"

auth using password and email is work

@jamesdaniels
Copy link
Contributor

Those are our old docs, please follow the current instructions here https://github.com/firebase/emberfire/blob/master/docs/guide/authentication.md + let us know if you have troubles with that.

@deckyfx
Copy link
Author

deckyfx commented Sep 29, 2016

Thank you for your reply,

i compare
https://github.com/firebase/emberfire/blob/master/docs/guide/authentication.md
and
https://www.firebase.com/docs/web/libraries/ember/guide.html#section-authentication

and i don;t see any different except for this one line

firebase: Ember.inject.service()

i have tried both guide, still can;t auth using twitter and facebook

btw, the project is in {removed}, in case you may want to try it

also, just fyi, i already enabled all auth service in my firebase server, if you ever thought i might not enable them

@tstirrat
Copy link
Contributor

tstirrat commented Sep 29, 2016

I notice that you have created a torii adapter in app/adapters/application.js, yet you need to create it in app/torii-adapters/application.js note the torii-adapters path.

Revert your app/adapters/application.js to extend the FirebaseAdapter and put this in your torii-adapters folder:

import ToriiFirebaseAdapter from 'emberfire/torii-adapters/firebase';

export default ToriiFirebaseAdapter.extend({});

The difference in adapters is that app/adapters/application.js is the one that handles data retrieval, the torii-adapters one handles auth through the Torii auth system.

Hope that helps!

@deckyfx
Copy link
Author

deckyfx commented Oct 3, 2016

After my internet down due to Sudden Power outage, i finally found the cause,

so while in no internet, and i try to sign in, i the console receive error log because request to
https://www.googleapis.com/identitytoolkit/v3/relyingparty/getProjectConfig?key={firebase_apikey}&cb=1475467857966
is failed

then when internet is up, i tried to access the url and it return

{
 "projectId": "{project_id}",
 "authorizedDomains": [
  "localhost",
  "{some.domain.com}",
  "{some.domain2.com}"
 ]
}

it authorize only localhost, while i test my project using local IP address, like 192.168.xxx.xxx:3000

now its work, thanks for your support, and if you could, can you give more identifiable message if error is occured during domain auth test

@tstirrat tstirrat changed the title Cannot auth using torii providers Undefined error when authentication fails Oct 3, 2016
@tstirrat
Copy link
Contributor

tstirrat commented Oct 3, 2016

Reopening so we can track the useless error message. Thanks for the report!

@tstirrat tstirrat reopened this Oct 3, 2016
@jamesdaniels jamesdaniels changed the title Undefined error when authentication fails Unhelpful error message if unable to communicate w/Firebase Oct 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants