Bug 407289 - KDEConnect crashes upon trying to 'Add storage location' from 'Filesystem expose settings'
Summary: KDEConnect crashes upon trying to 'Add storage location' from 'Filesystem exp...
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: android-application (show other bugs)
Version: unspecified
Platform: Android Linux
: NOR crash
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-07 11:51 UTC by Josh
Modified: 2023-09-22 07:45 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Logcat captured my MatLog after filtering for KDEConnect (6.76 KB, text/plain)
2019-05-07 11:51 UTC, Josh
Details
Logcat of KDE Connect (v 1.12.9) crashing when adding storage location (70.01 KB, text/plain)
2019-06-26 15:18 UTC, Josh
Details
Logcat of KDEConnect (24.45 KB, text/x-log)
2022-03-28 15:16 UTC, jonathmschaefer
Details
logcat of KDE Connect (67.75 KB, text/plain)
2022-08-28 22:55 UTC, nastyagrifon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Josh 2019-05-07 11:51:46 UTC
Created attachment 119884 [details]
Logcat captured my MatLog after filtering for KDEConnect

SUMMARY
KDEConnect instantly crashes when trying to add storage locations.


STEPS TO REPRODUCE
1. Click on 'Filesystem expose', tap 'OK'
2. Click on "Add storage location", in the resulting menu :
3. Click on the greyed out 'Storage Location'

OBSERVED RESULT
KDEConnect crashes

EXPECTED RESULT
KDEConnect shouldn't crash but should allow me to select my Internal Storage.

SOFTWARE/OS VERSIONS
Manjaro - KDE
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.3

ADDITIONAL INFORMATION
Android 9 / Pie
Comment 1 Josh 2019-05-07 11:53:51 UTC
Bug reported for KDEConnect version 1.12.7
Comment 2 Josh 2019-06-26 15:18:10 UTC
Created attachment 121165 [details]
Logcat of KDE Connect (v 1.12.9) crashing when adding storage location

I've been hoping that updates to KDE Connect will fix the problem but sadly, this problem continues even on the latest version of KDE Connect (v 1.12.9).

