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

Unable to upload story post with a video on some Android 13 and 14 devices #743

Open
zwarm opened this issue Dec 2, 2023 · 1 comment
Open
Labels
[Type] Blocking Bug The app doesn't stop, but the user can't complete a journey or use a feature.

Comments

@zwarm
Copy link

zwarm commented Dec 2, 2023

Multiple issues when trying to create a story post with video using Android 13 or Android 14

Tested on: Android 13, Samsung S20, Jetpack App 23.7.1

Steps to recreate on Android 13 using Jetpack 23.7.1

  1. Install the latest Jetpack version on a device running Android 13.

  2. Log in and navigate to "My Site."

  3. Tap the FAB and select "Story Post."

  4. Follow prompts on the initial pages.

  5. Select "Allow" when prompted, "Jetpack needs permission to access your photos and videos."

  6. Select "Allow" when the pop-up shows, "Allow Jetpack to access photos and videos on this device."

  7. On the "Choose Media" view, tap the images icon in the bottom tab bar.

  8. Tap "Choose video from this device."

  9. Select a video and "Add" it.

  10. On the image optimization pop-up, tap "Leave Off."
    Issue: The story post closes, and you are navigated back to the "My Site" view with the "Set reminders" bottom sheet shown.

  11. Retry by tapping the FAB and select "Story Post."

  12. On the "Choose Media" view, tap the images icon in the bottom tab bar.

  13. Tap "Choose video from this device."

  14. Select a video and "Add" it (Note: The Image optimization pop-up will not be shown again).

  15. The video should load, and the story preview is shown.

  16. Publish your story by tapping the "->" in the upper right-hand corner.

  17. Give your story a title and tap "Publish Now."

  18. You will be navigated back to the "My Site" view, where a snackbar will be shown alerting you there was an error uploading your video with an action to "manage" it.

Manage It Flow:

  1. Tap the "Manage" action on the snackbar (be fast, it doesn't stay on screen long).
    Issue: Note there are multiple error message pop-ups "Unable to save 1 slide" and "An error occurred while playing your video."
  2. Retry the action.
    Issue: The retry will fail. The only way out is to discard the story.

Do Not Manage It Flow:

  1. Do not tap on the "Manage" action in the snackbar.
  2. Navigate to "Posts > Drafts."
  3. Find the story you just created, right-click on the context menu, and tap "Publish."
    Issue: The story will be published, but it will not include the video.
    If you tap "edit" the post context menu instead of "publish," the post draft will not contain the video.

Tested on Android 14, Android Pixel 5 - See video
Video: https://github.com/Automattic/stories-android/assets/506707/8dc790ce-b389-47e0-8c7f-9f31281ac3a0

@zwarm zwarm added the [Type] Blocking Bug The app doesn't stop, but the user can't complete a journey or use a feature. label Dec 2, 2023
@zwarm
Copy link
Author

zwarm commented Dec 2, 2023

Additional Log Info

  • Private data accessed. Operation: android:read_media_video
  • Private data accessed. Operation: android:read_media_images
at android.os.Parcel.createExceptionOrNull(Parcel.java:3057)
at android.os.Parcel.createException(Parcel.java:3041)
at android.os.Parcel.readException(Parcel.java:3024)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:495)
at android.content.ContentResolver.query(ContentResolver.java:1229)
at android.content.ContentResolver.query(ContentResolver.java:1161)
at android.content.ContentResolver.query(ContentResolver.java:1117)
at org.wordpress.android.util.MediaUtils.getDataColumn(MediaUtils.java:530)
at org.wordpress.android.util.MediaUtils.getPath(MediaUtils.java:430)
at org.wordpress.android.util.MediaUtils.getRealPathFromURI(MediaUtils.java:401)
at org.wordpress.android.util.MediaUtilsWrapper.getRealPathFromURI(MediaUtilsWrapper.kt:23)
at org.wordpress.android.ui.posts.editor.media.OptimizeMediaUseCase.optimizeMedia(OptimizeMediaUseCase.kt:46)
at org.wordpress.android.ui.posts.editor.media.OptimizeMediaUseCase.access$optimizeMedia(OptimizeMediaUseCase.kt:20)
at org.wordpress.android.ui.posts.editor.media.OptimizeMediaUseCase$optimizeMediaIfSupportedAsync$2$1$1.invokeSuspend(OptimizeMediaUseCase.kt:34)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Failed to get type for: content://media/picker/0/com.android.providers.media.photopicker/media/1000000893 (Calling uid ( 11346 does not have permission to access picker uri: content://media/picker/0/com.android.providers.media.photopicker/media/1000000893)
Error reading _data column for URI: content://media/picker/0/com.android.providers.media.photopicker/media/1000000893
                                                                       java.lang.SecurityException: Calling uid ( 11346 ) does not have permission to access picker uri: content://media/picker/0/com.android.providers.media.photopicker/media/1000000893
at android.os.Parcel.createExceptionOrNull(Parcel.java:3057)
at android.os.Parcel.createException(Parcel.java:3041)
at android.os.Parcel.readException(Parcel.java:3024)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:495)
at android.content.ContentResolver.query(ContentResolver.java:1229)
at android.content.ContentResolver.query(ContentResolver.java:1161)
at android.content.ContentResolver.query(ContentResolver.java:1117)
at org.wordpress.android.util.MediaUtils.getDataColumn(MediaUtils.java:530)
at org.wordpress.android.util.MediaUtils.getPath(MediaUtils.java:430)
at org.wordpress.android.util.MediaUtils.getRealPathFromURI(MediaUtils.java:401)
at org.wordpress.android.util.MediaUtilsWrapper.getRealPathFromURI(MediaUtilsWrapper.kt:23)
at org.wordpress.android.ui.posts.editor.media.OptimizeMediaUseCase.optimizeMedia(OptimizeMediaUseCase.kt:46)
at org.wordpress.android.ui.posts.editor.media.OptimizeMediaUseCase.access$optimizeMedia(OptimizeMediaUseCase.kt:20)
at org.wordpress.android.ui.posts.editor.media.OptimizeMediaUseCase$optimizeMediaIfSupportedAsync$2$1$1.invokeSuspend(OptimizeMediaUseCase.kt:34)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

@zwarm zwarm changed the title Unable to upload story post with a video in Android 13 and 14 Unable to upload story post with a video on some Android 13 and 14 devices Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Blocking Bug The app doesn't stop, but the user can't complete a journey or use a feature.
Projects
None yet
Development

No branches or pull requests

1 participant