Originally created by @FlamingoDaBird on GitHub (Apr 21, 2022).
Steps to reproduce
Settings, Local media manegement, crashes to desktop (CTD)
Settings - Local Media
New Folder -> media type: books
added a new folder, selected an existing one with lots of audiobooks, also used by the previous app version.
Allow access to the folder? ->Yes
I see a green messagebox at the bottom.. for less than a second--because the app crashes back to the desktop
Next start of the application -> folder assignment is present, but if I scan it, it crashes again.
If I select another folder NOT containing audiobooks (empty folder) it works fine.
if I then select an audiobook to download to that new folder, it crashes to desktop.
Expected behaviour
I presume it should go back to the local media menu?
And also be able to download an audiobook and not crash to desktop :)
Actual behaviour
Instant crash to desktop. Perhaps a OnePlusNord thing again? I'm guessing there's a rewrite to the code for managing downloads that somehow conflicts with OnePlus again :)
--1. Tried this on my old Samsung S8+ (android v9) here I do not have the same issue, it works fine creating a folder (empty)
--2. There'es another bug with Samsung S8+; I could download the file but the app crashed to desktop but there's still an indication that the file is being downloaded in my phone notification area. But when I relaunch the application the file isn't indicated as downloaded. I tried again, same crash.
Environment data
Audiobookshelf Version: 2.0.0
Android App? 0.9.41-beta (apk downloaded from github)
iOS App?
Android Issue
Android version: v11
Device model: OnePlusNord2 (DN2103)
Stock or customized system: Stock, OxygenOS v11.3
Originally created by @FlamingoDaBird on GitHub (Apr 21, 2022).
### Steps to reproduce
Settings, Local media manegement, crashes to desktop (CTD)
1. Settings - Local Media
2. New Folder -> media type: books
3. added a new folder, selected an existing one with lots of audiobooks, also used by the previous app version.
4. Allow access to the folder? ->Yes
5. I see a green messagebox at the bottom.. for less than a second--because the app crashes back to the desktop
6. Next start of the application -> folder assignment is present, but if I scan it, it crashes again.
------------
7. If I select another folder NOT containing audiobooks (empty folder) it works fine.
8. if I then select an audiobook to download to that new folder, it crashes to desktop.
### Expected behaviour
I presume it should go back to the local media menu?
And also be able to download an audiobook and not crash to desktop :)
### Actual behaviour
Instant crash to desktop. Perhaps a OnePlusNord thing again? I'm guessing there's a rewrite to the code for managing downloads that somehow conflicts with OnePlus again :)
--1. Tried this on my old Samsung S8+ (android v9) here I do not have the same issue, it works fine creating a folder (empty)
--2. There'es another bug with Samsung S8+; I could download the file but the app crashed to desktop but there's still an indication that the file is being downloaded in my phone notification area. But when I relaunch the application the file isn't indicated as downloaded. I tried again, same crash.
### Environment data
Audiobookshelf Version: 2.0.0
- [X] Android App? 0.9.41-beta (apk downloaded from github)
- [ ] iOS App?
#### Android Issue
Android version: v11
Device model: OnePlusNord2 (DN2103)
Stock or customized system: Stock, OxygenOS v11.3
adam
added the bug label 2026-04-24 23:06:28 +02:00
I can also confirm this bug on OnePlus 8 Pro.
Running android 11, stock oxygen 11.0.11.IN.11AA
Server version 2.0.0 on Ubuntu 18.04lts
App version 0.9.41-beta pulled from Google store
@cilise commented on GitHub (Apr 22, 2022):
I can also confirm this bug on OnePlus 8 Pro.
Running android 11, stock oxygen 11.0.11.IN.11AA
Server version 2.0.0 on Ubuntu 18.04lts
App version 0.9.41-beta pulled from Google store
Same problem too
Device: Google Pixel 3XL
Android version: 12 stock
Server version: v2.0.0 (docker on Debian based Open Media Vault)
App version: 0.9.41-beta from Play Store
@Grooves1210 commented on GitHub (Apr 22, 2022):
Same problem too
Device: Google Pixel 3XL
Android version: 12 stock
Server version: v2.0.0 (docker on Debian based Open Media Vault)
App version: 0.9.41-beta from Play Store
specifically the call to downloaderCallback as this function is not initialized.
The function registerBroadcastReceiver which should initialize the function never gets called. Removing the two calls to downloaderCallback fixes the crash, but it's hard to tell if the whole function is obsolete or if it did't get adapted to the new downloader.
I hope this helps a little bit
@gebs commented on GitHub (Apr 22, 2022):
I have the same problem
Device: Xiaomi Mi 11 Ultra
Android version: 12 stock
Server version: v2.0.0 (docker on Fedora)
App Verison: 0.9.41-beta
I did some digging because this is my main usecase (downloading audibooks and listening to them)
I think the the probleme is here:
https://github.com/advplyr/audiobookshelf-app/blob/9d6a4675175096603a51ba6b05f09bd7e05e5bcd/android/app/src/main/java/com/audiobookshelf/app/MainActivity.kt#L39-L52
specifically the call to `downloaderCallback` as this function is not initialized.
The function `registerBroadcastReceiver` which should initialize the function never gets called. Removing the two calls to `downloaderCallback` fixes the crash, but it's hard to tell if the whole function is obsolete or if it did't get adapted to the new downloader.
I hope this helps a little bit
@MidnightSnowleopard commented on GitHub (Apr 23, 2022):
Same issue and confirmed from logcat that crash happens right where @gebs pinpointed.
Output from logcat for reference:
04-22 14:07:33.665 26263 26263 E AndroidRuntime: Process: com.audiobookshelf.app, PID: 26263
04-22 14:07:33.665 26263 26263 E AndroidRuntime: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.intent.action.DOWNLOAD_COMPLETE flg=0x10 pkg=com.audiobookshelf.app (has extras) } in com.audiobookshelf.app.MainActivity$broadcastReceiver$1@de65e32
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1640)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:938)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at android.os.Looper.loop(Looper.java:223)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7868)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:981)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: Caused by: kotlin.UninitializedPropertyAccessException: lateinit property downloaderCallback has not been initialized
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at com.audiobookshelf.app.MainActivity.getDownloaderCallback(MainActivity.kt:29)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at com.audiobookshelf.app.MainActivity$broadcastReceiver$1.onReceive(MainActivity.kt:44)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1622)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: ... 8 more
04-22 14:07:33.728 26263 26263 I Process : Sending signal. PID: 26263 SIG: 9```
It is still working better now than pre-2.0. Download starts in download manager and does download the file entirely. App does not acknowledge that the files are successfully downloaded on restart however.
@MidnightSnowleopard commented on GitHub (Apr 23, 2022):
Same issue and confirmed from logcat that crash happens right where @gebs pinpointed.
Output from logcat for reference:
```04-22 14:07:33.665 26263 26263 E AndroidRuntime: FATAL EXCEPTION: main
04-22 14:07:33.665 26263 26263 E AndroidRuntime: Process: com.audiobookshelf.app, PID: 26263
04-22 14:07:33.665 26263 26263 E AndroidRuntime: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.intent.action.DOWNLOAD_COMPLETE flg=0x10 pkg=com.audiobookshelf.app (has extras) } in com.audiobookshelf.app.MainActivity$broadcastReceiver$1@de65e32
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1640)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:938)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at android.os.Looper.loop(Looper.java:223)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7868)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:981)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: Caused by: kotlin.UninitializedPropertyAccessException: lateinit property downloaderCallback has not been initialized
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at com.audiobookshelf.app.MainActivity.getDownloaderCallback(MainActivity.kt:29)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at com.audiobookshelf.app.MainActivity$broadcastReceiver$1.onReceive(MainActivity.kt:44)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1622)
04-22 14:07:33.665 26263 26263 E AndroidRuntime: ... 8 more
04-22 14:07:33.728 26263 26263 I Process : Sending signal. PID: 26263 SIG: 9```
It is still working better now than pre-2.0. Download starts in download manager and does download the file entirely. App does not acknowledge that the files are successfully downloaded on restart however.
Thanks for the logcat, I found the issue and will push it with the update tomorrow. It is what @gebs mentioned and that function is now obsolete so I removed it.
@advplyr commented on GitHub (Apr 23, 2022):
Thanks for the logcat, I found the issue and will push it with the update tomorrow. It is what @gebs mentioned and that function is now obsolete so I removed it.
@TK3D commented on GitHub (Apr 24, 2022):
Issue still persists for me after [b72aba3](https://github.com/advplyr/audiobookshelf-app/commit/b72aba36b821084cbf33a173e8f541d31d3a0ba0)
@cassieesposito commented on GitHub (Apr 24, 2022):
Issue persists for me after updating to 0.9.42-beta
Audiobookshelf Version: 2.0.1 (Edit: 2.02 does not resolve the issue)
Android App: 0.9.42-beta (apk downloaded from github)
Android version: 11
Device model: Moto G7+
Stock or customized system: Custom, Lineage OS 18.1-20220118-NIGHTLY-lake
@cassieesposito commented on GitHub (Apr 24, 2022):
Issue persists for me after updating to 0.9.42-beta
Audiobookshelf Version: 2.0.1 (Edit: 2.02 does not resolve the issue)
Android App: 0.9.42-beta (apk downloaded from github)
Android version: 11
Device model: Moto G7+
Stock or customized system: Custom, Lineage OS 18.1-20220118-NIGHTLY-lake
@MidnightSnowleopard commented on GitHub (Apr 24, 2022):
Issue has been resolved for me for the download portion with 0.9.42-beta and server v2.0.2. Did have to completely uninstall the app first before reinstalling again from the apk for it to take the correct version. Thought the issue was persisting as well till I verified the version in app.
Downloads starts and completes successfully for the audio file. Found issue with not downloading covers successfully #141 and a separate issue where parsing some tags from downloaded files causes the app to hard crash upon completed download or otherwise scan of the file but it does download them now.
Downloaded books still seem to have some issues with one downloaded successfully but containing no metadata of any kind beyond the name with even size simply stating "Invalid bytes".
@MidnightSnowleopard commented on GitHub (Apr 24, 2022):
Issue has been resolved for me for the download portion with 0.9.42-beta and server v2.0.2. Did have to completely uninstall the app first before reinstalling again from the apk for it to take the correct version. Thought the issue was persisting as well till I verified the version in app.
Downloads starts and completes successfully for the audio file. Found issue with not downloading covers successfully #141 and a separate issue where parsing some tags from downloaded files causes the app to hard crash upon completed download or otherwise scan of the file but it does download them now.
Downloaded books still seem to have some issues with one downloaded successfully but containing no metadata of any kind beyond the name with even size simply stating "Invalid bytes".
I don't think it is the same bug though. Now the app downloads the files to internal app storage then moves them to the folder you selected.
I think the error is happening during the file move. If anyone can reproduce that and show a logcat that would be very helpful.
@advplyr commented on GitHub (Apr 29, 2022):
I don't think it is the same bug though. Now the app downloads the files to internal app storage then moves them to the folder you selected.
I think the error is happening during the file move. If anyone can reproduce that and show a logcat that would be very helpful.
@advplyr commented on GitHub (Apr 30, 2022):
[v0.9.43-beta](https://github.com/advplyr/audiobookshelf-app/releases/tag/v0.9.43-beta) is live. It should solve this issue.
@FlamingoDaBird commented on GitHub (Apr 30, 2022):
It seems to work fine now, could even load up my old existing audiobook folder, download and such. Seems to be working fine on my OnePlus Nord2.
Great work! <3
using 2.04 and v0.9.43-beta
@FlamingoDaBird commented on GitHub (Apr 30, 2022):
It seems to work fine now, could even load up my old existing audiobook folder, download and such. Seems to be working fine on my OnePlus Nord2.
Great work! <3
using 2.04 and v0.9.43-beta
Nice! Thanks for the follow up. The next step with that will be matching your existing audiobooks on your device to audiobooks on your server.
@advplyr commented on GitHub (Apr 30, 2022):
Nice! Thanks for the follow up. The next step with that will be matching your existing audiobooks on your device to audiobooks on your server.
@cassieesposito commented on GitHub (Apr 30, 2022):
This is from the aforementioned Lenovo Tab M10 FHD Plus. It appears as though you're correct that the crash is occurring during the move. I think this is the relevant snippet, but if you want more context before and/or after, let me know -- I have it saved.
04-30 08:42:08.905 11901 12039 D AbsDownloader: DOWNLOAD: Attempt move for file at destination file:///storage/emulated/0/Android/data/com.audiobookshelf.app/files/Download/cover.jpg | Android/data/com.audiobookshelf.app/files/Download/cover.jpg
04-30 08:42:08.905 11901 12039 D AbsDownloader: DOWNLOAD: Move file to final destination path: /storage/emulated/0/Download/Audiobooks/Norse Mythology/cover.jpg
04-30 08:42:08.908 7686 10514 I @M_DownloadProviderPluginExt: Enter: getNotificationText --default implement
04-30 08:42:08.929 11901 12039 E AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-2
04-30 08:42:08.929 11901 12039 E AndroidRuntime: Process: com.audiobookshelf.app, PID: 11901
04-30 08:42:08.929 11901 12039 E AndroidRuntime: java.lang.NullPointerException
04-30 08:42:08.929 11901 12039 E AndroidRuntime: at com.audiobookshelf.app.plugins.AbsDownloader.checkDownloads(AbsDownloader.kt:379)
04-30 08:42:08.929 11901 12039 E AndroidRuntime: at com.audiobookshelf.app.plugins.AbsDownloader.access$checkDownloads(AbsDownloader.kt:32)
04-30 08:42:08.929 11901 12039 E AndroidRuntime: at com.audiobookshelf.app.plugins.AbsDownloader$startWatchingDownloads$1.invokeSuspend(AbsDownloader.kt:301)
04-30 08:42:08.929 11901 12039 E AndroidRuntime: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
04-30 08:42:08.929 11901 12039 E AndroidRuntime: at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233)
04-30 08:42:08.929 11901 12039 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594)
04-30 08:42:08.929 11901 12039 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60)
04-30 08:42:08.929 11901 12039 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742)
04-30 08:42:08.941 2060 3911 W ActivityTaskManager: Force finishing activity com.audiobookshelf.app/.MainActivity
04-30 08:42:08.942 2060 12084 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
04-30 08:42:08.938 7686 10514 I chatty : uid=10022(com.android.providers.media) sAsyncHandlerTh identical 9 lines
04-30 08:42:08.941 7686 10514 I @M_DownloadProviderPluginExt: Enter: getNotificationText --default implement
04-30 08:42:08.945 2060 3911 D ApplicationPackageManager: hasSystemFeature android.hardware.type.automotive android.uid.system:1000
04-30 08:42:08.945 2060 3911 D ApplicationPackageManager: hasSystemFeature android.software.picture_in_picture android.uid.system:1000
04-30 08:42:08.949 2060 3911 D PowerHalWrapper: last:com.audiobookshelf.app, next:com.teslacoilsw.launcher
04-30 08:42:08.952 465 490 I libPowerHal: 32: cpu_ctrl set freq: 2301000 -1 1800000 -1
04-30 08:42:08.954 2060 12084 W AES : Exception Log handling...
04-30 08:42:08.954 2060 12084 W AES : Skipped - do not care third party apk
04-30 08:42:08.957 2060 2076 I ActivityManager: Showing crash dialog for package com.audiobookshelf.app u0
@cassieesposito commented on GitHub (Apr 30, 2022):
This is from the aforementioned Lenovo Tab M10 FHD Plus. It appears as though you're correct that the crash is occurring during the move. I think this is the relevant snippet, but if you want more context before and/or after, let me know -- I have it saved.
> 04-30 08:42:08.905 11901 12039 D AbsDownloader: DOWNLOAD: Attempt move for file at destination file:///storage/emulated/0/Android/data/com.audiobookshelf.app/files/Download/cover.jpg | Android/data/com.audiobookshelf.app/files/Download/cover.jpg
> 04-30 08:42:08.905 11901 12039 D AbsDownloader: DOWNLOAD: Move file to final destination path: /storage/emulated/0/Download/Audiobooks/Norse Mythology/cover.jpg
> 04-30 08:42:08.908 7686 10514 I @M_DownloadProviderPluginExt: Enter: getNotificationText --default implement
> 04-30 08:42:08.929 11901 12039 E AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-2
> 04-30 08:42:08.929 11901 12039 E AndroidRuntime: Process: com.audiobookshelf.app, PID: 11901
> 04-30 08:42:08.929 11901 12039 E AndroidRuntime: java.lang.NullPointerException
> 04-30 08:42:08.929 11901 12039 E AndroidRuntime: at com.audiobookshelf.app.plugins.AbsDownloader.checkDownloads(AbsDownloader.kt:379)
> 04-30 08:42:08.929 11901 12039 E AndroidRuntime: at com.audiobookshelf.app.plugins.AbsDownloader.access$checkDownloads(AbsDownloader.kt:32)
> 04-30 08:42:08.929 11901 12039 E AndroidRuntime: at com.audiobookshelf.app.plugins.AbsDownloader$startWatchingDownloads$1.invokeSuspend(AbsDownloader.kt:301)
> 04-30 08:42:08.929 11901 12039 E AndroidRuntime: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
> 04-30 08:42:08.929 11901 12039 E AndroidRuntime: at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233)
> 04-30 08:42:08.929 11901 12039 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594)
> 04-30 08:42:08.929 11901 12039 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60)
> 04-30 08:42:08.929 11901 12039 E AndroidRuntime: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742)
> 04-30 08:42:08.941 2060 3911 W ActivityTaskManager: Force finishing activity com.audiobookshelf.app/.MainActivity
> 04-30 08:42:08.942 2060 12084 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
> 04-30 08:42:08.938 7686 10514 I chatty : uid=10022(com.android.providers.media) sAsyncHandlerTh identical 9 lines
> 04-30 08:42:08.941 7686 10514 I @M_DownloadProviderPluginExt: Enter: getNotificationText --default implement
> 04-30 08:42:08.945 2060 3911 D ApplicationPackageManager: hasSystemFeature android.hardware.type.automotive android.uid.system:1000
> 04-30 08:42:08.945 2060 3911 D ApplicationPackageManager: hasSystemFeature android.software.picture_in_picture android.uid.system:1000
> 04-30 08:42:08.949 2060 3911 D PowerHalWrapper: <amsBoostResume> last:com.audiobookshelf.app, next:com.teslacoilsw.launcher
> 04-30 08:42:08.952 465 490 I libPowerHal: 32: cpu_ctrl set freq: 2301000 -1 1800000 -1
> 04-30 08:42:08.954 2060 12084 W AES : Exception Log handling...
> 04-30 08:42:08.954 2060 12084 W AES : Skipped - do not care third party apk
> 04-30 08:42:08.957 2060 2076 I ActivityManager: Showing crash dialog for package com.audiobookshelf.app u0
That looks to be the relevant bit. Can you test this out by selecting a folder that already exists in the file system by default? I wrote the same thing here #154. I want to see if this is related to you creating a new folder.
@advplyr commented on GitHub (Apr 30, 2022):
That looks to be the relevant bit. Can you test this out by selecting a folder that already exists in the file system by default? I wrote the same thing here #154. I want to see if this is related to you creating a new folder.
@cassieesposito commented on GitHub (Apr 30, 2022):
When I select the default "Downloads" folder, it doesn't crash. Instead I get an error message:
Item download complete but failed to create library item
The relevant logcat is large. I've preprocessed it with grep -v "restricted because of app standby mode" because I'm 99% sure those 2000 lines aren't relevant, but let me know if you want them back in their places.
@cassieesposito commented on GitHub (Apr 30, 2022):
When I select the default "Downloads" folder, it doesn't crash. Instead I get an error message:
> Item download complete but failed to create library item
The relevant logcat is large. I've preprocessed it with grep -v "restricted because of app standby mode" because I'm 99% sure those 2000 lines aren't relevant, but let me know if you want them back in their places.
[abs_logcat_cut.log](https://github.com/advplyr/audiobookshelf-app/files/8597460/abs_logcat_cut.log)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @FlamingoDaBird on GitHub (Apr 21, 2022).
Steps to reproduce
Settings, Local media manegement, crashes to desktop (CTD)
Expected behaviour
I presume it should go back to the local media menu?
And also be able to download an audiobook and not crash to desktop :)
Actual behaviour
Instant crash to desktop. Perhaps a OnePlusNord thing again? I'm guessing there's a rewrite to the code for managing downloads that somehow conflicts with OnePlus again :)
--1. Tried this on my old Samsung S8+ (android v9) here I do not have the same issue, it works fine creating a folder (empty)
--2. There'es another bug with Samsung S8+; I could download the file but the app crashed to desktop but there's still an indication that the file is being downloaded in my phone notification area. But when I relaunch the application the file isn't indicated as downloaded. I tried again, same crash.
Environment data
Audiobookshelf Version: 2.0.0
Android Issue
Android version: v11
Device model: OnePlusNord2 (DN2103)
Stock or customized system: Stock, OxygenOS v11.3
@cilise commented on GitHub (Apr 22, 2022):
I can also confirm this bug on OnePlus 8 Pro.
Running android 11, stock oxygen 11.0.11.IN.11AA
Server version 2.0.0 on Ubuntu 18.04lts
App version 0.9.41-beta pulled from Google store
@Grooves1210 commented on GitHub (Apr 22, 2022):
Same problem too
Device: Google Pixel 3XL
Android version: 12 stock
Server version: v2.0.0 (docker on Debian based Open Media Vault)
App version: 0.9.41-beta from Play Store
@gebs commented on GitHub (Apr 22, 2022):
I have the same problem
Device: Xiaomi Mi 11 Ultra
Android version: 12 stock
Server version: v2.0.0 (docker on Fedora)
App Verison: 0.9.41-beta
I did some digging because this is my main usecase (downloading audibooks and listening to them)
I think the the probleme is here:
https://github.com/advplyr/audiobookshelf-app/blob/9d6a4675175096603a51ba6b05f09bd7e05e5bcd/android/app/src/main/java/com/audiobookshelf/app/MainActivity.kt#L39-L52
specifically the call to
downloaderCallbackas this function is not initialized.The function
registerBroadcastReceiverwhich should initialize the function never gets called. Removing the two calls todownloaderCallbackfixes the crash, but it's hard to tell if the whole function is obsolete or if it did't get adapted to the new downloader.I hope this helps a little bit
@TK3D commented on GitHub (Apr 23, 2022):
Same problem here.
Device: Samsung S22 Ultra
Android version: 12 stock
Server version: v2.0.1 (docker on Ubuntu 21.04)
App Verison: 0.9.41-beta
@MidnightSnowleopard commented on GitHub (Apr 23, 2022):
Same issue and confirmed from logcat that crash happens right where @gebs pinpointed.
Output from logcat for reference:
@advplyr commented on GitHub (Apr 23, 2022):
Thanks for the logcat, I found the issue and will push it with the update tomorrow. It is what @gebs mentioned and that function is now obsolete so I removed it.
@TK3D commented on GitHub (Apr 24, 2022):
Issue still persists for me after b72aba3
@cassieesposito commented on GitHub (Apr 24, 2022):
Issue persists for me after updating to 0.9.42-beta
Audiobookshelf Version: 2.0.1 (Edit: 2.02 does not resolve the issue)
Android App: 0.9.42-beta (apk downloaded from github)
Android version: 11
Device model: Moto G7+
Stock or customized system: Custom, Lineage OS 18.1-20220118-NIGHTLY-lake
@MidnightSnowleopard commented on GitHub (Apr 24, 2022):
Issue has been resolved for me for the download portion with 0.9.42-beta and server v2.0.2. Did have to completely uninstall the app first before reinstalling again from the apk for it to take the correct version. Thought the issue was persisting as well till I verified the version in app.
Downloads starts and completes successfully for the audio file. Found issue with not downloading covers successfully #141 and a separate issue where parsing some tags from downloaded files causes the app to hard crash upon completed download or otherwise scan of the file but it does download them now.
Downloaded books still seem to have some issues with one downloaded successfully but containing no metadata of any kind beyond the name with even size simply stating "Invalid bytes".
@cassieesposito commented on GitHub (Apr 29, 2022):
Bug is resolved with:
Audiobookshelf Version: 2.0.4
Android App: 0.9.43-beta (apk downloaded from github)
Android version: Android 11
Device model: Motorola Moto G7+
Stock or customized system: Lineage OS 18.1
But is still persists with:
Audiobookshelf Version: 2.0.4
Android App: 0.9.43-beta (apk downloaded from github)
Android version: Android 10
Device model: Lenovo Tab M10 FHD Plus
Stock or customized system: Stock
@advplyr commented on GitHub (Apr 29, 2022):
I don't think it is the same bug though. Now the app downloads the files to internal app storage then moves them to the folder you selected.
I think the error is happening during the file move. If anyone can reproduce that and show a logcat that would be very helpful.
@advplyr commented on GitHub (Apr 30, 2022):
v0.9.43-beta is live. It should solve this issue.
@FlamingoDaBird commented on GitHub (Apr 30, 2022):
It seems to work fine now, could even load up my old existing audiobook folder, download and such. Seems to be working fine on my OnePlus Nord2.
Great work! <3
using 2.04 and v0.9.43-beta
@advplyr commented on GitHub (Apr 30, 2022):
Nice! Thanks for the follow up. The next step with that will be matching your existing audiobooks on your device to audiobooks on your server.
@cassieesposito commented on GitHub (Apr 30, 2022):
This is from the aforementioned Lenovo Tab M10 FHD Plus. It appears as though you're correct that the crash is occurring during the move. I think this is the relevant snippet, but if you want more context before and/or after, let me know -- I have it saved.
@advplyr commented on GitHub (Apr 30, 2022):
That looks to be the relevant bit. Can you test this out by selecting a folder that already exists in the file system by default? I wrote the same thing here #154. I want to see if this is related to you creating a new folder.
@cassieesposito commented on GitHub (Apr 30, 2022):
When I select the default "Downloads" folder, it doesn't crash. Instead I get an error message:
The relevant logcat is large. I've preprocessed it with grep -v "restricted because of app standby mode" because I'm 99% sure those 2000 lines aren't relevant, but let me know if you want them back in their places.
abs_logcat_cut.log