question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upload semi-failure for image without EXIF, reproducible 100%

See original GitHub issue

Steps to reproduce

  1. Install Scrambled EXIF app
  2. Choose a picture worth uploading to Commons, share it to Scrambled EXIF, then share the result to Commons
  3. Enter a caption, press Next
  4. A popup No location found appears, press Skip
  5. A popup Problems found in image appears, press Upload
  6. Select a correct depiction, category, license, and send

Expected behaviour

Upload should succeed

Actual behaviour

There are two thumbnails, one uploaded and one failed, as seen below (I uploaded only once “Restaurant […]” picture):

adb

Android version

8

Commons app version

master

Would you like to work on the issue?

Prefer not

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:17 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
JustinLiang522commented, May 22, 2022

According to the Logcat, a SecurityException is raised when the picture is not uploaded by a process whose uid=10100 (the UID of the preinstalled photo app). I think the issue arises because the common apps deny permission when uploading photos directly from apps other than the system photo app, such as ExifEarser and Scrambled EXIF.

2022-05-22 13:52:27.661 6035-6140/fr.free.nrw.commons E/UploadWorker: java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.impl.MediaContentProvider from ProcessRecord{2b135d1 6035:fr.free.nrw.commons/u0a136} (pid=6035, uid=10136) that is not exported from UID 10100
        at android.os.Parcel.createException(Parcel.java:1950)
        at android.os.Parcel.readException(Parcel.java:1918)
        at android.os.Parcel.readException(Parcel.java:1868)
        at android.app.IActivityManager$Stub$Proxy.getContentProvider(IActivityManager.java:4185)
        at android.app.ActivityThread.acquireProvider(ActivityThread.java:6019)
        at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2592)
        at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1829)
        at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1443)
        at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1296)
        at android.content.ContentResolver.openInputStream(ContentResolver.java:1016)
        at fr.free.nrw.commons.upload.worker.UploadWorker.saveIntoUploadedStatus(UploadWorker.kt:421)
        at fr.free.nrw.commons.upload.worker.UploadWorker.saveCompletedContribution(UploadWorker.kt:413)
        at fr.free.nrw.commons.upload.worker.UploadWorker.uploadContribution(UploadWorker.kt:313)
        at fr.free.nrw.commons.upload.worker.UploadWorker.access$uploadContribution(UploadWorker.kt:48)
        at fr.free.nrw.commons.upload.worker.UploadWorker$doWork$2$invokeSuspend$$inlined$map$1$2.emit(Collect.kt:148)
        at kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$3.collect(SafeCollector.common.kt:115)
        at fr.free.nrw.commons.upload.worker.UploadWorker$doWork$2$invokeSuspend$$inlined$map$1.collect(SafeCollector.common.kt:114)
        at kotlinx.coroutines.flow.FlowKt__CollectKt.collect(Collect.kt:30)
        at kotlinx.coroutines.flow.FlowKt.collect(Unknown Source:1)
        at fr.free.nrw.commons.upload.worker.UploadWorker$doWork$2.invokeSuspend(UploadWorker.kt:218)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
     Caused by: android.os.RemoteException: Remote stack trace:
        at com.android.server.am.ActivityManagerService.getContentProviderImpl(ActivityManagerService.java:12276)
        at com.android.server.am.ActivityManagerService.getContentProvider(ActivityManagerService.java:12683)
        at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:358)
        at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3297)
        at android.os.Binder.execTransact(Binder.java:731)
2022-05-22 13:52:27.661 6035-6140/fr.free.nrw.commons E/UploadWorker: Upload from stash failed for contribution : mouse.jpg
0reactions
nicolas-raoulcommented, May 30, 2022

Actually, the SHA will not be inserted into the uploaded_table if the upload fails. It will just be in the contribution table.

Ah, then it is good, thanks! 😃 I was afraid that the picture could appear as “uploaded already” in the custom selector UI, despite not really having been uploaded successfully.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove EXIF data from JPG using PHP - Stack Overflow
1. Use $res = imagecreatefromjpeg($filename) to load the image, then imagejpeg ($res, $filename, QUALITY) , put 100 to Quality - the loss, if...
Read more >
EXIF being stripped | Apple Developer Forums
It appears all EXIF data is stripped, and I see no option in any settings to avoid this. If you UPLOAD a photo...
Read more >
Stripping sensitive EXIF data from uploaded images
A basic approach to removing sensitive information. Luckily, removing sensitive EXIF data is not too difficult to do. This post leverages Python ...
Read more >
There is no EXIF infomation when I take picture on Samsung ...
The output image has no EXIF imformation. EXPECTED RESULTS: The output image has EXIF imformation. REPRODUCIBILITY: (5 of 5, 1 of 100, etc)...
Read more >
What You Need to Know About Exif Data - Consumer Reports
If you upload pictures to Craigslist, Facebook, Imgur, Instagram, Twitter, or WhatsApp, the Exif data won't be available to the people who ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found