googlearchive / firebase-angular-starter-pack

A Firebase + AngularJS Starter Pack
MIT License
347 stars 234 forks source link

angularfire.min.js causing error Unknown provider: $firebaseSimpleLoginProvider <- $firebaseSimpleLogin #6

Open quanghoc opened 10 years ago

quanghoc commented 10 years ago

I think minify this file causing problem with firebase-simple-login.js:

https://github.com/firebase/firebase-angular-starter-pack/blob/master/Ionic-seed/www/js/firebase/angularfire.min.js

Error: [$injector:unpr] Unknown provider: $firebaseSimpleLoginProvider <- $firebaseSimpleLogin
http://errors.angularjs.org/1.2.7/$injector/unpr?p0=NaNirebaseSimpleLoginProvider%20%3C-%20%24firebaseSimpleLogin
    at http://0.0.0.0:4001/js/angular/angular.js:78:12
    at http://0.0.0.0:4001/js/angular/angular.js:3540:19
    at Object.getService [as get] (http://0.0.0.0:4001/js/angular/angular.js:3667:39)
    at http://0.0.0.0:4001/js/angular/angular.js:3545:45
    at getService (http://0.0.0.0:4001/js/angular/angular.js:3667:39)
    at invoke (http://0.0.0.0:4001/js/angular/angular.js:3694:13)
    at Object.instantiate (http://0.0.0.0:4001/js/angular/angular.js:3715:23)
    at http://0.0.0.0:4001/js/angular/angular.js:6766:28
    at update (http://0.0.0.0:4001/js/ionic-angular.js:2786:30)
    at directive.link (http://0.0.0.0:4001/js/ionic-angular.js:2749:7) 

If I use this version, it is fine https://github.com/firebase/firebase-angular-starter-pack/blob/master/angularFire-seed/test/lib/firebase/angularfire.js

sean9999 commented 9 years ago

i am encountering the same problem. For me it's a dependency problem between firebase, angularfire, and firebase-simple-login. i am currently trying to find the right combination using bower. i used yeoman to scaffold out the project, and bower to grab the packages.

quanghoc commented 9 years ago

I believe this is due to "use strict" somewhere in the code or in previous js libs included before this file

secretgspot commented 9 years ago

angular.js:11496 Error: [$injector:unpr] Unknown provider: $firebaseSimpleLoginProvider <- $firebaseSimpleLogin <- Auth http://errors.angularjs.org/1.3.4/$injector/unpr?p0=NaNirebaseSimpleLoginProvider%20%3C-%20%24firebaseSimpleLogin%20%3C-%20Auth at http://localhost:9000/bower_components/angular/angular.js:63:12 at http://localhost:9000/bower_components/angular/angular.js:3950:19 at Object.getService as get at http://localhost:9000/bower_components/angular/angular.js:3955:45 at getService (http://localhost:9000/bower_components/angular/angular.js:4097:39) at Object.invoke (http://localhost:9000/bower_components/angular/angular.js:4129:13) at Object.enforcedReturnValue as $get at Object.invoke (http://localhost:9000/bower_components/angular/angular.js:4138:17) at http://localhost:9000/bower_components/angular/angular.js:3956:37 at getService (http://localhost:9000/bower_components/angular/angular.js:4097:39)

designnotdrum commented 9 years ago

Guys, looks like this is due to $firebaseSimpleLogin being deprecated in angularfire 0.9.0 in favor of $firebaseAuth, which supports some of the newer Firebase 1.1.0 authentication methods.

I was running into the exact same issues, and changing to $firebaseAuth fixed everything for me.

See the description here in the release notes.

dgaeta commented 9 years ago

@designnotdrum

which methods did you use in place of (login, logout, etc)?

designnotdrum commented 9 years ago

@dhawking I used this as my guide: https://www.firebase.com/docs/web/guide/user-auth.html - hope that helps.

bthj commented 9 years ago

In case it helps anyone: After pulling in the latest changes from the angularfire-seed project (up to commit 3d76b5e2ce1a345a2d751f52a1864e29bed72bae) I experienced the same error, even though everything seemed to be migrated to using $firebaseAuth -> It was not until cleared the browser cache / force-reloaded that the error went away :o)