ionic-team / legacy-ionic-cloud

JavaScript Client for legacy Ionic Cloud services. See Ionic Pro for our new take on the ionic development lifecycle
Apache License 2.0
65 stars 26 forks source link

Request password reset not working in v0.14.0 #81

Closed bgizdov closed 7 years ago

bgizdov commented 8 years ago

Hi,

After upgrade to v0.14.0 request password reset stopped working.

$ionicAuth.requestPasswordReset(email);

Chrome error error

VM9201:27 TypeError: Cannot read property 'set' of undefined
    at e.requestPasswordReset (ionic.cloud.min.js:6)
    at b.$scope.requestPasswordReset (controllers.js:260)
    at fn (eval at compile (ionic.bundle.min.js:246), <anonymous>:4:321)
    at ionic.bundle.min.js:448
    at b.$eval (ionic.bundle.min.js:168)
    at b.$apply (ionic.bundle.min.js:169)
    at HTMLButtonElement.<anonymous> (ionic.bundle.min.js:448)
    at HTMLButtonElement.c (ionic.bundle.min.js:69)
    at n (ionic.bundle.min.js:22)
    at t (ionic.bundle.min.js:22)

iPhone error log

Error: undefined is not an object (evaluating 'this.storage.set')
requestPasswordReset@file:///var/containers/Bundle/Application/3A827423-25EE-4BDD-BD6F-947BE548BF19/MyApp.app/www/lib/ionic.cloud.min.js:6:4051
requestPasswordReset@file:///var/containers/Bundle/Application/3A827423-25EE-4BDD-BD6F-947BE548BF19/MyApp.app/www/js/user/controllers.js:260:44
fn
file:///var/containers/Bundle/Application/3A827423-25EE-4BDD-BD6F-947BE548BF19/MyApp.app/www/lib/ionic/js/ionic.bundle.min.js:448:9475
$eval@file:///var/containers/Bundle/Application/3A827423-25EE-4BDD-BD6F-947BE548BF19/MyApp.app/www/lib/ionic/js/ionic.bundle.min.js:168:493
$apply@file:///var/containers/Bundle/Application/3A827423-25EE-4BDD-BD6F-947BE548BF19/MyApp.app/www/lib/ionic/js/ionic.bundle.min.js:169:222
file:///var/containers/Bundle/Application/3A827423-25EE-4BDD-BD6F-947BE548BF19/MyApp.app/www/lib/ionic/js/ionic.bundle.min.js:448:9462
c@file:///var/containers/Bundle/Application/3A827423-25EE-4BDD-BD6F-947BE548BF19/MyApp.app/www/lib/ionic/js/ionic.bundle.min.js:69:221
dispatchEvent@[native code]
n@file:///var/containers/Bundle/Application/3A827423-25EE-4BDD-BD6F-947BE548BF19/MyApp.app/www/lib/ionic/js/ionic.bundle.min.js:22:397
t@file:///var/containers/Bundle/Application/3A827423-25EE-4BDD-BD6F-947BE548BF19/MyApp.app/www/lib/ionic/js/ionic.bundle.min.js:22:217
l@file:///var/containers/Bundle/Application/3A827423-25EE-4BDD-BD6F-947BE548BF19/MyApp.app/www/lib/ionic/js/ionic.bundle.min.js:22:1458
edencorbin commented 8 years ago

I'm also getting the same error with $ionicAuth.requestPasswordReset(email);:

ionic.bundle.js:26794 TypeError: Cannot read property 'set' of undefined at e.requestPasswordReset (ionic.cloud.min.js:6) at Scope.$scope.requestCode (controllers.js:496) at fn (eval at compile (ionic.bundle.js:27638), <anonymous>:4:432) at expensiveCheckFn (ionic.bundle.js:28651) at callback (ionic.bundle.js:38178) at Scope.$eval (ionic.bundle.js:30395) at Scope.$apply (ionic.bundle.js:30495) at HTMLFormElement.<anonymous> (ionic.bundle.js:38183) at HTMLFormElement.dispatch (jquery-3.0.0.min.js:3) at HTMLFormElement.q.handle (jquery-3.0.0.min.js:3) at triggerMouseEvent (ionic.bundle.js:2953) at tapClick (ionic.bundle.js:2942) at HTMLDocument.tapTouchEnd (ionic.bundle.js:3069)

