Runtime Error after upgrade to RC4

I am getting runtime error after upgrade to RC4
how to fix it?

Runtime Error
Uncaught (in promise): false
Stack
Error: Uncaught (in promise): false
    at s (http://localhost:8100/build/polyfills.js:3:4211)
    at s (http://localhost:8100/build/polyfills.js:3:4034)
    at http://localhost:8100/build/polyfills.js:3:4574
    at t.invokeTask (http://localhost:8100/build/polyfills.js:3:9723)
    at Object.onInvokeTask (http://localhost:8100/build/main.js:39169:37)
    at t.invokeTask (http://localhost:8100/build/polyfills.js:3:9659)
    at e.runTask (http://localhost:8100/build/polyfills.js:3:7083)
    at i (http://localhost:8100/build/polyfills.js:3:3671)
    at HTMLElement.invoke (http://localhost:8100/build/polyfills.js:3:10876)
Ionic Framework: 2.0.0-rc.4
Ionic Native: ^2.2.12
Ionic App Scripts: 0.0.47
Angular Core: 2.2.1
Angular Compiler CLI: 2.2.1
Node: 6.9.2
OS Platform: macOS Sierra
Navigator Platform: MacIntel
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36

Having the same issue on windows 10; ionic/angular environment is the same as above. App worked just fine with rc3 and 0.0.45 scripts :frowning:

12-19 08:36:44.934: I/chromium(3136): [INFO:CONSOLE(62717)] “Error: Uncaught (in promise): false
12-19 08:36:44.934: I/chromium(3136): at s (file:///android_asset/www/build/polyfills.js:3:4211)
12-19 08:36:44.934: I/chromium(3136): at s (file:///android_asset/www/build/polyfills.js:3:4034)
12-19 08:36:44.934: I/chromium(3136): at file:///android_asset/www/build/polyfills.js:3:4574
12-19 08:36:44.934: I/chromium(3136): at t.invokeTask (file:///android_asset/www/build/polyfills.js:3:9723)
12-19 08:36:44.934: I/chromium(3136): at Object.inner.inner.fork.onInvokeTask (file:///android_asset/www/build/main.js:46070:37)
12-19 08:36:44.934: I/chromium(3136): at t.invokeTask (file:///android_asset/www/build/polyfills.js:3:9697)
12-19 08:36:44.934: I/chromium(3136): at e.runTask (file:///android_asset/www/build/polyfills.js:3:7083)
12-19 08:36:44.934: I/chromium(3136): at i (file:///android_asset/www/build/polyfills.js:3:3671)
12-19 08:36:44.934: I/chromium(3136): at HTMLDivElement.invoke (file:///android_asset/www/build/polyfills.js:3:10876)”, source: file:///android_asset/www/build/main.js (62717)
12-19 08:36:44.936: I/chromium(3136): [INFO:CONSOLE(3)] “Error: Uncaught (in promise): false”, source: file:///android_asset/www/build/polyfills.js (3)

Steps that worked for me:

  1. get the latest 0.0.48 scripts: npm install @ionic/app-scripts@latest --save-dev

  2. after upgrade, following error occurred on first --prod build: [INFO:CONSOLE(73)] "Uncaught Error: Module build failed: TypeError: Cannot set property ‘sources’ of undefined in node_modules@ionic\app-scripts\dist\webpack\loader-impl.js:35:37

  3. I am not concerned about source maps, so I changed a few lines in loader-impl.js, to read as follows:

         //sourceMapObject.sources = [absolutePath];
         if (sourceMapObject && (!sourceMapObject.sourcesContent || sourceMapObject.sourcesContent.length === 0)) {
             sourceMapObject.sourcesContent = [source];
         }

Best luck to you, but in my case I don’t understand where is the actual issue, please see following error… if you can get idea let me know…

Runtime Error
Uncaught (in promise): false
Stack
Error: Uncaught (in promise): false
    at s (http://localhost:8100/build/polyfills.js:3:4211)
    at s (http://localhost:8100/build/polyfills.js:3:4034)
    at http://localhost:8100/build/polyfills.js:3:4574
    at t.invokeTask (http://localhost:8100/build/polyfills.js:3:9723)
    at Object.onInvokeTask (http://localhost:8100/build/main.js:39169:37)
    at t.invokeTask (http://localhost:8100/build/polyfills.js:3:9659)
    at e.runTask (http://localhost:8100/build/polyfills.js:3:7083)
    at i (http://localhost:8100/build/polyfills.js:3:3671)
    at HTMLElement.invoke (http://localhost:8100/build/polyfills.js:3:10876)
Ionic Framework: 2.0.0-rc.4
Ionic Native: ^2.2.12
Ionic App Scripts: 0.0.47
Angular Core: 2.2.1
Angular Compiler CLI: 2.2.1
Node: 6.9.2
OS Platform: macOS Sierra
Navigator Platform: MacIntel
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
2 Likes

Got the same problem, any one knows what’s up?

I was suffering through these and it came down to my have a loading controller object that I was trying to dismiss. I removed the call to its dismiss() method and just added an option of having the loading controller remove itself on page changes. That, for me, solved that issue. It took many many hours to work through that and it was only after someone referencing dismissing controllers that I thought about my use of loading controllers - which had worked fine in previous release candidates. No idea if this will help - but here’s hoping it does.

I am having a similar issue and its driving me crazy. Would you mind showing what you did in code? Thank you !

Are your still having issues?

Today I have upgrade my app from RC3 to RC5 and it has same issue, but finally I fixed

It’s because of loading.dismiss();

Change
loading.dismiss();
To
loading.dismiss().catch(() => {});

this will fix runtime error on RC5 hopefully it might work on RC4 as well.

1 Like

You have to narrow down the information. e.g: if this error appear upon launching your app, it means you have something wrong in your app module. If error appear upon opening some page, it means the error must be on page you try to open.

You also didn’t mention what version you were before upgrading to RC.4

Edit :
I didn’t see your last post :smile: it appears you have solve it already :stuck_out_tongue_closed_eyes:

I had RC3, Now i have upgrade to ionic 2 Final but has same issue… what is the proper way to dismiss loading?

loading.dismiss().catch(() => {});

thanks now it is working