-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Android app crash while trying to upload image #413
Comments
Please see How to enable the usage of camera for HTML inputs such as section. On Android, you need to add the following codes inside the <provider
android:name="com.pichillilorenzo.flutter_inappwebview.InAppWebViewFileProvider"
android:authorities="${applicationId}.flutter_inappwebview.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider> |
Also, don't use the git version. Use the released version |
@pichillilorenzo Ok bro, I have one doubt. My doubt is In my app while selecting image without using camera tag in html is working without provider tag in manifest file, but selecting image with camera tag is need provider tag in manifest file. Why bro. |
Hi @pichillilorenzo @msarkrish Can you please check this issue. #555 |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue. |
Environment
Flutter version:
[√] Flutter (Channel dev, 1.19.0-5.0.pre, on Microsoft Windows [Version 6.3.9600], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Chrome - develop for the web
[√] Android Studio (version 3.5)
[√] VS Code (version 1.46.1)
[√] Connected device (3 available)
Plugin version:
Accessing from git
flutter_inappwebview:
git:
url: https://github.com/pichillilorenzo/flutter_inappwebview.git
Android version:
Nougat
iOS version:
Not checked in iPhone
Device information:
Redmi Note 4
Description
In my app i'm trying to upload image by pressing button. after pressing button app crashed.
Upload Image and you will get this error.(But its work in some places, means in my webview i can change profile photo but i cannot upload image in another page.
Expected behavior:
After pressing upload image button it need to show alert to select images.
Current behavior:
After pressing upload image button it need to show alert to select images, but app is crashed.
Steps to reproduce
Upload Image and you will get this error.
Stacktrace/Logcat
W/System.err(32700): java.lang.IllegalArgumentException: Couldn't find meta-data for provider with authority com.sixiinfotech.flathub.flutter_inappwebview.fileprovider
W/System.err(32700): at androidx.core.content.FileProvider.parsePathStrategy(FileProvider.java:606)
W/System.err(32700): at androidx.core.content.FileProvider.getPathStrategy(FileProvider.java:579)
W/System.err(32700): at androidx.core.content.FileProvider.getUriForFile(FileProvider.java:417)
W/System.err(32700): at com.pichillilorenzo.flutter_inappwebview.InAppWebView.InAppWebViewChromeClient.getOutputUri(InAppWebViewChromeClient.java:876)
W/System.err(32700): at com.pichillilorenzo.flutter_inappwebview.InAppWebView.InAppWebViewChromeClient.getPhotoIntent(InAppWebViewChromeClient.java:762)
W/System.err(32700): at com.pichillilorenzo.flutter_inappwebview.InAppWebView.InAppWebViewChromeClient.startPhotoPickerIntent(InAppWebViewChromeClient.java:719)
W/System.err(32700): at com.pichillilorenzo.flutter_inappwebview.InAppWebView.InAppWebViewChromeClient.onShowFileChooser(InAppWebViewChromeClient.java:623)
W/System.err(32700): at Zy0.runFileChooser(chromium-Monochrome.aab-stable-410410673:11)
W/System.err(32700): at android.os.MessageQueue.nativePollOnce(Native Method)
W/System.err(32700): at android.os.MessageQueue.next(MessageQueue.java:329)
W/System.err(32700): at android.os.Looper.loop(Looper.java:142)
W/System.err(32700): at android.app.ActivityThread.main(ActivityThread.java:6375)
W/System.err(32700): at java.lang.reflect.Method.invoke(Native Method)
W/System.err(32700): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
W/System.err(32700): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
F/chromium(32700): [FATAL:jni_android.cc(249)] Please include Java exception stack in crash report
F/libc (32700): Fatal signal 5 (SIGTRAP), code -6 in tid 32700 (nfotech.flathub)
Build fingerprint: 'xiaomi/mido/mido:7.0/NRD90M/V11.0.2.0.NCFMIXM:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 32700, tid: 32700, name: nfotech.flathub >>> com.sixiinfotech.flathub <<<
signal 5 (SIGTRAP), code -6 (SI_TKILL), fault addr 0x2a5a00007fbc
Abort message: '[FATAL:jni_android.cc(249)] Please include Java exception stack in crash report
'
x0 0000000000000000 x1 0000000000000081 x2 000000007fffffff x3 0000000000000000
x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000000000000000
x8 0000000000000000 x9 0000000000000000 x10 0000000000000001 x11 0000000000000000
x12 0000007f60d64180 x13 0000000000000000 x14 0000000000000000 x15 002d8d41870fbddd
x16 0000007f89e51258 x17 0000007f89dabed0 x18 00000000132936ae x19 0000007ff0467720
x20 0000007ff0467728 x21 0000007ff0467730 x22 000000000000004f x23 0000007f89e53848
x24 0000007f7499d000 x25 0000007f8c981b38 x26 0000007f502dd300 x27 0000007ff0467270
x28 0000007f7499d000 x29 0000007ff04676c0 x30 0000007f72344194
sp 0000007ff0467260 pc 0000007f72344394 pstate 0000000060000000
backtrace:
#00 pc 00000000018ab394 /data/app/com.android.chrome-1/base.apk (offset 0xbec000)
#1 pc 00000000018ab190 /data/app/com.android.chrome-1/base.apk (offset 0xbec000)
Lost connection to device.
Exited (sigterm)
The text was updated successfully, but these errors were encountered: