-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
SecurityException when loading thumbnail on some devices #3504
Comments
Show exception log may help to solve the problem. |
Sure, here it is:
|
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions. |
I have the same problem |
I think (and tests confirm that) everyone without 'storage read' permission
is affected on one device or another. I'll look around for a workaround
when I have some time in the coming weeks.
…On Tue, 12 Feb 2019, 12:22 krsoaiheim, ***@***.***> wrote:
I have the same problem
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3504 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGV5GRRvDy0NAn9mCC5M8Q1CHtadKqG4ks5vMqPvgaJpZM4aVqNE>
.
|
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions. |
You'll need to get the read storage permission for your app to load images from media store. How would you like Glide to help you here? |
That's not true @sjudd because I'm granted temporary access by picker activity ('We use glide to load preview from image selected using system picker') which is confirmed as I can access resource directly ('Actual resource uri is accessible, as we are still able to upload it'). Only glide attempts to load thumbnail that apparently has system-specific bugs. |
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions. |
Got it thanks for clarifying. So you have Uri permissions for content://media/external/images/media/ but accessing the equivalent thumbnail with content://media/external/images/thumbnails/ fails. |
Internal issue is b/126712454, but we can work around this in Glide without a framework change. |
A Uri permission grant for a MediaStore Uri will only grant access to the main Uri, not the thumbnail Uri. Applications that have only Uri permissions and not the storage runtime permissions will receive a SecurityException when they try to open the corresponding thumbnail. Prior to this change, the thumbnail exception would cause the entire request to fail. After this change only the thumbnail portion of the request will fail so the image may still be loaded via the original MediaStore Uri. Fixes bumptech#3504.
Glide: 4.8.0
Integration: irrelevant (local image)
Device: some samsungs
We use glide to load preview from image selected using system picker. On some samsungs, it causes SecurityException, as apparently app does not have access to thumbnail of an image.
Actual resource uri is accessible, as we are still able to upload it.
We've migrated from picasso recently. We've had same issues with Picasso. Glide seemed to work ok, but apparently not on all devices.
How can we skip request for thumbnail?
Is it configurable?
The text was updated successfully, but these errors were encountered: