ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.89k stars 13.52k forks source link

bug: [ionic-5.0.0-rc1] Uncaught exceptions when navigating to and from pages with IonRefresher #20320

Closed mattdelliott closed 4 years ago

mattdelliott commented 4 years ago

Bug Report

Ionic version: [x] 5.0.0-rc1

Current behavior: If you have an IonRefresher/IonRefresherContent on a page and you navigate from the page with the refresher to the page without the refresher, it'll trigger the error. The stacks are a bit different depending on iOS or MD modes.

Expected behavior: No uncaught exceptions

Steps to reproduce:

  1. Run sample Project
  2. Click on Menu
  3. Click on List
  4. Click on Menu
  5. Click on Home

Related code:

https://github.com/mattdelliott/ionic5-refresher-bug-sample

Other information:

Stacks:

MD:

Uncaught (in promise) TypeError: Cannot read property '__zone_symbol__addEventListener' of undefined
    at addEventListener (index-c38df685.js:205)
    at Object.enable (index-c38df685.js:325)
    at Object.enable (index-c38df685.js:561)
    at class_1.disabledChanged (ion-refresher_2-md.entry.js:331)
    at class_1.<anonymous> (ion-refresher_2-md.entry.js:579)
    at step (tslib.es6.js:99)
    at Object.next (tslib.es6.js:80)
    at fulfilled (tslib.es6.js:70)

iOS:

ion-refresher_2-ios.entry.js:387 Uncaught (in promise) TypeError: Cannot read property 'clientHeight' of undefined
    at class_1.<anonymous> (ion-refresher_2-ios.entry.js:387)
    at step (tslib.es6.js:99)
    at Object.next (tslib.es6.js:80)
    at tslib.es6.js:73
    at new Promise (<anonymous>)
    at __awaiter (tslib.es6.js:69)
    at class_1.setupiOSNativeRefresher (ion-refresher_2-ios.entry.js:379)
    at class_1.<anonymous> (ion-refresher_2-ios.entry.js:596)
    at step (tslib.es6.js:99)
    at Object.next (tslib.es6.js:80)
    at tslib.es6.js:73
    at new Promise (<anonymous>)
    at __awaiter (tslib.es6.js:69)
    at class_1.setupNativeRefresher (ion-refresher_2-ios.entry.js:586)
    at class_1.checkNativeRefresher (ion-refresher_2-ios.entry.js:337)
    at class_1.componentDidUpdate (ion-refresher_2-ios.entry.js:606)
    at safeCall (core-80bde1aa.js:1373)
    at postUpdateComponent (core-80bde1aa.js:1326)
    at postUpdate (core-80bde1aa.js:1282)
    at updateComponent (core-80bde1aa.js:1284)
    at Array.update (core-80bde1aa.js:1218)
    at consumeTimeout (core-80bde1aa.js:117)
    at flush (core-80bde1aa.js:140)
Screen Shot 2020-01-28 at 8 15 13 AM
jgirdner commented 4 years ago

Sweet. Hopefully they fix it soon.

elylucas commented 4 years ago

@mattdelliott / @jgirdner was this an issue in 4.11 as well or just v5?

mattdelliott commented 4 years ago

I didn't notice this in 4.11, but I can test it with that project to see.

mattdelliott commented 4 years ago

Nope works fine on 4.11.10. I pushed a branch with the changes to package.json for reference.

elylucas commented 4 years ago

great, thanks for checking! We will look into it.

mattdelliott commented 4 years ago

Not sure if it helps at all, but it is the same behavior in rc0, but if you specify a custom pulling icon then it doesn't happen. The difference between rc1 and rc0 is that in rc1 if you specify the pulling icon, nothing even shows in the ion-refresher-content.

liamdebeasi commented 4 years ago

Thanks for the issue. Can you try the following dev build and let me know if it resolves your issue: 5.0.0-dev.202001281814.f1e3e42

mattdelliott commented 4 years ago

Yep that fixed it

liamdebeasi commented 4 years ago

Thanks for the issue. This has been resolved via https://github.com/ionic-team/ionic/pull/20322 and will be available in an upcoming release of Ionic Framework.

ionitron-bot[bot] commented 4 years ago

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.