File Browser Crashes when trying to select alternative ringtones

Hi, on a new FP3 I have the following problem.

When I try to select a ringtone OR Alarm sound that is not in the default list of sounds, the File Manager app gets spawned. It is in the “recent elements” tab, which is empty.
On trying to select any other folder, the app crashes (freeze), taking the settings app with it.

When I force stop the app, and open the File Manager manually, I can go to the folder where I stored the ringtone/alarm sound normally and play it with a media player, although the app does occasionally freeze randomly when I switch folders a lot, back and forth.

I first thought the issue was caused by a faulty SD card, so I ejected the SD card, removed it and rebooted the phone, but the issue persists even without it.

Is there a way to access any logs to find out what causes these freezes?

Don’t think there are logs but you might try to debug it through adb.
As a first attempt : did you try to clear cache and data of the file manager?

1 Like

Yes, I cleared cache and files of the File Manager. Unfortunately that did not help.

As a work around, I tried to install an alternative file manager from F-Droid.
This was not successful either. Although the alternative file manager works flawlessly (without random crashes) when using it stand-alone, the File Manager system app shipped with the FP3 can not be uninstalled or even deactivated.
When choosing any “file open” activity from the settings app - such as selecting a new alarmtone/ringtone - it will still always launch the preinstalled file manager even if additional file managers are installed. And hang. Can you point me at a good howto, how to use adb to debug this specific situation?

You may have a look at e.g. https://www.hexnode.com/mobile-device-management/help/obtain-android-device-logs-using-windows-and-mac/
The idea is to have the log running (maybe it’s not necessary to write it into a file as mentioned in the linked page) and while reproducing the problem to have a look at errors… (or you write to a file and have logs, as requested above :wink:).

1 Like

I didn’t manage to get anything useful from these logs. The app freezes silently.

I tried to install the file browser app from LineageOS instead. The issue is that the app uses the exact same name com.android.documentsui
pm does not let me install the LineageOS version from
https://www.apkmirror.com/apk/lineageos/files-lineageos/files-2-9-release/
because of the installed system app that cannot be removed:
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.android.documentsui signatures do not match previously installed version; ignoring!]

1 Like

Sorry, if there can be nothing found in log then I can’t help. You might consider to #contactsupport.

I got a breakthrough. As it turns out, there are several side conditions required to trigger the bug.

Requirements for reproduction:

  1. Have a non-root firewall installed (I use NetGuard) that by default does not allow apps to connect to the network/internet that aren’t supposed to.

  2. Have that app enabled to provide a virtual VPN service (WLAN or Mobile Internet don’t need to be activated)

  3. Have the Google drive app installed.

  4. Have either:

  • Internet connectivity currently disallowed for Google Drive/Play Services in NetGuard)
    or
  • Internet itself currently unavailable (no WLAN/Mobile Data at the moment)
  1. Try to import a Ringtone in settings, thus spawning the file manager

  2. Try to change to a different folder (default folder is “recent files” which is usually empty)

The File Manager (com.android.documentsui) includes google drive as a remote/cloud sync location, using the google drive app as the provider/service.

On attempting to change the folder, it asks google drive for a list of files/folders for some reason. This call however does not return until 3 minutes later, when the missing network connection triggers a timeout in the google drive app API function.

The File Browser then freezes until that timeout happens.

Workarounds:

  1. Uninstall Google Drive
    or
  2. Connect to the internet and allow internet access to Google Drive in Firewall
    or
  3. Disable/don’t use a firewall ( BAD OPTION )
    or
  4. Wait >3 minutes in order to import an alarm sound/ring tone for the timeout.
    (One might have to click on “Wait” on the “This application is not responding” dialogue)

Note: it is possible to trigger the bug with repeated folder switches even in the regular UI of the File Manager, too. Same workarounds apply.

3 Likes

I also managed to reproduce the bug using a vanilla Android 9 install on an emulated Google Pixel 3a (using qemu and android studio). So this is definitely a Google bug, not a Fairphone bug. I reported the bug to Google under https://issuetracker.google.com/issues/144639507

There are no 3rd party apps needed to trigger this error, a bad internet connection can trigger it just as good as any non-root firewall.

There seems to be one more workaround:

If one browses into ones own google drive account once within the “Files” app (with firewall disabled, so the actual google drive contents are visible and get cached) the folder contents will be loaded from cache (of the google drive app) and the Files app won’t freeze. I don’t know how long these cache contents remain valid though.

2 Likes