-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Ionic v3 - Runtime Error Uncaught (in promise): removeView was not found #11443
Comments
If you call loading.dismiss() manually, I don't recommend to use dismissOnPageChange, you are probably dismissing the same loading twice. |
The problem is mostly due to the => this.nav.setRoot(HomePage); One "temporary" solution to this problem is to remplace this.nav.setRoot(HomePage) by : this.nav.insert(0,HomePage); You are setting the Homepage to the root by doing that, and then you just pop all the others component. If there is a problem, tell me |
I got this error too--however, downgrading ion-app-scripts from 1.3.6 to 1.3.4 fixed it for me. I see you're using 1.3.4, so not sure what's up. Ionic info:
|
I have found this problem too after I update framework from v2.0.3 to 3.0.0 and update again to v3.1.0, But I'm not get this error in framework v2.0.3. so not sure this problem found on 3.0.0 or 3.1.0 now my ionic info is below.
Note: my ionic app script version 1.3.4 too. |
update, I've found the way to fix this issue. (not downgrade framework version, I still use 3.1.0)
to
Why it works? I think because loading.present() is asynchronous method., So we can't call loading.dismiss() manually when loading.present() is still running. However I'm not sure why we doesn't have this problem in the old framework version (2.0.3). |
Hi guys, I had the same issue but the problem was because
after upgrading to 3.1.1, I had to put the
The documentation says that |
Same issue here! I don't think I am dismissing loading twice. If I don't present this loading I don't get the error.
|
Hi xap5xap, Could you try to remove alert.dismiss(), it works for me. So your code will be like this.
Hi uzumakinaruto123, Could you try to revise your code by add .then() after loading.present(), it works for me. So your code will be like this.
|
|
Hello all! As this seems like more of a support question at this point I will urge that you ask that you take this question to our forum or our [slack channel](https://ionicworldwide.herokuapp.com/]. Thanks for using Ionic! |
A quick fix would be to make the loader null. That should fix the issue. |
Try this : Its working for me :) |
Sorry. My original comment was incorrect, so I deleted it. Mine was not related to the alert but to a subsequent loading instance, and an attempt to remove it on ngAfterContentChecked. The current methods I've written do still cause this problem:
These are provided in a service. I'm not sure what could be wrong here. It definitely was not a problem until moving from ionic 2 to ionic 3. It definitely has nothing to do with page navigation. |
I had the same problem... until I recognized that binding (click)="callback()" on nested dom elements was causing this problem! Example - content of modal dialog: <ion-item detail-none *virtualItem="let unsentOffer" (click)="selectOffer(unsentOffer)">
<ion-grid no-padding>
<ion-row>
<ion-col>
<div class="project-name ellipsis line-count-1" (click)="selectOffer(unsentOffer)"><span ion-text text-bold>{{unsentOffer.description}}</span>
</div>
<div class="customer-name ellipsis line-count-1"><span ion-text>{{unsentOffer.firstNameLastName}}</span>
</div>
</ion-col>
</ion-row>
</ion-grid>
</ion-item> If you dismiss your dialog in selectOffer() - it is called twice - the second one crashes with "removeView was not found"... |
I solved the following by using this method. |
I have solved this problem by callback function, see: make a try by callback function |
I am getting this issue when you open an actionsheet or modal multiple times in quick succession. And they are opened from different sources. How can you apply the fix to that especially when ioni handles the view killing like on the action sheet. |
On the original issue, and other issues similar. Read this Above is the code for the loadController. Notice the code that tries to access the page you are moving from to do the animations. This happens on different components and usually, depends on where on the page you set the component to display. The code fails on the last part, trying to dismiss the loadController why? Because you reset the navigation stack by calling setRoot() and you no longer have access to the signup page. The only page in the nav stack is the homepage. This is the page from which animations should happen Try setting the dismiss time to about 1000ms. This should give it enough time to rewrite the correct leaving page on the navigation stack to the homepage and leave gracefully |
I hope someone gets to the bottom of this, because it is annoying and the error occurs pretty much at random. For me it happens whenever I am changing tabs rapidly. My best diagnosis is that it is very likely to be a race condition. My solution is to add a catch after dismiss:
seems to work so far. |
i've tried those tips but still, the issue is still showing. Example:
|
I found same problem and tested with this.
I have added this code
Work for me! |
Had the same error popping up. "removeView was not found" Here's my case and how I solved it: I was instantiating my loader in the constructor like this...
I removed the error by always calling Not sure if this is the best approach, but I'm picking it for now. Hope it also helps some of you. |
This is a crazy issue marked as "support" by Ionic team! The LoadingController itself should have a simple f*cking Due to this issue, we need to maintain a |
I get this issue in my PWA, whenever I press browser back button. NavBar back button is working fine. |
so the full code should be |
@kaceo method was still throwing the error till i did this loader.dismiss().catch(()=>{}) mentioned here #11776 (comment) |
just try ` this.viewCtrl.dismiss().then(()=>{ |
this
Worked for me |
This is just ridiculous. I tried every solution listed here with no success. In my case, I was presenting my login page as a modal. So my solution for closing it while keeping my sidebar functionality was: |
@EduardoIbarra, @Theo4u's solution worked |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Ionic version: (check one with "x")
[ x] 3.x
I'm submitting a ... (check one with "x")
[x ] bug report
Current behavior:
Having a signup form with 2 fields email and password, the user is created successfully but ends up in this exception.
Runtime Error
Uncaught (in promise): removeView was not found
Expected behavior:
Code works with v2 no error when this codebase is upgraded to v3 package.json it throws error in promise.
Related code:
Other information:
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):The text was updated successfully, but these errors were encountered: