Skip to content
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

Can't access file #51

Open
HackaN opened this issue Nov 24, 2021 · 4 comments
Open

Can't access file #51

HackaN opened this issue Nov 24, 2021 · 4 comments

Comments

@HackaN
Copy link

HackaN commented Nov 24, 2021

Screenshot_20211124-023059_openWorkout
Describe the bug

Version: 1.3.1 (14) from f-droid.

  • running LineageOS 18.1

I created a bunch of workouts and added an image for each exercise. Everything fine until I close the app and open it again.

When I enter either one of the created workouts I get a toast message saying "Can't access file content://..." and the images are replaced with a place holder image of a camera.

I can enter edit mode and click on the icon of the exercise and find the image again via the file browser and add it. Next time I open the app they're all gone again and I am met with the same toast message.

I checked App Info and OpenWorkout has storage permission, but it is acting upon start as if it doesn't... or is it perhaps failing to store the image when saving the exercise?

@Skorium
Copy link

Skorium commented Feb 6, 2022

Exact same issue on my device using stock ROM on Xiaomi Redmi Notes 10 Pro.

@marbetschar
Copy link

Same happens on my end; using Google Pixel 5 running CalyxOS v3.7.0, installed openWorkout v1.3.1 (14) from F-Droid. Please let me know if you like any additional information to fix the root cause of this issue - I'm happy to share.

@marbetschar
Copy link

Just noticed I'm able to enable debug logging from the app's settings. Here's the SecurityException thrown by the app after a picture (or video) was assigned to an exercise and the app got restarted:

2022-09-05 14:33:51.312 Debug [2] MainPreferences: Debug log enabled, openWorkout v1.3.1 (14), SDK 32, Google Pixel 5
2022-09-05 14:34:03.514 Error [2] g: java.lang.SecurityException: Permission Denial: reading com.android.externalstorage.ExternalStorageProvider uri content://com.android.externalstorage.documents/document/primary%3ADocuments%2FUebungen%2FBear-Walk.jpeg from pid=24700, uid=10300 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs
	at android.os.Parcel.createExceptionOrNull(Parcel.java:2426)
	at android.os.Parcel.createException(Parcel.java:2410)
	at android.os.Parcel.readException(Parcel.java:2393)
	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
	at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:153)
	at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:780)
	at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:2027)
	at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1965)
	at android.graphics.ImageDecoder$ContentResolverSource.createImageDecoder(ImageDecoder.java:266)
	at android.graphics.ImageDecoder.decodeDrawableImpl(ImageDecoder.java:1766)
	at android.graphics.ImageDecoder.decodeDrawable(ImageDecoder.java:1759)
	at android.widget.ImageView.getDrawableFromUri(ImageView.java:1017)
	at android.widget.ImageView.resolveUri(ImageView.java:986)
	at android.widget.ImageView.setImageURI(ImageView.java:561)
	at androidx.appcompat.widget.o.setImageURI(Unknown Source:0)
	at com.health.openworkout.gui.workout.g.Y(Unknown Source:183)
	at com.health.openworkout.gui.workout.g.u(Unknown Source:2)
	at androidx.recyclerview.widget.RecyclerView$g.v(Unknown Source:0)
	at androidx.recyclerview.widget.RecyclerView$g.d(Unknown Source:29)
	at androidx.recyclerview.widget.RecyclerView$v.H(Unknown Source:39)
	at androidx.recyclerview.widget.RecyclerView$v.I(Unknown Source:498)
	at androidx.recyclerview.widget.RecyclerView$v.p(Unknown Source:5)
	at androidx.recyclerview.widget.RecyclerView$v.o(Unknown Source:1)
	at androidx.recyclerview.widget.LinearLayoutManager$c.d(Unknown Source:11)
	at androidx.recyclerview.widget.LinearLayoutManager.t2(Unknown Source:0)
	at androidx.recyclerview.widget.LinearLayoutManager.V1(Unknown Source:38)
	at androidx.recyclerview.widget.LinearLayoutManager.Y0(Unknown Source:356)
	at androidx.recyclerview.widget.RecyclerView.E(Unknown Source:38)
	at androidx.recyclerview.widget.RecyclerView.C(Unknown Source:37)
	at androidx.recyclerview.widget.RecyclerView.onLayout(Unknown Source:5)
	at android.view.View.layout(View.java:23203)
	at android.view.ViewGroup.layout(ViewGroup.java:6412)
	at androidx.constraintlayout.widget.ConstraintLayout.onLayout(Unknown Source:70)
	at android.view.View.layout(View.java:23203)
	at android.view.ViewGroup.layout(ViewGroup.java:6412)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
	at android.view.View.layout(View.java:23203)
	at android.view.ViewGroup.layout(ViewGroup.java:6412)
	at androidx.constraintlayout.widget.ConstraintLayout.onLayout(Unknown Source:70)
	at android.view.View.layout(View.java:23203)
	at android.view.ViewGroup.layout(ViewGroup.java:6412)
	at com.google.android.material.appbar.b.F(Unknown Source:135)
	at com.google.android.material.appbar.c.l(Unknown Source:0)
	at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(Unknown Source:42)
	at android.view.View.layout(View.java:23203)
	at android.view.ViewGroup.layout(ViewGroup.java:6412)
	at androidx.drawerlayout.widget.DrawerLayout.onLayout(Unknown Source:56)
	at android.view.View.layout(View.java:23203)
	at android.view.ViewGroup.layout(ViewGroup.java:6412)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
	at android.view.View.layout(View.java:23203)
	at android.view.ViewGroup.layout(ViewGroup.java:6412)
	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
	at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
	at android.view.View.layout(View.java:23203)
	at android.view.ViewGroup.layout(ViewGroup.java:6412)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
	at android.view.View.layout(View.java:23203)
	at android.view.ViewGroup.layout(ViewGroup.java:6412)
	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
	at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
	at android.view.View.layout(View.java:23203)
	at android.view.ViewGroup.layout(ViewGroup.java:6412)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
	at com.android.internal.policy.DecorView.onLayout(DecorView.java:797)
	at android.view.View.layout(View.java:23203)
	at android.view.ViewGroup.layout(ViewGroup.java:6412)
	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3755)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3205)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2179)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8793)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1037)
	at android.view.Choreographer.doCallbacks(Choreographer.java:845)
	at android.view.Choreographer.doFrame(Choreographer.java:780)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1022)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7870)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

@KalleFornication
Copy link

Same happens on my end; using Google Pixel 5 running CalyxOS v3.7.0, installed openWorkout v1.3.1 (14) from F-Droid. Please let me know if you like any additional information to fix the root cause of this issue - I'm happy to share.

Same here on Pixel 4a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants