You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The app crashes when trying to do an upload using the normal file picker for the first after installation. This happens on the latest main. The second upload seems to correctly take us to the upload screen, though. We should look into fixing this as it is not a good UX to crash upon first upload.
Steps to reproduce
Install the app afresh
Login and try to upload using the normal photo picker
Note the "Access to media" permission request shown
Grant the access
Observe the crash
Expected behaviour
The app should proceed to the upload screen after the permission has been granted.
Actual behaviour
The app crashes with the crash log given below.
Device name
OnePlus Nord
Android version
Android 12
Commons app version
main (does not happen in v5.1.1)
Device logs
android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:9812)
at android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:1942)
at android.view.ViewGroup.invalidateChild(ViewGroup.java:6233)
at android.view.View.invalidateInternal(View.java:18933)
at android.view.View.invalidate(View.java:18889)
at android.view.View.setFlags(View.java:16458)
at android.view.View.setVisibility(View.java:11971)
at fr.free.nrw.commons.upload.UploadActivity.checkStoragePermissions$lambda$7(UploadActivity.kt:302)
at fr.free.nrw.commons.upload.UploadActivity.$r8$lambda$jLDR9mwKVU8obZI0s8ZliP6txEE(Unknown Source:0)
at fr.free.nrw.commons.upload.UploadActivity$$ExternalSyntheticLambda4.run(D8$$SyntheticClass:0)
at java.lang.Thread.run(Thread.java:1012)
I synced with the latest main branch and followed the steps outlined in the issue description, but I’m still unable to reproduce the crash on my device. I’ve tested with a clean installation and different scenarios, but the app behaves as expected.
@sonalyadav1 Perhaps it is device/etc-specific? Maybe better leave the issue to someone who happens to be able to reproduce the issue, if that's OK with you? Thanks for checking!
@nicolas-raoul It’s possible that the issue is device or environment-specific, and since I’m unable to reproduce it on my setup, I’m happy to leave this issue to someone who can replicate it more reliably.
Summary
The app crashes when trying to do an upload using the normal file picker for the first after installation. This happens on the latest
main
. The second upload seems to correctly take us to the upload screen, though. We should look into fixing this as it is not a good UX to crash upon first upload.Steps to reproduce
Expected behaviour
The app should proceed to the upload screen after the permission has been granted.
Actual behaviour
The app crashes with the crash log given below.
Device name
OnePlus Nord
Android version
Android 12
Commons app version
main (does not happen in v5.1.1)
Device logs
Screen-shots
Screen recording to demonstrate the issue
Would you like to work on the issue?
None
The text was updated successfully, but these errors were encountered: