ionic-framework: Uncaught (in promise): false ionViewCanEnter (v3)
Ionic version: (check one with “x”) [ ] 1.x [ ] 2.x [x] 3.x
I’m submitting a … (check one with “x”) [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior: I think this is an old BUG, one comes back many times from a long time. I had not this error before on passing to v3 and IonicPage lazy loading.
I’m playing around pushing root pages for LoginPage/MainPage on http 401
exception.
When I got an 401 error status I will push LoginPage to rootPage. I have a two ion-navs
one which loads LoginPage
or MainPage
and one in MainPage
whichs loads any SubPages in MainPage
I have the error using ionViewCanEnter() where I call my AuthGuard which is calling resource /usser/current which is getting an 401 error
I think the main problem is the ionViewCanEnter which doesn’t work very well with Promise calling a Observable
ionViewCanEnter(): Promise<any> {
return new Promise((resolve, reject) => {
this.userService.current(true).toPromise()
.then((data) => {
resolve();
})
.catch((error) => {
reject('ERROR');
});
});
}
I think it would very heart have to reproduce my error on my side on a simple ionic app. Can someone help me figuring out the bug?
Runtime Error
Uncaught (in promise): false
Stack
Error: Uncaught (in promise): false
at g (http://localhost:8100/build/polyfills.js:3:7133)
at l (http://localhost:8100/build/polyfills.js:3:6251)
at http://localhost:8100/build/polyfills.js:3:5607
at http://localhost:8100/build/polyfills.js:3:17487
at t.invoke (http://localhost:8100/build/polyfills.js:3:14529)
at Object.onInvoke (http://localhost:8100/build/main.js:4499:37)
at t.invoke (http://localhost:8100/build/polyfills.js:3:14469)
at n.run (http://localhost:8100/build/polyfills.js:3:9741)
at http://localhost:8100/build/polyfills.js:3:6774
at t.invokeTask (http://localhost:8100/build/polyfills.js:3:15213)
at Object.onInvokeTask (http://localhost:8100/build/main.js:4490:37)
at t.invokeTask (http://localhost:8100/build/polyfills.js:3:15134)
at n.runTask (http://localhost:8100/build/polyfills.js:3:10390)
at a (http://localhost:8100/build/polyfills.js:3:5313)
at XMLHttpRequest.invoke (http://localhost:8100/build/polyfills.js:3:16210)
Ionic Framework: 3.0.1
Ionic App Scripts: 1.3.1
Angular Core: 4.0.0
Angular Compiler CLI: 4.0.0
Node: 6.10.2
OS Platform: Linux 4.8
Navigator Platform: Linux x86_64
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.59 Safari/537.36
Expected behavior: This should solved as soon as possibile
Ionic info: (run ionic info
from a terminal/cmd prompt and paste output below):
Cordova CLI: 6.5.0
Ionic Framework Version: 3.0.1
Ionic CLI Version: 3.0.0-beta.5
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.8
Node Version: v6.10.2
Xcode version: Not installed
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 20 (9 by maintainers)
need this too!
Im using it this way
Hope that helps
Any Solution to this Problem?
News?
the same error when I use a loading with @IonicPage =>
let load:Loading = this.loadCtrl.create(); load.present().then(()=>{ load.dismiss(); });
Error =>
ERROR Error: Uncaught (in promise): false at g (polyfills.js:3) at l (polyfills.js:3) at l (polyfills.js:3) at polyfills.js:3 at t.invokeTask (polyfills.js:3) at Object.onInvokeTask (core.es5.js:4136) at t.invokeTask (polyfills.js:3) at n.runTask (polyfills.js:3) at a (polyfills.js:3)