flutter_inappwebview icon indicating copy to clipboard operation
flutter_inappwebview copied to clipboard

Android versions 17 & 18 Javascript Inject Error

Open ominibyte opened this issue 5 years ago • 1 comments

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

ominibyte avatar Jan 12 '19 16:01 ominibyte

same issue on Android 29

ktnishide avatar Aug 02 '22 10:08 ktnishide