You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.12.13+hotfix.6, on Mac OS X 10.15.3 19D76, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
[✓] Android Studio (version 3.5)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.3.2)
[✓] VS Code (version 1.42.0)
[✓] Connected device (2 available)
Description
Expected behavior:
This will set a global Promise object if the browser doesn't already have window.Promise.
flutter: [CONSOLE.ERROR] TypeError: Promise._immediateFn is not a function. (In 'Promise._immediateFn(function() {
flutter: if (!self._handled) {
flutter: Promise._unhandledRejectionFn(self._value);
flutter: }
flutter: })', 'Promise._immediateFn' is undefined)
functionPromise(fn){if(!(thisinstanceofPromise))thrownewTypeError("Promises must be constructed via new");if(typeoffn!=="function")thrownewTypeError("not a function");this._state=0;this._handled=false;this._value=undefined;this._deferreds=[];doResolve(fn,this);};
Environment
Plugin version:
I am using 9c7ac0d to solve this issue.
#209 (comment)
iOS version:
iOS 13.1
Device information:
iPhone 11 Pro Max Simulator
Description
Expected behavior:
This will set a global Promise object if the browser doesn't already have window.Promise.
Current behavior:
override native Promise object.
Steps to reproduce
Promise.resolve()
in JavaScript.Stacktrace/Logcat
Reason
Overridden in the code below.
https://github.com/pichillilorenzo/flutter_inappwebview/blob/master/ios/Classes/InAppWebView.swift#L57
Solution
Using the code at the following URL.
it will not set a global Promise object if the browser already has window.Promise.
https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js
@pichillilorenzo
What do you think about this solution?
The text was updated successfully, but these errors were encountered: