-
Notifications
You must be signed in to change notification settings - Fork 144
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
[CRASH] When used in flutter, Fileprovider paths can be overwritten #162
Comments
Hey. I don’t think the issue is related to the Flutter plugin. No where in the doc is suggested to add a file provider it should work out of the box without it. See the example app https://github.com/Sh1d0w/multi_image_picker/blob/master/example/android/app/src/main/AndroidManifest.xml The old doc where it was suggested was when the plugin used Matisse instead FishBun. If this is fixed in FishBun I will update the plugin accordingly will follow up this issue. |
thanks for jumping on this so quickly. just to clarify, your instructions aren't unclear - we require our own file provider for reasons unrelated to this package. |
facing same issue |
I released version 0.11.1. Please check and let me know. Thank you. |
@MCOfficer I've updated FishBun version in |
took me long enough, but it seems like this is fixed. closing :) |
Note: While this bug did affect me, i'm not sure if it is on you to fix it. cc @Sh1d0w , in case you feel responsible. I'm just filing it here to raise awareness, and to help others who have the same issue.
Describe the bug
We use this plug-in through multi_image_picker from flutter. When opening the camera, we got the following crash:
To Reproduce
Steps to reproduce the behavior:
me.mcofficer.testapp.provider
enableCamera
to true.FishBun/FishBun/src/main/java/com/sangcomz/fishbun/util/CameraUtil.java
Line 41 in 9c48062
getUriForFile
and see whatgetPathStrategy(context, authority)
returns.Expected behavior
The returned PathStrategy should be the one defined in FishBun's AndroidManifest.xml.
Once you resume execution, the camera should open.
Actual behavior
The returned PathStrategy contains the paths from your flutter app's module instead of those from FishBun. If these paths aren't the same by chance, android will most likely fail to find the intended image file within these paths, resulting in above crash.
Smartphone (please complete the following information):
The workaround is to either include FishBun's provider path in your module's paths, or to rename your module's authority name so it doesn't exactly match the one fishbun uses.
The solution on fishbun's end might be to use a more distinct authority name, or perhaps check if that authority already exists.
The text was updated successfully, but these errors were encountered: