flutter_inappwebview
flutter_inappwebview copied to clipboard
Can't load dynamic libraries from other packages when using flutter_inappweb (on Android 5 and 6.)
- [x] I have read the Get Started - Installation section
- [x] I have read and done the Get Started - Setup Android section
- [x] I have read and done the Get Started - Setup iOS section
- [x] I have already searched for the same problem
Environment
Technology | Version |
---|---|
Flutter version | 3.0.1 |
Plugin version | 5.4.3+7 |
Android version | 5 and 6 |
Device information:
Description
Spected behavior: Use flutter_inappwebview package on Android 5 and 6 devices in conjunction with other packages that load dynamic libraries (specifically Isar, flutter_js).
Current behavior: It is not possible to load the dynamic libraries of the other packages, when using the flutter_inappwebview package(on Android 5 and 6).
Steps to reproduce
- Add this to your pubspect.yaml in a new project:
...
flutter_js: ^0.5.0+6
isar: ^3.0.0-dev.0
flutter_inappwebview: ^5.4.3+7
- Try on an emulator or physical device running Android 5 or 6. You will get an error like this:
Unable to load dynamic library *.so
3.Now do the same but without the inappwebview flutter package:
...
flutter_js: ^0.5.0+6
isar: ^3.0.0-dev.0
- Everything will load correctly.
Note.- on devices with Android >= 7, it works correctly. The problem appears only on devices with Android 5 and 6 (SDK <=22)
Stacktrace/Logcat
with Isar and flutter_inappwebview:
Invalid argument(s): Failed to load dynamic library 'libisar.so': dlopen failed: library "libisar.so" not found
E/flutter ( 5871): #0 initializeCoreBinary
package:isar/…/native/isar_core.dart:62
E/flutter ( 5871): #1 openIsar
package:isar/…/native/open.dart:53
E/flutter ( 5871): #2 _IsarNative.open
with flutter_js and futter_inappwebview:
( 6264): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: Invalid argument(s): Failed to load dynamic library 'libfastdev_quickjs_runtime.so': dlopen failed: library "libfastdev_quickjs_runtime.so" not found
E/flutter ( 6264): #0 _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:12:43)
E/flutter ( 6264): #1 new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:23:12)
E/flutter ( 6264): #2 _qjsLib
package:flutter_js/quickjs/ffi.dart:129
E/flutter ( 6264): #3 _qjsLib (package:flutter_js/quickjs/ffi.dart)
package:flutter_js/quickjs/ffi.dart:1
E/flutter ( 6264): #4 _jsNewRuntime
package:flutter_js/quickjs/ffi.dart:163
E/flutter ( 6264): #5 _jsNewRuntime (package:flutter_js/quickjs/ffi.dart)
package:flutter_js/quickjs/ffi.dart:1
E/flutter ( 6264): #6 jsNewRuntime
package:flutter_js/quickjs/ffi.dart:206
E/flutter ( 6264): #7 QuickJsRuntime2._ensureEngine
package:flutter_js/quickjs/quickjs_runtime2.dart:51
So the problem is from flutter inappwebview
👋 @jpolstre
NOTE: This comment is auto-generated.
Are you sure you have already searched for the same problem?
Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!
If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.
In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE]
or ios WKWebView [MY ERROR HERE]
keywords.
Following these steps can save you, me, and other people a lot of time, thanks!
Same here as descibed in couchbase issue
Possible solutions:
https://github.com/simolus3/drift/issues/895#issuecomment-729165464
https://github.com/flutter/flutter/issues/59834#issuecomment-1223471763