Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

window.onerror only provides "script error" due to file being loaded by file:// #270

Open
JeremyColton opened this issue May 2, 2017 · 2 comments

Comments

@JeremyColton
Copy link

Running WKWebView 1.0.1, Cordova ios 4.0.1, my window.onerror handler provides the following:

window.onerror = function(message, url, lineno, colno, error) {
//message = "script error"
//url = ""
//lineno = 0
//colno = 0
//error = null
);

Is there a flag/setting that will stop the Mobile Safari browser from hiding this critical info?

@UniqueSilence
Copy link

NO MainViewController. How can i do?

@imGiantChan
Copy link

I am confused about this issue as same as @JeremyColton , I am trying to log the javascript error message both in my Android & iOS hybridApp using window.onerror(), it works well in Android platform, but obviously failed in iOS, got the same "script error" without any other message. and I can not find any solution to this issue. Should I change my file loading from "file://" to "http://localhost"? Because it seems that using "http" to loading local file works fine.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants