Skip to content
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: TypeError: Cannot read property 'backButtonTextLeft' of null #2868

Closed
matheusrocha89 opened this issue Jan 5, 2015 · 18 comments
Closed
Assignees

Comments

@matheusrocha89
Copy link
Contributor

Type: bug

Platform: desktop browser

Hi everyone,
After I remove the cache of a view using the attr cache-view="false" the console starts to show an error:

TypeError: Cannot read property 'backButtonTextLeft' of null

This happens when I add false to cache-view, then navigate to another view and click on back button, to come back to the view that I put the cache attr as false.

There is a little discussion on ionic forum after I opened a question there

@matheusrocha89 matheusrocha89 changed the title TypeError: Cannot read property 'backButtonTextLeft' of null bug: TypeError: Cannot read property 'backButtonTextLeft' of null Jan 5, 2015
@wlkns
Copy link

wlkns commented Jan 13, 2015

I am also having this issue as of the latest update ([email protected]). I am using the {cache: false} directive in my routes, and it is happening browsing around using Chrome, have not tested on a device yet.

@adaptivedev
Copy link

Me too.

It currently happens when I go by to my default or starting state, e.g. "app.goals-my":

$urlRouterProvider.otherwise('/app/goals-my');

ionic.bundle.js:19387 TypeError: Cannot read property 'backButtonTextLeft' of null
at leave (http://localhost:8100/lib/ionic/js/ionic.bundle.js:43279:49)
at Object.IonicModule.provider.provider.transitions.navBar.ios.run (http://localhost:8100/lib/ionic/js/ionic.bundle.js:43288:11)
at IonicModule.controller.self.transition (http://localhost:8100/lib/ionic/js/ionic.bundle.js:46933:22)
at IonicModule.controller.self.update (http://localhost:8100/lib/ionic/js/ionic.bundle.js:46906:10)
at IonicModule.controller.self.beforeEnter (http://localhost:8100/lib/ionic/js/ionic.bundle.js:47240:52)
at IonicModule.controller.self.beforeEnter (http://localhost:8100/lib/ionic/js/ionic.bundle.js:48219:19)
at Scope.$get.Scope.$emit (http://localhost:8100/lib/ionic/js/ionic.bundle.js:22423:33)
at Object.IonicModule.factory.ionicViewSwitcher.create.switcher.emit (http://localhost:8100/lib/ionic/js/ionic.bundle.js:45968:19)
at Object.IonicModule.factory.ionicViewSwitcher.create.switcher.transition (http://localhost:8100/lib/ionic/js/ionic.bundle.js:45893:20)
at http://localhost:8100/lib/ionic/js/ionic.bundle.js:47229:16

RoverMR-2:sidemenu rover$ ionic --version
1.3.2
RoverMR-2:sidemenu rover$ npm --version
1.4.28
RoverMR-2:sidemenu rover$ node --version
v0.10.34
RoverMR-2:sidemenu rover$ cordova --version
4.1.2

@rept
Copy link

rept commented Jan 22, 2015

Got the same message.

Strange thing is, this is my flow: X => Y => Z

When I go from X => Y I'm not getting this.
When I go from X => Y => Z and then press back then I get this message on the Y view.

@Strutsagget
Copy link

Me too, also using cache: false in routes

@flinn
Copy link

flinn commented Jan 29, 2015

Same, using "$ionicConfigProvider.views.maxCache(0);".

@adamdbradley adamdbradley self-assigned this Feb 9, 2015
@rept
Copy link

rept commented Feb 12, 2015

Same here, also using "$ionicConfigProvider.views.maxCache(0);"

@adamdbradley
Copy link
Contributor

I'm unable to replicate this problem. Would someone be able to put together a simple codepen (using the nightly build) that throws this error? Thanks

@matheusrocha89
Copy link
Contributor Author

Sure. I think I can @adamdbradley

@matheusrocha89
Copy link
Contributor Author

@adamdbradley I try to simulate on codepen but not happening, I think it's because there I can't create different HTML files (just one) and my views are all using ng-template there. Do you think that I can record my screen with my app could help?

@matheusrocha89
Copy link
Contributor Author

@adamdbradley I discover something interesting now. This just happen when the ionic serve "simulates" the iOS version of the app, when I use ionic serve --lab and try to simulate the error on Android view the error doesn't happens, but on iOS side happens.

@adamdbradley
Copy link
Contributor

Yeah the back button text only updates with the previous page title for iOS. Actually the animation code for the nav bar and views use different method between iOS and Android. I'll do an update quick so it's checking for the existence of the previous header bar controller for iOS. Would you still be able to put together a simple codepen showing how it breaks? Thanks

@matheusrocha89
Copy link
Contributor Author

@adamdbradley I tried to simulate the bug on codepen but didn't work so I created a video showing the error happening. http://monosnap.com/file/rrEb1gfdPf8jXEm9uPY8B7VN1Qll1q

@adamdbradley
Copy link
Contributor

Cool thanks for the video. If you pull down the nightly build do you still see the error? Thanks

@matheusrocha89
Copy link
Contributor Author

I will try and tell you. I will update to nightly

@matheusrocha89
Copy link
Contributor Author

No, on nightly the error didn't happen 👍 Thank @adamdbradley 😄

@Strutsagget
Copy link

Can confirm its fixed in nightly. 👍

@adamdbradley
Copy link
Contributor

woot! thanks for the help!

@matheusrocha89
Copy link
Contributor Author

Thank you @adamdbradley 👍 👍 😄

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants