Ionic 2 RC2 Polyfill.js Argument not optional on Windows 10 mobile
Updated to the latest RC2, but I now get errors when deploying to the emulator/device.
Here's what I've tried
ionic start test --v2ionic platform add windowsnpm run build --dev- Open up
CordovaApp.sln - Set the device to mobile emulator and deploy

And this is the error that happens in the Polyfill.js file Exception about Argument not optional

Here's what the package.json file has, but it's a vanilla project soo...
{
"name": "ionic-hello-world",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"build": "ionic-app-scripts build",
"watch": "ionic-app-scripts watch",
"serve:before": "watch",
"emulate:before": "build",
"deploy:before": "build",
"build:before": "build",
"run:before": "build"
},
"dependencies": {
"@angular/common": "2.1.1",
"@angular/compiler": "2.1.1",
"@angular/compiler-cli": "2.1.1",
"@angular/core": "2.1.1",
"@angular/forms": "2.1.1",
"@angular/http": "2.1.1",
"@angular/platform-browser": "2.1.1",
"@angular/platform-browser-dynamic": "2.1.1",
"@angular/platform-server": "2.1.1",
"@ionic/storage": "1.1.6",
"ionic-angular": "2.0.0-rc.2",
"ionic-native": "2.2.3",
"ionicons": "3.0.0",
"rxjs": "5.0.0-beta.12",
"zone.js": "0.6.21"
},
"devDependencies": {
"@ionic/app-scripts": "0.0.39",
"typescript": "2.0.6"
},
"description": "test: An Ionic project",
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": []
}
I've even stripped out everything to this, and it still get the error.
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
</head>
<body class="platform-windows platform-cordova platform-webview">
<script src="build/polyfills.js"></script>
</body>
</html>
ionic serve also gives this error in RC2. The application was working fine in RC1 and when I update it to RC2, I get this error. No changes made to the code.
I am seeing the same thing...followed by:
Unable to get property '__symbol__' of undefined or null reference
in main.js
Windows 10, Edge.
Yes, I have this too. Has to do with the Zones.js somehow? Workaround is currently to revert to RC 1
Don't revert to RC1. It works fine in Chrome. Looks like an issue with Edge or non-standard behavior tailored for chrome ( which is the case these days ). If you need to test it for Windows Phone then no other option but to revert to RC1.
Yah, I don't have any other option, but reverting. I utilize WinRT API's that don't exist in Chrome, or have Cordova plugins. My workflow is make a code change, compile with cli, build in Visual Studio, and then deploy to either a device or emulator.
Until Windows 10 UWP gets more attention from developers, this is just how it is.
Related to #9025
I have this problem too. Does anyone have any idea?
It's definitely a problem in Edge. Even viewing the online documentation doesn't work with the side preview. Either develop in chrome until it's fixed, or revert.
Which Edge version? Edge 13 seems to work fine.
Edge 14? Seems that the problem has something to do with window.fetch() that Edge throws a synchronous error when called without arguments instead of an asynchronous one (a rejected Promise) like Firefox or Chrome would do.
Shim this method before including the polyfills might solve the problem.
I'm running Edge 14. RC1 didn't have this issue with Edge 14, so it was something changed in Polyfill.js
@mtycholaz See my second comment.
Interesting, I'll try that.
Hello all! I am looking into this issue today. It seems that edge's implementation of the fetch api is different than other browsers (chrome, firefox, opera) which is causing an issue with the polyfills.
Is anyone here running a nightly build of edge? If so does this issue still happen in that nightly build?
I can confirm Edge 15 on Windows 10 mobile has this issue, along with Edge 14 anniversary edition.
However, in Edge 13 everything works.
Running actual Edge 14.14393 with RC2. Doesn't work! Can confirm, RC1 with @angular/xxx 2.1.1 is fine.
I am not sure Edge has nightly build. If there is, please help me with the link. I am running Windows Insider Build 14965 ( latest ). It still does not work in the Edge version that comes with that build.
Edge 13.10586 (Threshold) - Works Edge 14.14393 Desktop (Anniversary edition) - Error Edge 14.14393 Mobile (Anniversary edition) - Error Edge 15.14955 Mobile (Insider build) - Error