Bug 432368

Summary: KDE Connect Android app can't receive the file on Android 10 by default
Product: [Applications] kdeconnect Reporter: valdikss
Component: android-applicationAssignee: Albert Vaca Cintora <albertvaka>
Status: RESOLVED DUPLICATE    
Severity: normal CC: heri+kde, lubimov.maxim+kde
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Android   
OS: Android 10.x   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: The screenshot of path configuration

Description valdikss 2021-02-01 00:22:25 UTC
SUMMARY
It seems that Android 10 changed storage access, making KDE connect unable to receive sent files to default "/storage/emulated/0/Download" path. It fails with error, the following is seen in logcat:

    1-26 18:54:55.564  6617 13058 W DocumentFile: Failed to createFile: java.io.IOException: Permission denied
    01-26 18:54:55.565  6617 13058 E Shareplugin: Error receiving file
    01-26 18:54:55.565  6617 13058 E Shareplugin: java.lang.RuntimeException: Cannot create file boarding-pass.pdf
    01-26 18:54:55.565  6617 13058 E Shareplugin:  at org.kde.kdeconnect.Plugins.SharePlugin.CompositeReceiveFileJob.getDocumentFileFor(CompositeReceiveFileJob.java:267)
    01-26 18:54:55.565  6617 13058 E Shareplugin:  at org.kde.kdeconnect.Plugins.SharePlugin.CompositeReceiveFileJob.run(CompositeReceiveFileJob.java:140)
    01-26 18:54:55.565  6617 13058 E Shareplugin:  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
    01-26 18:54:55.565  6617 13058 E Shareplugin:  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    01-26 18:54:55.565  6617 13058 E Shareplugin:  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    01-26 18:54:55.565  6617 13058 E Shareplugin:  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    01-26 18:54:55.565  6617 13058 E Shareplugin:  at java.lang.Thread.run(Thread.java:919)

When I tick "Customize destination directory" checkbox and select Download path, the path is shown as "/tree/primary:Download" (check the attachment screenshot).
This way it works perfectly fine, the file is received successfully.


STEPS TO REPRODUCE
1. Install KDE Connect on Android 10 smartphone
2. Pair the devices, try to send any file to the smartphone


OBSERVED RESULT
The file could not be received with an error.

EXPECTED RESULT
The file is received successfully.


SOFTWARE/OS VERSIONS
Android 10, KDE Connect Android 1.16.0 from F-Droid.
Comment 1 valdikss 2021-02-01 00:23:06 UTC
Created attachment 135340 [details]
The screenshot of path configuration
Comment 2 2wxsy58236r3 2021-02-27 12:42:10 UTC

*** This bug has been marked as a duplicate of bug 431000 ***