ionic-framework: bug: Nav-bar sometimes disappears after destroying and re-launching the app

Type: <span ionic-type>bug</span>

Platform: <span ionic-platform>mobile</span> <span ionic-webview>webview</span>

<span ionic-description> # Tabs seed

I wrote an app based on tabs seed. The nav-bar seems to disappear sometimes after I close my app and relaunch it.

Steps

  1. I launch my app, login and display the dashboard screen.
  2. Close the app or reinstall it with (ionic run ios; ionic run android)
  3. Sometimes app opens but without nav-bar (it’s hidden)

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

"cordovaPlugins": [
    "org.apache.cordova.device",
    "org.apache.cordova.console",
    "com.ionic.keyboard",
    "org.apache.cordova.splashscreen",
    "org.apache.cordova.inappbrowser",
    "./engine/cordova-crosswalk-engine-c0.6.2",
    "org.apache.cordova.statusbar",
    "uk.co.workingedge.phonegap.plugin.launchnavigator",
    "org.apache.cordova.geolocation",
    {
      "id": "org.crosswalk.engine",
      "locator": "./engine/cordova-crosswalk-engine-c0.6.2"
    }
  ]
</span>

<span is-issue-template></span>

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 16 (2 by maintainers)

Most upvoted comments

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!!!

Here’s a video where I show how this bug can be reproduced in my app: http://iver.io/stuff/ag/WP_20150411_001.mp4

Here’s what I do: I’m inside Chrome and I tap a deep link to open the app. Then I tap the back button twice. The second tap closes the app and I see Chrome again. Then I click the deep link again. The app opens once again. Problem: The nav-bar is not visible. Happens every time I do this, i.e. it’s not random.

The second back button tap (the one that closes the app) is actually calling navigator.app.exitApp();

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 hide-nav-bar=true

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.