Notalib / nativescript-webview-ext

Nativescript plugin with extended WebView functionality
Apache License 2.0
76 stars 37 forks source link

Page load timing out #73

Closed erjdriver closed 4 years ago

erjdriver commented 4 years ago

Some of my pages are timing out after 2000 msecs.

This is on Android.

The error that I receive in loadFinishedEvent is Error: Timed out after: 2000.

That message seems to be coming from the plug-in.

Would it be possible to set that value?

m-abs commented 4 years ago

It is a timeout in resolving a promise. It is a bit strange you're getting it when loading a page.

Does the injected javascript take a long time to resolve?

erjdriver commented 4 years ago

Yes I saw that.

It could be related to my other issue with autoload. My js file is about 40K and then with the multiple insertion problem - it could have ballooned to 80K, 120K etc.

It could also be the website I'm accessing - sometimes it's quite slow. Does the loaded event wait for all website XHR calls to complete - I'm pretty sure no - just for the DOMContentLoaded event right?

It would be great if you can expose the timeout value.

Or for your next release increase it.

m-abs commented 4 years ago

Do you have an example project I could look at?

erjdriver commented 4 years ago

Some pages are timing out - very intermittent..mainly the server/internet is slow.

It's not a plug-in issue.

I changed the 2000 to 5000 in your source webview-ext-common.js and re-built my project - didn't rebuild the plugin.

Is the 5000 timeout being used now?