audiobookshelf-app icon indicating copy to clipboard operation
audiobookshelf-app copied to clipboard

App Crashes just by loading Library

Open SimonFischer04 opened this issue 11 months ago • 5 comments

Steps to reproduce

  1. open app
  2. connect to server 3.try to open "Library" tab

Expected behaviour

App should not crash

Actual behaviour

App crashes

Environment data

Audiobookshelf Version:

  • [X] Android App?

Android Issue

Android version: 14

Device model: Pixel 6 Pro

Stock or customized system: Graphene os

crash logs (full log attached):

type: crash osVersion: google/raven/raven:14/UQ1A.240205.002/2024022800:user/release-keys package: com.audiobookshelf.app:103 process: com.audiobookshelf.app processUptime: 7692 + 235 ms installer: com.aurora.store

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at com.getcapacitor.Bridge.lambda$callPluginMethod$0(Bridge.java:806) at com.getcapacitor.Bridge.$r8$lambda$ehFTi5f4HhVNFKTbCKAYDkpQYRA(Unknown Source:0) at com.getcapacitor.Bridge$$ExternalSyntheticLambda3.run(Unknown Source:8) at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.os.HandlerThread.run(HandlerThread.java:67) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at com.getcapacitor.PluginHandle.invoke(PluginHandle.java:138) at com.getcapacitor.Bridge.lambda$callPluginMethod$0(Bridge.java:797) ... 7 more Caused by: java.lang.OutOfMemoryError: Failed to allocate a 137511512 byte allocation with 82124544 free bytes and 78MB until OOM, target footprint 536870912, growth limit 536870912 at java.lang.StringFactory.newStringFromUtf16Bytes(Native Method) at java.lang.StringUTF16.newString(StringUTF16.java:1141) at java.lang.StringBuilder.toString(StringBuilder.java:475) at org.json.JSONStringer.toString(JSONStringer.java:443) at org.json.JSONObject.toString(JSONObject.java:703) at com.audiobookshelf.app.server.ApiHandler.postRequest(ApiHandler.kt:56) at com.audiobookshelf.app.server.ApiHandler.sendSyncLocalSessions(ApiHandler.kt:334) at com.audiobookshelf.app.plugins.AbsDatabase$syncLocalSessionsWithServer$1.invoke(AbsDatabase.kt:230) at com.audiobookshelf.app.plugins.AbsDatabase$syncLocalSessionsWithServer$1.invoke(AbsDatabase.kt:225) at com.audiobookshelf.app.server.ApiHandler.syncLocalMediaProgressForUser(ApiHandler.kt:362) at com.audiobookshelf.app.plugins.AbsDatabase.syncLocalSessionsWithServer(AbsDatabase.kt:225) ... 10 more Audiobookshelf log 7d715113ebe8.txt

SimonFischer04 avatar Mar 01 '24 20:03 SimonFischer04

I don't understand why this says OutOfMemory, i definitely have plenty RAM left on my phone: still breaks with fresh reboot and no other app open, but can open plenty of outher apps without problem.

App worked perfectly fine previously. Did something change with (how much) syncing with server happens recently?

Also just to try it out / debug this: just tried installing the old v0.9.71-beta apk from the github release but unfortuneatly trying to install this just says "App not installed as package appears to be invalid."

SimonFischer04 avatar Mar 01 '24 20:03 SimonFischer04

I don't know if someone is uploading the latest APKs to the aurora app store so maybe you have some other version? I never heard of that app store before.

What version is your server?

advplyr avatar Mar 01 '24 21:03 advplyr

I don't know if someone is uploading the latest APKs to the aurora app store

For simplicity: basically just another frontend, apps are pulled from playstore.

you have some other version?

no I have latest:

  • app: 0.9.72-beta
  • server: v2.8.0 (docker)

SimonFischer04 avatar Mar 01 '24 21:03 SimonFischer04

I am also using the same app version from the same app store, along with the same server version and docker setup - I don't get crashes when connecting to ABS either over wifi direct, or via internet through a clourflared tunnel.

I have had crashes related to connection, although I wasn't paying enough attention at the time to be able to describe the sequence of events here that may have caused it - sorry. :man_shrugging:

I'll come back with an update (create an issue and link it) when I have more useful details.

DavidPesticcio avatar Mar 01 '24 22:03 DavidPesticcio

I have had crashes related to connection

Oh, interesting. Maybe it has to do with connection for me also, because i often have to click the server multiple times before its able to connect

Sry forgot to include in first comment, but also probably worth mentioning. I have quite a big library: one podcast with ~530 episodes. Maybe it tries to sync to much here?

SimonFischer04 avatar Mar 02 '24 06:03 SimonFischer04

Oh, interesting. Maybe it has to do with connection for me also, because i often have to click the server multiple times before its able to connect

Fixed my network connectivity issues, but unfortunately still crashes.

SimonFischer04 avatar Mar 14 '24 18:03 SimonFischer04

Just wanted to try to debug this issue more by running the app in Android Studio. After not crashing there, I decided to completely uninstall and reinstall the app from the store. This apparently fixed it, so I guess some weird appdata caching or something like that...

Thanks for trying to help and creating such an amazing project 👍

SimonFischer04 avatar Mar 17 '24 14:03 SimonFischer04