Error with Refresher in tabs child-page


#1

Hi,

when i add the ion-refresher in one page pushed from a tab page i get this error:

browser_adapter.js:77 EXCEPTION: TypeError: Cannot read property 'remove' of undefinedBrowserDomAdapter.logError @ browser_adapter.js:77BrowserDomAdapter.logGroup @ browser_adapter.js:87ExceptionHandler.call @ exception_handler.js:57(anonymous function) @ application_ref.js:265schedulerFn @ async.js:123SafeSubscriber.__tryOrUnsub @ Subscriber.js:225SafeSubscriber.next @ Subscriber.js:174Subscriber._next @ Subscriber.js:124Subscriber.next @ Subscriber.js:88Subject._finalNext @ Subject.js:128Subject._next @ Subject.js:120Subject.next @ Subject.js:77EventEmitter.emit @ async.js:112NgZone._zoneImpl.ng_zone_impl_1.NgZoneImpl.onError @ ng_zone.js:120NgZoneImpl.inner.inner.fork.onHandleError @ ng_zone_impl.js:66ZoneDelegate.handleError @ zone.js:327Zone.runTask @ zone.js:259ZoneTask.invoke @ zone.js:423 browser_adapter.js:77 STACKTRACE:BrowserDomAdapter.logError @ browser_adapter.js:77ExceptionHandler.call @ exception_handler.js:59(anonymous function) @ application_ref.js:265schedulerFn @ async.js:123SafeSubscriber.__tryOrUnsub @ Subscriber.js:225SafeSubscriber.next @ Subscriber.js:174Subscriber._next @ Subscriber.js:124Subscriber.next @ Subscriber.js:88Subject._finalNext @ Subject.js:128Subject._next @ Subject.js:120Subject.next @ Subject.js:77EventEmitter.emit @ async.js:112NgZone._zoneImpl.ng_zone_impl_1.NgZoneImpl.onError @ ng_zone.js:120NgZoneImpl.inner.inner.fork.onHandleError @ ng_zone_impl.js:66ZoneDelegate.handleError @ zone.js:327Zone.runTask @ zone.js:259ZoneTask.invoke @ zone.js:423 browser_adapter.js:77 TypeError: Cannot read property 'remove' of undefined at Loading.ViewController.dismiss (view-controller.js:85) at SafeSubscriber._next (reviews.ts:46) at SafeSubscriber.__tryOrUnsub (Subscriber.js:225) at SafeSubscriber.next (Subscriber.js:174) at Subscriber._next (Subscriber.js:124) at Subscriber.next (Subscriber.js:88) at CatchSubscriber.Subscriber._next (Subscriber.js:124) at CatchSubscriber.Subscriber.next (Subscriber.js:88) at MapSubscriber._next (map.js:82) at MapSubscriber.Subscriber.next (Subscriber.js:88)BrowserDomAdapter.logError @ browser_adapter.js:77ExceptionHandler.call @ exception_handler.js:60(anonymous function) @ application_ref.js:265schedulerFn @ async.js:123SafeSubscriber.__tryOrUnsub @ Subscriber.js:225SafeSubscriber.next @ Subscriber.js:174Subscriber._next @ Subscriber.js:124Subscriber.next @ Subscriber.js:88Subject._finalNext @ Subject.js:128Subject._next @ Subject.js:120Subject.next @ Subject.js:77EventEmitter.emit @ async.js:112NgZone._zoneImpl.ng_zone_impl_1.NgZoneImpl.onError @ ng_zone.js:120NgZoneImpl.inner.inner.fork.onHandleError @ ng_zone_impl.js:66ZoneDelegate.handleError @ zone.js:327Zone.runTask @ zone.js:259ZoneTask.invoke @ zone.js:423 view-controller.js:85 Uncaught TypeError: Cannot read property 'remove' of undefinedViewController.dismiss @ view-controller.js:85(anonymous function) @ reviews.ts:46SafeSubscriber.__tryOrUnsub @ Subscriber.js:225SafeSubscriber.next @ Subscriber.js:174Subscriber._next @ Subscriber.js:124Subscriber.next @ Subscriber.js:88Subscriber._next @ Subscriber.js:124Subscriber.next @ Subscriber.js:88MapSubscriber._next @ map.js:82Subscriber.next @ Subscriber.js:88onLoad @ xhr_backend.js:48ZoneDelegate.invokeTask @ zone.js:356NgZoneImpl.inner.inner.fork.onInvokeTask @ ng_zone_impl.js:36ZoneDelegate.invokeTask @ zone.js:355Zone.runTask @ zone.js:256ZoneTask.invoke @ zone.js:423

I have no problem when i use the refresher on any other page of my app, only on this.
I push this page from one of my tabs page like that:

this.nav.push(ReviewsPage, { item: this.item });

Thanks :slight_smile:


#2

I found the problem sorry. I had added a loading component before my api call and this created that error. Now refresher works as expected. Now another issue i have with this page is that when i press the back button it pops not on the previous tab page but on the page before where i had pushed the tab page. It just ignores-jumps the tabs page.

HomePage – push --> TabPage – push–> AnotherPage(with refresher) — BackButton --> HomePage and not TabPage.

Thanks :slight_smile: