Ion-refresher: TypeError: Cannot read property 'removeEventListener' of null


#1

Having the code below in my page and get out from it gives me this error:

TypeError: Cannot read property ‘removeEventListener’

  <ion-refresher>                       
    <ion-refresher-content 
      pullingIcon="arrow-down"
      pullingText="Pull to refresh"
      refreshingSpinner="circles"
      refreshingText="Refreshing...">
    </ion-refresher-content>                    
  </ion-refresher>

Your system information:

Cordova CLI: 6.0.0
Gulp version: CLI version 3.9.0
Gulp local:
Ionic Version: 2.0.0-beta.2
Ionic CLI Version: 2.0.0-beta.19
Ionic App Lib Version: 2.0.0-beta.9
OS:
Node Version: v5.5.0


#2

Same for ion-infinite-scroll


#3

I’m hitting the same issue (beta 19), where an exception is thrown when you pull the list for a refresh:

TypeError: Cannot read property 'removeEventListener' of null
    at Refresher._mDown (content.js:151)
    at Refresher._setListeners (refresher.js:438)
    at Refresher.ngOnDestroy (refresher.js:459)
    at AbstractChangeDetector.ChangeDetector_FlowRunsPage_0.dehydrateDirectives (viewFactory_FlowRunsPage:190)
    at AbstractChangeDetector.dehydrate (abstract_change_detector.js:141)
    at AbstractChangeDetector.destroyRecursive (abstract_change_detector.js:158)
    at AbstractChangeDetector.destroyRecursive (abstract_change_detector.js:165)
    at AppView.destroy (view.js:111)
    at AppViewManager_.destroyViewInContainer (view_manager.js:124)
    at ViewContainerRef_.remove (view_container_ref.js:116)

Thanks,
Boaz


#4

Can confirm this issue as well, same error as @boazc. When trying to use the hamburger icon to navigate from the page that has the ion-refresher element, this error will pop up, everything will still work though.

Cordova CLI: 6.0.0
Ionic Version: 2.0.0-beta.2
Ionic CLI Version: 2.0.0-beta.19
Ionic App Lib Version: 2.0.0-beta.9
OS: OSX Yosemite
Node Version: v4.3.1


#5

For now, I will remove ion-refresher because it is causing me too much issue when navigating through different page. In fact, the app crashes!


#6

Only then navigating back from page with refresher


ionic2 Refresher dose not show the pullingIcon and refreshingIcon
#7

You are right @pivalig.


#8

There’s an open issue #5760 about this problem, I guess that it will be fixed for beta.4.


#9

Great! Thanks @iignatov for the link