Ionic version: (check one with "x")
[ ] 1.x
[x] 2.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 upgraded a project from RC4 to 2.0.0. When running the project, I get shown the following error:

Note that if this error is dismissed, the application continues to function as normal.
Expected behavior:
Error to be fixed.
Other information:
As discussed with @manucorporat:
https://github.com/driftyco/ionic/blob/3a718de4632427cdf1a44e066bb559a6c28c6733/src/components/content/content.ts#L620
this function is called after the content has been destroyed
it is huge complicated function
we could fix it by doing:
if(!this.scroll) return;
but it is a bad fix, since it does not fix the root of the cause
that function should not be called a tall
Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
Cordova CLI: 6.5.0
Ionic Framework Version: 2.0.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: 1.9.0
ios-sim version: 5.0.10
OS: macOS Sierra
Node Version: v6.9.1
Xcode version: Xcode 8.2.1 Build version 8C1002
In ionViewDidLoad of the rootPage, I was setting a variable that hides the ion-menu.
<ion-menu *ngIf="showMenu"
Moving the logic to ionViewWillEnter fixes this. But this is still a workaround as the code worked fine in RC4.
I encountered this problem in a modal view. I had the same problems with ionViewDidLoad getting navParams. Putting it inro ionViewWillEnter solved the problem but the scroll is still messed up. I moved it to constructor and worked perfectly. Please submit this as a bug report. Thanks
A fix for this will be in the next release. Can you please try out the following nightly and let me know if you find any issues:
npm install --save --save-exact [email protected]
Thanks!
Brandy's fix worked for me.
thanks,
i had a similar problem trying to use this.content.scrollToBottom(), so i checked the line where says the error log, it was leading to content.js core file, i was getting the error because this._scroll was null, so i checked it first before using on my component
if(this.content._scroll) {
}
its working for now, but i am not sure if this is a good work around. Hope that helps someone.
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.
Most helpful comment
thanks,
i had a similar problem trying to use this.content.scrollToBottom(), so i checked the line where says the error log, it was leading to content.js core file, i was getting the error because this._scroll was null, so i checked it first before using on my component
if(this.content._scroll) { }its working for now, but i am not sure if this is a good work around. Hope that helps someone.