Android 9 / Pie
Steps to reproduce :
Open KDE Connect
Tap on 'Filesystem expose', click OK
Tap on 'Add storage location'
Tap on 'Storage location / click to select'
CRASHES.
Comment 3 unlogic 2019-07-06 22:13:52 UTC
(In reply to Josh from comment #2)
> Created attachment 121165 [details]
> Logcat of KDE Connect (v 1.12.9) crashing when adding storage location
> 
> I've been hoping that updates to KDE Connect will fix the problem but sadly,
> this problem continues even on the latest version of KDE Connect (v 1.12.9).
> 
> Android 9 / Pie
> Steps to reproduce :
> Open KDE Connect
> Tap on 'Filesystem expose', click OK
> Tap on 'Add storage location'
> Tap on 'Storage location / click to select'
> CRASHES.

@Josh
Just a heads-up.
I've had same issue, but now it works fine.
F-Droid repository contain 2 versions of KDE connect, both named 1.12.9, you need to try out a build 11292.
Comment 4 PeterS 2019-09-23 14:13:16 UTC
SUMMARY
KDEConnect instantly crashes when trying to add storage locations.


STEPS TO REPRODUCE
1. Click on 'Filesystem expose', tap 'OK'
2. Click on "Add storage location", in the resulting menu :
3. Click on the greyed out 'Storage Location'
4. Chose a location, click 'Select', tap 'OK'


OBSERVED RESULT
KDEConnect crashes, disconnects phone from PC, immediately relaunches, but I have to connect it to PC again.

EXPECTED RESULT
KDEConnect shouldn't crash but finish the procedure.

SOFTWARE/OS VERSIONS
KDE Connect 1.13.1

ADDITIONAL INFORMATION
Android 6.0
Comment 5 PeterS 2019-09-25 14:44:27 UTC
(In reply to PeterS from comment #4)
> SUMMARY
> KDEConnect instantly crashes when trying to add storage locations.
> 
> 
> STEPS TO REPRODUCE
> 1. Click on 'Filesystem expose', tap 'OK'
> 2. Click on "Add storage location", in the resulting menu :
> 3. Click on the greyed out 'Storage Location'
> 4. Chose a location, click 'Select', tap 'OK'
> 
> 
> OBSERVED RESULT
> KDEConnect crashes, disconnects phone from PC, immediately relaunches, but I
> have to connect it to PC again.
> 
> EXPECTED RESULT
> KDEConnect shouldn't crash but finish the procedure.
> 
> SOFTWARE/OS VERSIONS
> KDE Connect 1.13.1
> 
> ADDITIONAL INFORMATION
> Android 6.0

Fixed in 1.13.2, thank you!
Comment 6 Antonio Bragatto 2020-04-10 20:10:28 UTC
I have to confirm that this bug still exist in KDE Connect 1.13.7 on OnePlus 5T with OxygenOS 9.0.11 (Android 9.0)
Comment 7 Jens Radloff 2020-04-24 18:07:24 UTC
I have a similar problem on my LG K50s smartphone with Android 9 Pie:

Whenever I want to define a storage location within KDE Connect (downloaded from within F-DROID; KDE Connect currently has version 1.14.1), I cannot define a storage location via "Filesystem expose" > "Add storage location" and the greyed-out field "Select": The next message tells me "No Elements", and I cannot select a storage location.

Although I have activated in the general Settings App > General > Apps & Messages > App Info > KDE Connect > Rights > the "Storage" option.

This behaviour also occured in KDE-Connect version 1.13.1. This was the first version I had installed on my smartphone.
Comment 8 Jens Radloff 2020-05-01 12:20:46 UTC
(In reply to prox from comment #7)
> I have a similar problem on my LG K50s smartphone with Android 9 Pie:
> 
> Whenever I want to define a storage location within KDE Connect (downloaded
> from within F-DROID; KDE Connect currently has version 1.14.1), I cannot
> define a storage location via "Filesystem expose" > "Add storage location"
> and the greyed-out field "Select": The next message tells me "No Elements",
> and I cannot select a storage location.

Additional information: And having tried to select a new storage location, I cannot create a new folder via the three-dot-icon at the top in the right corner: The menu entry "New folder" is greyed.
Comment 9 Jens Radloff 2020-05-02 12:58:36 UTC
Update to comments #7 and #8:

I managed to define a storage location within Kdeconnect. Now it is the home directory in my smartphone. 

I did not notice the burger or sandwich symbol at the top in the left corner in the "Storage location" screen, where I could now define a storage location (maybe it this burger or sandwich symbol wasn't there before because I formerly had deactivated certain Google apps, which I just have activated again). 

But now a new behaviour: When I open the Kde-Connect app, the option "Filesystem expose" is not displayed any more. So I cannot change the storage location. And I cannot see it within the Kdeconnect app.

And I still cannot establish a connection in Dolphin (KDE being part of Debian 10.3 on my computer) with my smartphone. Dolphin tells me that the filesystem of the device (here: my smartphone) cannot get mounted.

The Kdeconnect app on my smartphone now has version 14.1.2
Comment 10 Jens Radloff 2020-05-04 15:01:19 UTC
I just noticed that I can now access my smartphone via Kdeconnect from my Debian (KDE) box using Dolphin. Probably a reboot of my Debian machine was necessary to make this possible. I did not restart my smartphone yet.
Comment 11 jonathmschaefer 2022-03-28 15:16:28 UTC
I think the problem might stem from using non standard filemanagers? Issue still persists for me, i'll attach my logcat. Android 10 / Kdeconnect 1.19.1
Comment 12 jonathmschaefer 2022-03-28 15:16:59 UTC
Created attachment 147793 [details]
Logcat of KDEConnect
Comment 13 Himprakash Deka 2022-06-19 17:38:14 UTC
I can reproduce the same issue with some changes.

STEPS TO REPRODUCE
1. Install KDE connect in Linux desktop and Android and pair them.
2. Enable `Filesystem expose` from Plugin settings in the Android app.
3. An entry `Filesystem expose` appears below the heading, `Some plugins have features disabled because of lack of permission (tap for more):`. Tap the `Filesystem expose` entry.
4. `To access files remotely you have to configure storage locations` appears in a popup titled `Filesystem expose`.
  Tap `OK` in the popup.
5. The view refreshes to `Configured storage locations`. Tap the `+ Add storage location` entry.
6. New popup titled `Add storage location` pops up with a drop down menu labeled `storage location` and a text input field labeled `Display name`. Tap the drop down menu.

OBSERVED RESULT
The app either

Crashes with Android System's `KDE Connect keeps stopping` popup. On restarting the app, it displays the text `The paired device is not reachable. Make sure it is connected to your same network.` and transitions very quickly without any user interaction to the current paired device screen. This transition happens as soon as the app is opened and is so quick that it is not possible to read the the specified text without pausing a screenrecorded session.

NOTE: My Desktop is connected via WiFi to my Android device's WiFi hotspot.

or

Returns to the current paired device screen with the same text as above displayed very quickly in between the transition. It is so quick that it is not possible to read the the text without pausing a screenrecorded session.

EXPECTED RESULT
Let the use choose a location from the drop down menu. Or if the process is wrong, display the error message properly and don't crash.

SOFTWARE/OS VERSIONS
Windows: none
macOS: none
Linux/KDE Plasma:
(available in About System)
KDE Plasma Version:  5.25.0
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.4

ADDITIONAL INFORMATION
KDE Connect Android app version: 1.19.1
Comment 14 nastyagrifon 2022-08-28 22:50:58 UTC
Can confirm the bug still happens on Google Pixel 3a (sargo) running Android 12L. KDE Connect crashes when adding storage locations.

Both submitted logs, as well as mine, indicate that KDE Connect app request for DocumentsUI (or DocumentsUIGoogle). When KDE Connect finds no app that can handle the .OPEN_DOCUMENT_TREE intent, it crashes. 

>FATAL EXCEPTION: main
>Process: org.kde.kdeconnect_tp, PID: 18964
>android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.OPEN_DOCUMENT_TREE }

DocumentsUI *should be* included with every Android version since Android 10 according to documentation. Apparently it's not. Are there any other methods of accessing storage? App already requests  READ_EXTERNAL_STORAGE and  WRITE_EXTERNAL_STORAGE. Is OPEN_DOCUMENT_TREE actually better in any way?
Comment 15 nastyagrifon 2022-08-28 22:55:27 UTC
Created attachment 151671 [details]
logcat of KDE Connect

adding my log in case it helps
Comment 16 Himprakash Deka 2023-02-19 02:41:35 UTC
As pointed out by @nastyagrifon, it was due to a package named "com.google.android.documentsui" being uninstalled or disabled. This package is the file/folder chooser used by KDE Connect and many other apps. This bug can be reproduced by uninstalling or disabling that package. After restoring or installing that package though, the bug is solved.

However, KDE Connect should still not crash and instead ask the user which app to use for choosing the folder or at least show an error message that the package is not present.
Comment 17 Jaume 2023-06-07 22:18:44 UTC
Thankyou
How do you install documentysui on android 13?
Comment 18 Albert Vaca Cintora 2023-09-22 07:45:19 UTC
documentsui is no longer needed in Android 13, since we now get access to the whole filesystem so no file picker is used.