Enabling Full Javascript functionality within webview for external websites

Well as the title says, i want to use webapps, which are probably made with javascript to run inside a webview. Most things load ok, but one particular webapp says:

"An Error occurred while loading the {webapp.module}:
Cannot read properties of null (reading 'getItem')"

It seems like maybe it can't find the references, i'm hoping there is a way to patch this on the app inventor side, as i don't have access to the webapps i want to host.

If you can use extensions, you could try webviewextra for use the the native webviewer, or customwebview

Just by injecting the current webviewer into it?
like so?

Yes....

For my very specific use-case this was the answer.

Thank you very much @TIMAI2

actually it worked for a little bit but then stopped working.
Now all i get is a blank screen...

For whatever reason,

Adding the webview to webviewextra after the page was loaded seemed to work better.

image

It still crashed halfway and would only work again after reinstalling (without having to modify and rebuild the app).

Also seems like the changing the orienation of the phone will reload the page, which is kind of weird. But i guess it's a good start

Try customwebview, you may have more success with that?

After some extensive testing it hasn't crashed again.

I'm gonna do some more testing, but for now i am satisfied.

I will look into the customwebview if i encounter more problems. But i like this method because i can resize the webview for overlays that interact with the app on the backend side.

1 Like