Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible issue with (de-)allocation of webview instances on iOS #11

Open
ekirchdev opened this issue Jul 25, 2023 · 1 comment
Open

Comments

@ekirchdev
Copy link

ekirchdev commented Jul 25, 2023

Hello, I am using the webview to display content of a web page on a local web server. I manage with the iOS webview that the server is no longer accessible when I navigate to the webview and back again several times. Something seems to be wrong with the garbage collection there. The app is flooding a queue on the webserver, unfortunately I cannot debug the webserver further.

With Android, the problem does not happen.
If I use the default NativeScript webview on iOS instead, it works without flooding the webserver's connection queue.

I have commented out various elements of the code, such as everything from initNativeView / disposeNativeView in index.ios.js, but that doesn't help and does not gain any further information...

I am sorry that I can't provide more details.

Which platform(s) does your issue occur on?

  • iOS only
  • arbitrary iOS versions >= 15
  • arbitrary iPhones

Please, provide the following version numbers that your issue occurs with:

"@angular/core": "v13-lts",
"@nativescript/angular": "13.0.4",
"@nativescript/core": "8.5.3",
"@nativescript-community/ui-webview": "1.4.6", 
"@nativescript/ios": "8.5.1",
@ekirchdev
Copy link
Author

ekirchdev commented Jul 26, 2023

image

This javascript code is executed implicitly by the library, every time I create a webview instance by using executeJavaScript(scriptCode, stringifyResult).

As I don't really need it, I override the executeJavaScript function to block this logic. I don't really understand why, but my problem is solved!

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

No branches or pull requests

1 participant