also, I had tried confirm password reset:

$ionicAuth.confirmPasswordReset(code, newpass);

ionic.bundle.js:26794 TypeError: Cannot read property 'get' of undefined at e.confirmPasswordReset (ionic.cloud.min.js:6) at Scope.$scope.enterCode (controllers.js:509) at fn (eval at compile (ionic.bundle.js:27638), <anonymous>:4:429) at expensiveCheckFn (ionic.bundle.js:28651) at callback (ionic.bundle.js:38178) at Scope.$eval (ionic.bundle.js:30395) at Scope.$apply (ionic.bundle.js:30495) at HTMLFormElement.<anonymous> (ionic.bundle.js:38183) at HTMLFormElement.dispatch (jquery-3.0.0.min.js:3) at HTMLFormElement.q.handle (jquery-3.0.0.min.js:3) at triggerMouseEvent (ionic.bundle.js:2953) at tapClick (ionic.bundle.js:2942) at HTMLDocument.tapTouchEnd (ionic.bundle.js:3069)

wbhob commented 7 years ago

I confirm that I am receiving this same error with Ionic 2 and Cloud 0.14.0.

bgizdov commented 7 years ago

It also happens on Ionic 1 with Cloud v0.14.0. The problem should be in ionic-cloud v0.14.0, I used previous version before and password reset worked without problem.

wbhob commented 7 years ago

Roll back @bgizdov ?

imhoffd commented 7 years ago

@bgizdov @edencorbin @wbhob Sorry for the delay here. We missed something after adding a localstorage utility to the password reset utility. Thanks for the report, this has been fixed and we'll make a release soon!

imhoffd commented 7 years ago

0.14.1 is out! Please update.

wbhob commented 7 years ago

Can merge with DB branch?

On Tue, Nov 22, 2016 at 2:07 PM, Daniel Imhoff notifications@github.com wrote:

0.14.1 is out! Please update.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/driftyco/ionic-cloud/issues/81#issuecomment-262334426, or mute the thread https://github.com/notifications/unsubscribe-auth/AEPIEvrtD7cgJ7ZDwQB3MMMkmA4PmhDdks5rAz1agaJpZM4KhI9X .

Wilson Hobbs Programmer Guy at Beakr https://www.beakr.co "clackity clack" - me (404) 719-3252 wilsonhobbs1@gmail.com wilsonhobbs.com

imhoffd commented 7 years ago

@wbhob https://github.com/driftyco/ionic-cloud/commit/de2212388c0f45f65f31ed56641774a54a7c390f 🎉

wbhob commented 7 years ago

:)

On Tue, Nov 22, 2016 at 3:11 PM, Daniel Imhoff notifications@github.com wrote:

de22123 https://github.com/driftyco/ionic-cloud/commit/de2212388c0f45f65f31ed56641774a54a7c390f 🎉

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/driftyco/ionic-cloud/issues/81#issuecomment-262352228, or mute the thread https://github.com/notifications/unsubscribe-auth/AEPIEvoVEhYYTLngNsngH7HAsX9ymLluks5rA0yBgaJpZM4KhI9X .

Wilson Hobbs Programmer Guy at Beakr https://www.beakr.co "clackity clack" - me (404) 719-3252 wilsonhobbs1@gmail.com wilsonhobbs.com

wbhob commented 7 years ago

@dwieeb should I use the DB branch if I'm not using DB yet, but planning on it as soon as invites go out?

imhoffd commented 7 years ago

@wbhob DB branch is just master (sometimes slightly outdated) + DB integration. It should be pretty much the same thing.