Open elisemn opened 2 years ago
To clarify: when you say "system browser" you mean opening in Safari (or Chrome, etc.) and leaving the Cordova app, right?
and then webkit.messageHandlers
is undefined when you return to the Cordova app?
Also, the linked bug has some mention of App-Bound Domains, which aren't something that has been thoroughly tested on the Cordova side. Is your app using App-Bound Domains?
To clarify: when you say "system browser" you mean opening in Safari (or Chrome, etc.) and leaving the Cordova app, right?
and then
webkit.messageHandlers
is undefined when you return to the Cordova app?
Correct
Also, the linked bug has some mention of App-Bound Domains, which aren't something that has been thoroughly tested on the Cordova side. Is your app using App-Bound Domains?
It does look like our app is setting a number of WKAppBoundDomains
and the iframe url is not one of them. I can investigate updating them.
Bug Report
Problem
An iframe in our app triggers a navigation action via
window.open
orwindow.top.location.href
to a url that is in our allow-intent allow list. The url is correctly opened in the system browser. However after it is opened window.webkit.messageHandlers is undefined which causes runtime errors within the cordova exec.js file when it attempts to use the cordova message handler to post a message.TypeError null is not an object (evaluating 'window.webkit.messageHandlers.cordova')
What is expected to happen?
The URL opened by the iframe should be opened in the system browser without triggering errors within the cordova app.
What does actually happen?
After the URL is opened window.webkit.messageHandlers undefined errors occur
Information
Command or Code
Environment, Platform, Device
This issues appears to happen on any iOS mobile device.
Version information
Checklist
[x] I searched for existing GitHub issues
https://github.com/apache/cordova-ios/issues/1214 looks potentially related but does not callout the error being triggered by iframe calls to
window.open
orwindow.top.location.href
[x] I updated all Cordova tooling to most recent version
[x] I included all the necessary information above