question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[4.6.1] bug: runOutsideAngular problem in IonVirtualScroll

See original GitHub issue

Bug Report

Ionic version:

[x] 4.x

Current behavior:

This bug appeared in 4.6.1 (4.6.0, too?). With 4.5 there were no errors.

I got the following error on every page where I use IonVirtualScroll:

ERROR TypeError: Cannot read property 'runOutsideAngular' of undefined
    at IonVirtualScroll.set (fesm5.js:1386)

The problem is on the proxyInputs function:

function proxyInputs(Cmp, inputs) {
    /** @type {?} */
    var Prototype = Cmp.prototype;
    inputs.forEach((/**
     * @param {?} item
     * @return {?}
     */
    function (item) {
        Object.defineProperty(Prototype, item, {
            get: /**
             * @return {?}
             */
            function () { return this.el[item]; },
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                var _this = this;
                this.z.runOutsideAngular((/**  <--- ERROR SOURCE
                 * @return {?}
                 */
                function () { return _this.el[item] = val; }));
            },
        });
    }));
}

Expected behavior: Work normally

Steps to reproduce:

Other information:

Ionic info:


Ionic:

   Ionic CLI                     : 5.2.1 (/Users/tomi/.nvm/versions/node/v10.14.1/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.6.1
   @angular-devkit/build-angular : 0.11.4
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.0.0, ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 21 other plugins)

Utility:

   cordova-res : 0.3.0 (update available: 0.5.2)
   native-run  : 0.2.7 

System:

   Android SDK Tools : 26.1.1 (/Users/tomi/Library/Android/sdk)
   ios-deploy        : 1.9.4
   ios-sim           : 8.0.1
   NodeJS            : v10.14.1 (/Users/tomi/.nvm/versions/node/v10.14.1/bin/node)
   npm               : 6.10.0
   OS                : macOS Mojave
   Xcode             : Xcode 10.2.1 Build version 10E1001

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
brandyscarneycommented, Jul 10, 2019

We’re going to release a 4.6.2 today with this fix in it. 🙂

4reactions
petrotcommented, Jul 10, 2019

@rernesto the problem is with the virtual-scroll, not with the infinite-scroll.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[4.6.1] bug: runOutsideAngular problem in IonVirtualScroll
Current behavior: This bug appeared in 4.6.1 (4.6.0, too?). With 4.5 there were no errors. I got the following error on every page...
Read more >
ionic 4 problem when adding content before ion-virtual-scroll
When I wrote the question I was not thinking that some div without any CSS will make this issue, but it does.
Read more >
ion-virtual-scroll - Ionic Framework
Simply put, to ensure rendering bugs are not introduced, it's vital that elements within a virtual item does not dynamically change. For virtual...
Read more >
NgZone - Angular
Running functions via run allows you to reenter Angular zone from a task that was executed outside of the Angular zone (typically started...
Read more >
Merge branch 'master' of github.com:ionic-team/ionic into ...
**virtual-scroll:** remove runOutsideAngular error ... [4.6.1](https://github.com/ionic-team/ionic/compare/v4.6.0...v4.6.1) (2019-07-09). ### Bug Fixes.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found