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
bug: Nav-bar sometimes disappears after destroying and re-launching the app #3483
Comments
Our app has the same issue as this. Which version of ionic are you using? We've noticed that in ionic beta-14 the issue is not present, but we can reliably reproduce it with rc1 and rc2 on a device by killing and relaunching the app. Also using |
I found some workaround, but it's not ideal for all apps. I replaced the ion-nav-bar with fixed ion-header-bar from http://ionicframework.com/docs/api/directive/ionHeaderBar/ and it does not disappear. It was possible because my app was not using any features from nav-bar like history. Happily the app can go to production, but IMHO the bug is a critical issue for ionic stable release. |
@mrozlukasz do you see this in an app using the tab seed by initially? Can you share a project that reproduces the error so we can inspect it? |
@perrygovier the seed app is working fine. I've noticed that ion-nav-title/ion-nav-buttons used among multiple tabs causes the issue somehow. I'll try to separate the code/edit the tabs seed for you this weekend. Thanks. |
Here's a video where I show how this bug can be reproduced in my app: Here's what I do: The second back button tap (the one that closes the app) is actually calling OS: Android 4.1 Edit: I don't know if it's relevant, but the first view (the one with the list of badminton events) has |
Greetings @mrozlukasz! My sensors indicate a reply was requested, but we have not received one yet, I am using my robot powers to close this issue. However, if you are still experiencing this issue, please feel free to reopen it by creating a new issue, and include any examples or necessary information. Thank you for allowing me to assist you. |
I noticed that when I deleted and reinstalled my app on device, on first load the navbar would be gone. On all subsequent loads it would be fine. Turns out that in some of my controller code that ran at startup, it was trying to access an object that didn't exist yet, that was throwing a silent JS error which then screwed up the navbars for some reason (by preventing a call to self.createHeaderBar with isActive= true). On subsequent loads that object did exist, and therefore no problem. Fixing the bug fixed the navbar issue. Remote debugging with Chrome and an Android phone is great. You can see stuff in the console that was logged before you even opened Developer Tools. Unlike Safari's debugging, where catching startup problems is pretty much impossible. |
I found that these code will make this kind of problem fly away $scope.$on('$ionicView.enter', function(e) {
$ionicNavBarDelegate.showBar(true);
}); My solution is just show it whenever view is entered. |
Thanks @hswolf this figured out my issue!!! |
problem with this solution is that the nav-bar appears empty, no title, no back button, no side menu button |
I'll throw in my 2 cents here. I was having this exact same problem until I realized that I had multiple |
@hswolf solved my problem. |
@hswolf can you please tell me where i should past that code ? |
@Medkhalil97 just paste it in the controller associated with that view. :) |
Thanks @hswolf!!! |
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. |
Type: bug
Platform: mobile webview
# Tabs seedI wrote an app based on tabs seed. The nav-bar seems to disappear sometimes after I close my app and relaunch it.
Steps
I use $state.go with dashboard cache disabled. The issue is random and it happens on both platforms.
This is production showstopper for me. I try to find some workaround but the FIX is needed here. To be more precise, the nav bar gets the hide class and the whole ion-view is repositioned like it was no nav-bar.
Additional info
The text was updated successfully, but these errors were encountered: