pichillilorenzo / flutter_inappwebview

A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window.
https://inappwebview.dev
Apache License 2.0
3.14k stars 1.46k forks source link

Android versions 17 & 18 Javascript Inject Error #37

Open ominibyte opened 5 years ago

ominibyte commented 5 years ago

Hi,

First, let me start by saying well done and thanks for this plugin.

I use this plugin currently for the ability to run javascript from my flutter application. I have a JS library which I link on a bare html page. However, I noticed that there is always a console error even when I do not load my own script. It shows up when the about:blank page finishes loading as well as when my own html page stops loading. I have tested on Android versions 17 and 18 and I really would like it to work for at least Android 18. I have tested on the more recent versions of Android (like Pie) and it works so I do not know how far back it doesn't work for. I don't know what the issue may be but I would greatly appreciate any help you can provide me towards fixing this. Here is the error message from the console listener, exactly same even after loading my page:

I/flutter ( 5500): Stopped about:blank
I/flutter ( 5500): 
D/dalvikvm( 5500): GC_FOR_ALLOC freed 148K, 6% free 5772K/6100K, paused 4ms, total 4ms
I/flutter ( 5500):     console output:
I/flutter ( 5500):       sourceURL: null
I/flutter ( 5500):       lineNumber: 1
I/flutter ( 5500):       message: Uncaught SyntaxError: Unexpected token .
I/flutter ( 5500):       messageLevel: ConsoleMessageLevel.ERROR
ktnishide commented 2 years ago

same issue on Android 29