[Bug]: Mobile app ignores external progress when playing #936

Open
opened 2026-04-24 23:43:24 +02:00 by adam · 11 comments
Owner

Originally created by @KRSogaard on GitHub (Apr 2, 2024).

Describe the issue

When moving from Web to Mobile decide, the mobile deceive will show the correct progress, but as soon as i click pay it will reset.
This happens to me almost every time i listen to an audiobook and switch device, example last night i was listening to a book up until "2:38:00" on my mobile phone, during the day today i have been listening via the web up until "5:07:02".
When i open my mobile app, it shows the correct time "5:07:02" as the current progress, but as soon as i click pay on the mobile device it resets to "2:38:00" and continues from there. To make the problem worse it "reports" this to set server as the current progress, overwriting my actual progress.

Steps to reproduce the issue

  1. Listen on the mobile app, stop at a give time frame, called X time
  2. Listen on the webapp, stop at any given time frame a little more into the book, called Y time
  3. Open the mobile app, see that the time should match where you left off on the web app, should match Y time
  4. Click pay, see it reset to X time and continue playing from there

Audiobookshelf version

v2.8.1

How are you running audiobookshelf?

Docker, Android App

Originally created by @KRSogaard on GitHub (Apr 2, 2024). ### Describe the issue When moving from Web to Mobile decide, the mobile deceive will show the correct progress, but as soon as i click pay it will reset. This happens to me almost every time i listen to an audiobook and switch device, example last night i was listening to a book up until "2:38:00" on my mobile phone, during the day today i have been listening via the web up until "5:07:02". When i open my mobile app, it shows the correct time "5:07:02" as the current progress, but as soon as i click pay on the mobile device it resets to "2:38:00" and continues from there. To make the problem worse it "reports" this to set server as the current progress, overwriting my actual progress. ### Steps to reproduce the issue 1. Listen on the mobile app, stop at a give time frame, called X time 2. Listen on the webapp, stop at any given time frame a little more into the book, called Y time 3. Open the mobile app, see that the time should match where you left off on the web app, should match Y time 4. Click pay, see it reset to X time and continue playing from there ### Audiobookshelf version v2.8.1 ### How are you running audiobookshelf? Docker, Android App
adam added the bugandroidprogress sync labels 2026-04-24 23:43:24 +02:00
Author
Owner

@nichwall commented on GitHub (Apr 2, 2024):

Did you close the mobile app completely while listening on the web app?

@nichwall commented on GitHub (Apr 2, 2024): Did you close the mobile app completely while listening on the web app?
Author
Owner

@advplyr commented on GitHub (Apr 2, 2024):

Please provide both the server version you have installed and the android app version you have installed. It is also helpful if you provide the android OS version you are using.

Also, it is important to add if you are experiencing this with downloaded books or streaming books or both.

@advplyr commented on GitHub (Apr 2, 2024): Please provide both the server version you have installed and the android app version you have installed. It is also helpful if you provide the android OS version you are using. Also, it is important to add if you are experiencing this with downloaded books or streaming books or both.
Author
Owner

@KRSogaard commented on GitHub (Apr 3, 2024):

I was able to catch it on video today: https://www.youtube.com/shorts/o7nfUfMNsHM
I have been listening on my laptop, and wanted to switch to my mobile. I stopped the playback on the web browser at 7:36:40, i then waited roughly 2 min to make sure the server has been updated.
I then started the screen recording above, You will see that is set the current progress to 7:36:08 (a bit off the 7:36:40 on the web browser but this is ok), i then click the play button and i feel the phone vibrate twice and i see the progress jump back to 6:23:00 the progress i had when i stopped listening on my phone last time.

The android app is the latest from the Google Play store, version 0.9.73-beta, and i am streaming the book.

@KRSogaard commented on GitHub (Apr 3, 2024): I was able to catch it on video today: https://www.youtube.com/shorts/o7nfUfMNsHM I have been listening on my laptop, and wanted to switch to my mobile. I stopped the playback on the web browser at 7:36:40, i then waited roughly 2 min to make sure the server has been updated. I then started the screen recording above, You will see that is set the current progress to 7:36:08 (a bit off the 7:36:40 on the web browser but this is ok), i then click the play button and i feel the phone vibrate twice and i see the progress jump back to 6:23:00 the progress i had when i stopped listening on my phone last time. The android app is the latest from the Google Play store, version 0.9.73-beta, and i am streaming the book.
Author
Owner

@nichwall commented on GitHub (Apr 3, 2024):

Did you completely close the mobile app while you were listening on the computer? The video looks like the player was not closed (this can be done by either closing the player or force closing the app)

If so, this is the same behavior as https://github.com/advplyr/audiobookshelf-app/issues/1146?

@nichwall commented on GitHub (Apr 3, 2024): Did you completely close the mobile app while you were listening on the computer? The video looks like the player was not closed (this can be done by either closing the player or force closing the app) If so, this is the same behavior as https://github.com/advplyr/audiobookshelf-app/issues/1146?
Author
Owner

@advplyr commented on GitHub (Apr 3, 2024):

In this case since the player has correctly synced the progress from the web in real-time using websockets that should not have jumped back like that. I'll look into it

@advplyr commented on GitHub (Apr 3, 2024): In this case since the player has correctly synced the progress from the web in real-time using websockets that should not have jumped back like that. I'll look into it
Author
Owner

@KRSogaard commented on GitHub (Apr 3, 2024):

@nichwall no i did not clock the app fully, it was running in the background. However i have seen it do the same thing when i force close the app first. Also it is clear it got the update from the server as it is a the right place before i push play, so i don't think that is the issue.

@KRSogaard commented on GitHub (Apr 3, 2024): @nichwall no i did not clock the app fully, it was running in the background. However i have seen it do the same thing when i force close the app first. Also it is clear it got the update from the server as it is a the right place before i push play, so i don't think that is the issue.
Author
Owner

@JReming85 commented on GitHub (May 15, 2024):

I can confirm, if you close the app (force close) and reopen it will continue from where the web app is currently at.

History seems to only log the mobile app's progress, as I cant see the option on the browser version but would be great if it could sync both.

Not the biggest of issues, but an annoying QoL request/fix

@JReming85 commented on GitHub (May 15, 2024): I can confirm, if you close the app (force close) and reopen it will continue from where the web app is currently at. History seems to only log the mobile app's progress, as I cant see the option on the browser version but would be great if it could sync both. Not the biggest of issues, but an annoying QoL request/fix
Author
Owner

@Inevitable commented on GitHub (Aug 12, 2024):

Confirming that I also see this behavior; essentially I MUST force stop the Android app, or any progress state on the server is overwritten. This is quite a big annoyance as I move between the two players (web and mobile app) several times a day, and a server-authoritative progress sync was one of the top reasons I was interested in running this service!

@Inevitable commented on GitHub (Aug 12, 2024): Confirming that I also see this behavior; essentially I MUST force stop the Android app, or any progress state on the server is overwritten. This is quite a big annoyance as I move between the two players (web and mobile app) several times a day, and a server-authoritative progress sync was one of the top reasons I was interested in running this service!
Author
Owner

@giejay commented on GitHub (Jan 10, 2026):

I'm using https://github.com/cporcellijr/abs-kosync-bridge/tree/main to sync progress from my KoReader to ABS and vice versa. I'm also experiencing this issue on my Android device (latest version). If I don't force close the app, the push from abs-kosync-bridge to ABS is ignored and not visible in the History. When I force close and re-open, I see the "Sync" item in the history view and the progress is updated correctly.

I will try to build the Android app using the PR from https://github.com/advplyr/audiobookshelf-app/pull/1771 and try to get some more logs. I feel like it should just do another fetch from the server in the onResume() but that might be simplifying it a bit;)

@giejay commented on GitHub (Jan 10, 2026): I'm using https://github.com/cporcellijr/abs-kosync-bridge/tree/main to sync progress from my KoReader to ABS and vice versa. I'm also experiencing this issue on my Android device (latest version). If I don't force close the app, the push from abs-kosync-bridge to ABS is ignored and not visible in the History. When I force close and re-open, I see the "Sync" item in the history view and the progress is updated correctly. I will try to build the Android app using the PR from https://github.com/advplyr/audiobookshelf-app/pull/1771 and try to get some more logs. I feel like it should just do another fetch from the server in the onResume() but that might be simplifying it a bit;)
Author
Owner

@giejay commented on GitHub (Jan 10, 2026):

I have some more information. I'm using the latest develop debug version. It indeed seems to be related to the websocket connection breaking and in the progress of reconnecting, it doesn't fetch the latest state from the server.

Happy scenario, app is opened, I'm changing progress in the web interface:

2026-01-10 11:17:06.012 32147-32147 Capacitor/Console       com.audiobookshelf.app.debug         I  File: http://localhost/_nuxt/1e27aea.js - Line 1 - Msg: [SOCKET] User Item Progress Updated {"id":"bb3dbea5-eab9-4194-b2d9-5be0b8adc708","sessionId":"05cca400-b52a-48ec-a6ec-18e7f3028e64","deviceDescription":"Windows 10 / Firefox","data":{"id":"bb3dbea5-eab9-4194-b2d9-5be0b8adc708","userId":"e3382d9e-1221-4306-bf68-0ac430752ff7","libraryItemId":"834da333-c6a1-4cf3-be74-04c374ec7aa6","episodeId":null,"mediaItemId":"c5c2fd52-3fbd-4daf-9e2f-da9e51c4b682","mediaItemType":"book","duration":33468.65625,"progress":0.3670115642118077,"currentTime":12283.383882379794,"isFinished":false,"hideFromContinueListening":false,"ebookLocation":"epubcfi(/8/6[chapter1]!/4/52/2/18/1:132)","ebookProgress":0.016926797098263356,"lastUpdate":1768040226286,"startedAt":1767730835644,"finishedAt":null}}
2026-01-10 11:17:06.029 32147-32147 Capacitor/Plugin        com.audiobookshelf.app.debug         V  To native (Capacitor plugin): callbackId: 10219625, pluginId: AbsLogger, methodName: info
**2026-01-10 11:17:06.030 32147-32147 Capacitor               com.audiobookshelf.app.debug         V  callback: 10219625, pluginId: AbsLogger, methodName: info, methodData: {"tag":"default","message":"userMediaProgressUpdate: Received updated media progress for current user from socket event. Media item id bb3dbea5-eab9-4194-b2d9-5be0b8adc708"}**
2026-01-10 11:17:06.030 32147-32225 AbsLogger               com.audiobookshelf.app.debug         I  userMediaProgressUpdate: Received updated media progress for current user from socket event. Media item id bb3dbea5-eab9-4194-b2d9-5be0b8adc708
2026-01-10 11:17:06.038 32147-32225 Capacitor/AbsLogger     com.audiobookshelf.app.debug         V  Notifying listeners for event onLog
2026-01-10 11:17:06.038 32147-32225 Capacitor/AbsLogger     com.audiobookshelf.app.debug         D  No listeners found for event onLog
2026-01-10 11:17:06.040 32147-32147 View                    com.audiobookshelf.app.debug         I  setRequestedFrameRate frameRate=-4.0, this=com.getcapacitor.CapacitorWebView{3c19c0b VFEDHVC.. .F...... 0,113-1440,3064 #7f0a0280 app:id/webview aid=1073741824}, caller=android.view.ViewGroup.setRequestedFrameRate:9952 WV.hf.b:1 WV.jg.h:118 WV.jg.onDraw:7 com.android.webview.chromium.WebViewChromium.onDraw:19 
2026-01-10 11:17:06.043 32147-32147 Capacitor/Console       com.audiobookshelf.app.debug         I  File:  - Line 334 - Msg: undefined
2026-01-10 11:17:06.043 32147-32147 Capacitor/Plugin        com.audiobookshelf.app.debug         V  To native (Capacitor plugin): callbackId: 10219626, pluginId: AbsDatabase, methodName: getLocalMediaProgressForServerItem
2026-01-10 11:17:06.043 32147-32147 Capacitor               com.audiobookshelf.app.debug         V  callback: 10219626, pluginId: AbsDatabase, methodName: getLocalMediaProgressForServerItem, methodData: {"libraryItemId":"834da333-c6a1-4cf3-be74-04c374ec7aa6","episodeId":null}
2026-01-10 11:17:06.046 32147-32147 Capacitor/Console       com.audiobookshelf.app.debug         I  File:  - Line 334 - Msg: undefined
2026-01-10 11:17:06.047 32147-32147 Capacitor/Plugin        com.audiobookshelf.app.debug         V  To native (Capacitor plugin): callbackId: 10219627, pluginId: AbsDatabase, methodName: getLocalLibraryItemByLId
2026-01-10 11:17:06.047 32147-32147 Capacitor               com.audiobookshelf.app.debug         V  callback: 10219627, pluginId: AbsDatabase, methodName: getLocalLibraryItemByLId, methodData: {"libraryItemId":"834da333-c6a1-4cf3-be74-04c374ec7aa6"}
2026-01-10 11:17:06.049 32147-32147 Capacitor/Console       com.audiobookshelf.app.debug         I  File:  - Line 334 - Msg: undefined
**2026-01-10 11:17:06.049 32147-32147 Capacitor/Console       com.audiobookshelf.app.debug         I  File: http://localhost/_nuxt/1e27aea.js - Line 1 - Msg: [default] userMediaProgressUpdate no local media progress or lli found for this server item bb3dbea5-eab9-4194-b2d9-5be0b8adc708**

Progress is updated perfectly. But now, the screen of the phone turns off, and after some time:

2026-01-10 11:07:32.650 28024-28024 Capacitor               com.audiobookshelf.app.debug         D  App paused
2026-01-10 11:07:32.658 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug         I  handleAppVisibility mAppVisible = true visible = false
2026-01-10 11:07:32.658 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug         D  visibilityChanged oldVisibility=true newVisibility=false
2026-01-10 11:07:32.676 26438-26438 VRI[MainAc...y]@5d4b4ce com.audiobookshelf.app               I  onDisplayChanged oldDisplayState=2 newDisplayState=1
2026-01-10 11:07:32.718 28024-28044 HWUI                    com.audiobookshelf.app.debug         D  CacheManager::trimMemory(20)
2026-01-10 11:07:32.741 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug         I  Relayout returned: old=(0,0,1440,3120) new=(0,0,1440,3120) relayoutAsync=false req=(1440,3120)8 dur=14 res=0x2 s={false 0x0} ch=true seqId=0
2026-01-10 11:07:32.741 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug         D  Not drawing due to not visible. Reason=!mAppVisible && !mForceDecorViewVisibility
2026-01-10 11:07:32.742 28024-28044 HWUI                    com.audiobookshelf.app.debug         D  CacheManager::trimMemory(20)
2026-01-10 11:07:32.747 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug         I  stopped(true) old = false
2026-01-10 11:07:32.747 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug         D  WindowStopped on com.audiobookshelf.app.debug/com.audiobookshelf.app.MainActivity set to true
2026-01-10 11:07:32.747 28024-28044 HWUI                    com.audiobookshelf.app.debug         D  CacheManager::trimMemory(20)
2026-01-10 11:07:32.760 28024-28024 Capacitor/AppPlugin     com.audiobookshelf.app.debug         D  Firing change: false
2026-01-10 11:07:32.760 28024-28024 Capacitor/AppPlugin     com.audiobookshelf.app.debug         V  Notifying listeners for event appStateChange
2026-01-10 11:07:32.760 28024-28024 Capacitor/AppPlugin     com.audiobookshelf.app.debug         D  No listeners found for event appStateChange
2026-01-10 11:07:32.760 28024-28024 Capacitor               com.audiobookshelf.app.debug         D  App stopped
2026-01-10 11:07:32.761 28024-28024 Capacitor               com.audiobookshelf.app.debug         D  Saving instance state!
2026-01-10 11:07:32.762 28024-28024 Capacitor/Console       com.audiobookshelf.app.debug         I  File: http://localhost/_nuxt/1e27aea.js - Line 1 - Msg: ⛔️ [default] device visibility: does NOT have focus
2026-01-10 11:07:32.766 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug         I  onDisplayChanged oldDisplayState=2 newDisplayState=1
2026-01-10 11:07:32.767 28024-28024 ImeFocusController      com.audiobookshelf.app.debug         I  onPreWindowFocus: skipped hasWindowFocus=false mHasImeFocus=true
2026-01-10 11:07:32.769 28024-28024 ImeFocusController      com.audiobookshelf.app.debug         I  onPostWindowFocus: skipped hasWindowFocus=false mHasImeFocus=true
2026-01-10 11:07:32.784 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug         I  Relayout returned: old=(0,0,1440,3120) new=(0,0,1440,3120) relayoutAsync=false req=(1440,3120)8 dur=5 res=0x2 s={false 0x0} ch=false seqId=0
2026-01-10 11:07:32.785  2254-5644  WindowManager           system_server                        E  win=Window{2b81870 u0 com.audiobookshelf.app.debug/com.audiobookshelf.app.MainActivity} destroySurfaces: appStopped=true cleanupOnResume=false win.mWindowRemovalAllowed=false win.mRemoveOnExit=false win.mViewVisibility=8 caller=com.android.server.wm.ActivityRecord.destroySurfaces:25 com.android.server.wm.ActivityRecord.activityStopped:192 com.android.server.wm.ActivityClientController.activityStopped:97 android.app.IActivityClientController$Stub.onTransact:740 com.android.server.wm.ActivityClientController.onTransact:1 android.os.Binder.execTransactInternal:1462 android.os.Binder.execTransact:1401 
2026-01-10 11:07:37.682 28024-28024 Capacitor/Console       com.audiobookshelf.app.debug         I  File: http://localhost/_nuxt/1e27aea.js - Line 1 - Msg: [SOCKET] Socket Disconnected: transport close
2026-01-10 11:07:38.749 28024-28024 Capacitor/Console       com.audiobookshelf.app.debug         I  File: http://localhost/_nuxt/1e27aea.js - Line 1 - Msg: [SOCKET] Reconnect attempt 1 after 36470ms

the websocket disconnects and doesnt properly reconnect until after I open the screen again:

026-01-10 11:12:39.688 28024-28044 qdgralloc               com.audiobookshelf.app.debug         W  getInterlacedFlag: getMetaData returned 3, defaulting to interlaced_flag = 0
2026-01-10 11:12:39.688 28024-28024 Capacitor/Plugin        com.audiobookshelf.app.debug         V  To native (Capacitor plugin): callbackId: 39314671, pluginId: AbsDatabase, methodName: getAllLocalMediaProgress
2026-01-10 11:12:39.690 28024-28024 Capacitor               com.audiobookshelf.app.debug         V  callback: 39314671, pluginId: AbsDatabase, methodName: getAllLocalMediaProgress, methodData: {}
2026-01-10 11:12:39.697 28024-28024 View                    com.audiobookshelf.app.debug         I  setRequestedFrameRate frameRate=-4.0, this=com.getcapacitor.CapacitorWebView{c1efcf6 VFEDHVC.. .F...... 0,113-1440,3064 #7f0a0280 app:id/webview aid=1073741824}, caller=android.view.ViewGroup.setRequestedFrameRate:9952 WV.hf.b:1 WV.jg.h:118 WV.jg.onDraw:7 com.android.webview.chromium.WebViewChromium.onDraw:19 
2026-01-10 11:12:39.698 28024-28044 qdgralloc               com.audiobookshelf.app.debug         W  getInterlacedFlag: getMetaData returned 3, defaulting to interlaced_flag = 0
2026-01-10 11:12:39.699 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug         I  handleResized, frames=ClientWindowFrames{frame=[0,0][1440,3120] display=[0,0][1440,3120] parentFrame=[0,0][0,0]} displayId=0 dragResizing=false compatScale=1.0 frameChanged=false attachedFrameChanged=false configChanged=false displayChanged=false compatScaleChanged=false dragResizingChanged=false
2026-01-10 11:12:39.706 28024-28024 View                    com.audiobookshelf.app.debug         I  setRequestedFrameRate frameRate=-4.0, this=com.getcapacitor.CapacitorWebView{c1efcf6 VFEDHVC.. .F...... 0,113-1440,3064 #7f0a0280 app:id/webview aid=1073741824}, caller=android.view.ViewGroup.setRequestedFrameRate:9952 WV.hf.b:1 WV.jg.h:118 WV.jg.onDraw:7 com.android.webview.chromium.WebViewChromium.onDraw:19 
2026-01-10 11:12:39.708 28024-28044 qdgralloc               com.audiobookshelf.app.debug         W  getInterlacedFlag: getMetaData returned 3, defaulting to interlaced_flag = 0
2026-01-10 11:12:39.709 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug         D  mThreadedRenderer.initializeIfNeeded()#2 mSurface={isValid=true 0xb400006ea4080e10}
2026-01-10 11:12:39.710 28024-28024 InputMethodManagerUtils com.audiobookshelf.app.debug         D  startInputInner - Id : 0
2026-01-10 11:12:39.710 28024-28024 InputMethodManager      com.audiobookshelf.app.debug         I  startInputInner - IInputMethodManagerGlobalInvoker.startInputOrWindowGainedFocus
2026-01-10 11:12:39.710 28024-28024 InsetsSourceConsumer    com.audiobookshelf.app.debug         I  applyRequestedVisibilityToControl: visible=true, type=statusBars, host=com.audiobookshelf.app.debug/com.audiobookshelf.app.MainActivity
2026-01-10 11:12:39.710 28024-28024 InsetsSourceConsumer    com.audiobookshelf.app.debug         I  applyRequestedVisibilityToControl: visible=true, type=navigationBars, host=com.audiobookshelf.app.debug/com.audiobookshelf.app.MainActivity
2026-01-10 11:12:39.711 28024-28024 InputMethodManager      com.audiobookshelf.app.debug         I  handleMessage: setImeVisibility visible=false
2026-01-10 11:12:39.711 28024-28024 InsetsController        com.audiobookshelf.app.debug         D  hide(ime(), fromIme=false)
2026-01-10 11:12:39.711 28024-28024 ImeTracker              com.audiobookshelf.app.debug         I  com.audiobookshelf.app.debug:a43f295: onCancelled at PHASE_CLIENT_ALREADY_HIDDEN
2026-01-10 11:12:39.712 28024-28038 InputTransport          com.audiobookshelf.app.debug         D  Input channel constructed: 'ClientS', fd=313
**2026-01-10 11:12:42.062 28024-28024 Capacitor/Console       com.audiobookshelf.app.debug         I  File: http://localhost/_nuxt/1e27aea.js - Line 1 - Msg: [SOCKET] Socket Connected DO-EvTiSl-Nrv_KmAAOT
2026-01-10 11:12:42.079 28024-28024 View                    com.audiobookshelf.app.debug         I  setRequestedFrameRate frameRate=-4.0, this=com.getcapacitor.CapacitorWebView{c1efcf6 VFEDHVC.. .F...... 0,113-1440,3064 #7f0a0280 app:id/webview aid=1073741824}, caller=android.view.ViewGroup.setRequestedFrameRate:9952 WV.hf.b:1 WV.jg.h:118 WV.jg.onDraw:7 com.android.webview.chromium.WebViewChromium.onDraw:19 
----> 2026-01-10 11:12:42.095 28024-28024 Capacitor/Console       com.audiobookshelf.app.debug         I  File: http://localhost/_nuxt/1e27aea.js - Line 1 - Msg: [SOCKET] Initial socket data received [object Object]**

But the progress is still at where it was, locally, after the screen turned off. I see this call is being made:

2026-01-10 11:12:39.688 28024-28024 Capacitor/Plugin        com.audiobookshelf.app.debug         V  To native (Capacitor plugin): callbackId: 39314671, pluginId: AbsDatabase, methodName: getAllLocalMediaProgress

But shouldn't it also fetch the latest state from the server, like it's (assumption) doing on boot-up of the app? After I force close the app and open it again, progress is where it should be.

@giejay commented on GitHub (Jan 10, 2026): I have some more information. I'm using the latest develop debug version. It indeed seems to be related to the websocket connection breaking and in the progress of reconnecting, it doesn't fetch the latest state from the server. Happy scenario, app is opened, I'm changing progress in the web interface: ``` 2026-01-10 11:17:06.012 32147-32147 Capacitor/Console com.audiobookshelf.app.debug I File: http://localhost/_nuxt/1e27aea.js - Line 1 - Msg: [SOCKET] User Item Progress Updated {"id":"bb3dbea5-eab9-4194-b2d9-5be0b8adc708","sessionId":"05cca400-b52a-48ec-a6ec-18e7f3028e64","deviceDescription":"Windows 10 / Firefox","data":{"id":"bb3dbea5-eab9-4194-b2d9-5be0b8adc708","userId":"e3382d9e-1221-4306-bf68-0ac430752ff7","libraryItemId":"834da333-c6a1-4cf3-be74-04c374ec7aa6","episodeId":null,"mediaItemId":"c5c2fd52-3fbd-4daf-9e2f-da9e51c4b682","mediaItemType":"book","duration":33468.65625,"progress":0.3670115642118077,"currentTime":12283.383882379794,"isFinished":false,"hideFromContinueListening":false,"ebookLocation":"epubcfi(/8/6[chapter1]!/4/52/2/18/1:132)","ebookProgress":0.016926797098263356,"lastUpdate":1768040226286,"startedAt":1767730835644,"finishedAt":null}} 2026-01-10 11:17:06.029 32147-32147 Capacitor/Plugin com.audiobookshelf.app.debug V To native (Capacitor plugin): callbackId: 10219625, pluginId: AbsLogger, methodName: info **2026-01-10 11:17:06.030 32147-32147 Capacitor com.audiobookshelf.app.debug V callback: 10219625, pluginId: AbsLogger, methodName: info, methodData: {"tag":"default","message":"userMediaProgressUpdate: Received updated media progress for current user from socket event. Media item id bb3dbea5-eab9-4194-b2d9-5be0b8adc708"}** 2026-01-10 11:17:06.030 32147-32225 AbsLogger com.audiobookshelf.app.debug I userMediaProgressUpdate: Received updated media progress for current user from socket event. Media item id bb3dbea5-eab9-4194-b2d9-5be0b8adc708 2026-01-10 11:17:06.038 32147-32225 Capacitor/AbsLogger com.audiobookshelf.app.debug V Notifying listeners for event onLog 2026-01-10 11:17:06.038 32147-32225 Capacitor/AbsLogger com.audiobookshelf.app.debug D No listeners found for event onLog 2026-01-10 11:17:06.040 32147-32147 View com.audiobookshelf.app.debug I setRequestedFrameRate frameRate=-4.0, this=com.getcapacitor.CapacitorWebView{3c19c0b VFEDHVC.. .F...... 0,113-1440,3064 #7f0a0280 app:id/webview aid=1073741824}, caller=android.view.ViewGroup.setRequestedFrameRate:9952 WV.hf.b:1 WV.jg.h:118 WV.jg.onDraw:7 com.android.webview.chromium.WebViewChromium.onDraw:19 2026-01-10 11:17:06.043 32147-32147 Capacitor/Console com.audiobookshelf.app.debug I File: - Line 334 - Msg: undefined 2026-01-10 11:17:06.043 32147-32147 Capacitor/Plugin com.audiobookshelf.app.debug V To native (Capacitor plugin): callbackId: 10219626, pluginId: AbsDatabase, methodName: getLocalMediaProgressForServerItem 2026-01-10 11:17:06.043 32147-32147 Capacitor com.audiobookshelf.app.debug V callback: 10219626, pluginId: AbsDatabase, methodName: getLocalMediaProgressForServerItem, methodData: {"libraryItemId":"834da333-c6a1-4cf3-be74-04c374ec7aa6","episodeId":null} 2026-01-10 11:17:06.046 32147-32147 Capacitor/Console com.audiobookshelf.app.debug I File: - Line 334 - Msg: undefined 2026-01-10 11:17:06.047 32147-32147 Capacitor/Plugin com.audiobookshelf.app.debug V To native (Capacitor plugin): callbackId: 10219627, pluginId: AbsDatabase, methodName: getLocalLibraryItemByLId 2026-01-10 11:17:06.047 32147-32147 Capacitor com.audiobookshelf.app.debug V callback: 10219627, pluginId: AbsDatabase, methodName: getLocalLibraryItemByLId, methodData: {"libraryItemId":"834da333-c6a1-4cf3-be74-04c374ec7aa6"} 2026-01-10 11:17:06.049 32147-32147 Capacitor/Console com.audiobookshelf.app.debug I File: - Line 334 - Msg: undefined **2026-01-10 11:17:06.049 32147-32147 Capacitor/Console com.audiobookshelf.app.debug I File: http://localhost/_nuxt/1e27aea.js - Line 1 - Msg: [default] userMediaProgressUpdate no local media progress or lli found for this server item bb3dbea5-eab9-4194-b2d9-5be0b8adc708** ``` Progress is updated perfectly. But now, the screen of the phone turns off, and after some time: ``` 2026-01-10 11:07:32.650 28024-28024 Capacitor com.audiobookshelf.app.debug D App paused 2026-01-10 11:07:32.658 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug I handleAppVisibility mAppVisible = true visible = false 2026-01-10 11:07:32.658 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug D visibilityChanged oldVisibility=true newVisibility=false 2026-01-10 11:07:32.676 26438-26438 VRI[MainAc...y]@5d4b4ce com.audiobookshelf.app I onDisplayChanged oldDisplayState=2 newDisplayState=1 2026-01-10 11:07:32.718 28024-28044 HWUI com.audiobookshelf.app.debug D CacheManager::trimMemory(20) 2026-01-10 11:07:32.741 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug I Relayout returned: old=(0,0,1440,3120) new=(0,0,1440,3120) relayoutAsync=false req=(1440,3120)8 dur=14 res=0x2 s={false 0x0} ch=true seqId=0 2026-01-10 11:07:32.741 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug D Not drawing due to not visible. Reason=!mAppVisible && !mForceDecorViewVisibility 2026-01-10 11:07:32.742 28024-28044 HWUI com.audiobookshelf.app.debug D CacheManager::trimMemory(20) 2026-01-10 11:07:32.747 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug I stopped(true) old = false 2026-01-10 11:07:32.747 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug D WindowStopped on com.audiobookshelf.app.debug/com.audiobookshelf.app.MainActivity set to true 2026-01-10 11:07:32.747 28024-28044 HWUI com.audiobookshelf.app.debug D CacheManager::trimMemory(20) 2026-01-10 11:07:32.760 28024-28024 Capacitor/AppPlugin com.audiobookshelf.app.debug D Firing change: false 2026-01-10 11:07:32.760 28024-28024 Capacitor/AppPlugin com.audiobookshelf.app.debug V Notifying listeners for event appStateChange 2026-01-10 11:07:32.760 28024-28024 Capacitor/AppPlugin com.audiobookshelf.app.debug D No listeners found for event appStateChange 2026-01-10 11:07:32.760 28024-28024 Capacitor com.audiobookshelf.app.debug D App stopped 2026-01-10 11:07:32.761 28024-28024 Capacitor com.audiobookshelf.app.debug D Saving instance state! 2026-01-10 11:07:32.762 28024-28024 Capacitor/Console com.audiobookshelf.app.debug I File: http://localhost/_nuxt/1e27aea.js - Line 1 - Msg: ⛔️ [default] device visibility: does NOT have focus 2026-01-10 11:07:32.766 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug I onDisplayChanged oldDisplayState=2 newDisplayState=1 2026-01-10 11:07:32.767 28024-28024 ImeFocusController com.audiobookshelf.app.debug I onPreWindowFocus: skipped hasWindowFocus=false mHasImeFocus=true 2026-01-10 11:07:32.769 28024-28024 ImeFocusController com.audiobookshelf.app.debug I onPostWindowFocus: skipped hasWindowFocus=false mHasImeFocus=true 2026-01-10 11:07:32.784 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug I Relayout returned: old=(0,0,1440,3120) new=(0,0,1440,3120) relayoutAsync=false req=(1440,3120)8 dur=5 res=0x2 s={false 0x0} ch=false seqId=0 2026-01-10 11:07:32.785 2254-5644 WindowManager system_server E win=Window{2b81870 u0 com.audiobookshelf.app.debug/com.audiobookshelf.app.MainActivity} destroySurfaces: appStopped=true cleanupOnResume=false win.mWindowRemovalAllowed=false win.mRemoveOnExit=false win.mViewVisibility=8 caller=com.android.server.wm.ActivityRecord.destroySurfaces:25 com.android.server.wm.ActivityRecord.activityStopped:192 com.android.server.wm.ActivityClientController.activityStopped:97 android.app.IActivityClientController$Stub.onTransact:740 com.android.server.wm.ActivityClientController.onTransact:1 android.os.Binder.execTransactInternal:1462 android.os.Binder.execTransact:1401 2026-01-10 11:07:37.682 28024-28024 Capacitor/Console com.audiobookshelf.app.debug I File: http://localhost/_nuxt/1e27aea.js - Line 1 - Msg: [SOCKET] Socket Disconnected: transport close 2026-01-10 11:07:38.749 28024-28024 Capacitor/Console com.audiobookshelf.app.debug I File: http://localhost/_nuxt/1e27aea.js - Line 1 - Msg: [SOCKET] Reconnect attempt 1 after 36470ms ``` the websocket disconnects and doesnt properly reconnect until after I open the screen again: ``` 026-01-10 11:12:39.688 28024-28044 qdgralloc com.audiobookshelf.app.debug W getInterlacedFlag: getMetaData returned 3, defaulting to interlaced_flag = 0 2026-01-10 11:12:39.688 28024-28024 Capacitor/Plugin com.audiobookshelf.app.debug V To native (Capacitor plugin): callbackId: 39314671, pluginId: AbsDatabase, methodName: getAllLocalMediaProgress 2026-01-10 11:12:39.690 28024-28024 Capacitor com.audiobookshelf.app.debug V callback: 39314671, pluginId: AbsDatabase, methodName: getAllLocalMediaProgress, methodData: {} 2026-01-10 11:12:39.697 28024-28024 View com.audiobookshelf.app.debug I setRequestedFrameRate frameRate=-4.0, this=com.getcapacitor.CapacitorWebView{c1efcf6 VFEDHVC.. .F...... 0,113-1440,3064 #7f0a0280 app:id/webview aid=1073741824}, caller=android.view.ViewGroup.setRequestedFrameRate:9952 WV.hf.b:1 WV.jg.h:118 WV.jg.onDraw:7 com.android.webview.chromium.WebViewChromium.onDraw:19 2026-01-10 11:12:39.698 28024-28044 qdgralloc com.audiobookshelf.app.debug W getInterlacedFlag: getMetaData returned 3, defaulting to interlaced_flag = 0 2026-01-10 11:12:39.699 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug I handleResized, frames=ClientWindowFrames{frame=[0,0][1440,3120] display=[0,0][1440,3120] parentFrame=[0,0][0,0]} displayId=0 dragResizing=false compatScale=1.0 frameChanged=false attachedFrameChanged=false configChanged=false displayChanged=false compatScaleChanged=false dragResizingChanged=false 2026-01-10 11:12:39.706 28024-28024 View com.audiobookshelf.app.debug I setRequestedFrameRate frameRate=-4.0, this=com.getcapacitor.CapacitorWebView{c1efcf6 VFEDHVC.. .F...... 0,113-1440,3064 #7f0a0280 app:id/webview aid=1073741824}, caller=android.view.ViewGroup.setRequestedFrameRate:9952 WV.hf.b:1 WV.jg.h:118 WV.jg.onDraw:7 com.android.webview.chromium.WebViewChromium.onDraw:19 2026-01-10 11:12:39.708 28024-28044 qdgralloc com.audiobookshelf.app.debug W getInterlacedFlag: getMetaData returned 3, defaulting to interlaced_flag = 0 2026-01-10 11:12:39.709 28024-28024 VRI[MainAc...y]@a94b534 com.audiobookshelf.app.debug D mThreadedRenderer.initializeIfNeeded()#2 mSurface={isValid=true 0xb400006ea4080e10} 2026-01-10 11:12:39.710 28024-28024 InputMethodManagerUtils com.audiobookshelf.app.debug D startInputInner - Id : 0 2026-01-10 11:12:39.710 28024-28024 InputMethodManager com.audiobookshelf.app.debug I startInputInner - IInputMethodManagerGlobalInvoker.startInputOrWindowGainedFocus 2026-01-10 11:12:39.710 28024-28024 InsetsSourceConsumer com.audiobookshelf.app.debug I applyRequestedVisibilityToControl: visible=true, type=statusBars, host=com.audiobookshelf.app.debug/com.audiobookshelf.app.MainActivity 2026-01-10 11:12:39.710 28024-28024 InsetsSourceConsumer com.audiobookshelf.app.debug I applyRequestedVisibilityToControl: visible=true, type=navigationBars, host=com.audiobookshelf.app.debug/com.audiobookshelf.app.MainActivity 2026-01-10 11:12:39.711 28024-28024 InputMethodManager com.audiobookshelf.app.debug I handleMessage: setImeVisibility visible=false 2026-01-10 11:12:39.711 28024-28024 InsetsController com.audiobookshelf.app.debug D hide(ime(), fromIme=false) 2026-01-10 11:12:39.711 28024-28024 ImeTracker com.audiobookshelf.app.debug I com.audiobookshelf.app.debug:a43f295: onCancelled at PHASE_CLIENT_ALREADY_HIDDEN 2026-01-10 11:12:39.712 28024-28038 InputTransport com.audiobookshelf.app.debug D Input channel constructed: 'ClientS', fd=313 **2026-01-10 11:12:42.062 28024-28024 Capacitor/Console com.audiobookshelf.app.debug I File: http://localhost/_nuxt/1e27aea.js - Line 1 - Msg: [SOCKET] Socket Connected DO-EvTiSl-Nrv_KmAAOT 2026-01-10 11:12:42.079 28024-28024 View com.audiobookshelf.app.debug I setRequestedFrameRate frameRate=-4.0, this=com.getcapacitor.CapacitorWebView{c1efcf6 VFEDHVC.. .F...... 0,113-1440,3064 #7f0a0280 app:id/webview aid=1073741824}, caller=android.view.ViewGroup.setRequestedFrameRate:9952 WV.hf.b:1 WV.jg.h:118 WV.jg.onDraw:7 com.android.webview.chromium.WebViewChromium.onDraw:19 ----> 2026-01-10 11:12:42.095 28024-28024 Capacitor/Console com.audiobookshelf.app.debug I File: http://localhost/_nuxt/1e27aea.js - Line 1 - Msg: [SOCKET] Initial socket data received [object Object]** ``` But the progress is still at where it was, locally, after the screen turned off. I see this call is being made: ``` 2026-01-10 11:12:39.688 28024-28024 Capacitor/Plugin com.audiobookshelf.app.debug V To native (Capacitor plugin): callbackId: 39314671, pluginId: AbsDatabase, methodName: getAllLocalMediaProgress ``` But shouldn't it also fetch the latest state from the server, like it's (assumption) doing on boot-up of the app? After I force close the app and open it again, progress is where it should be.
Author
Owner

@giejay commented on GitHub (Jan 10, 2026):

I tried my best in fixing it: https://github.com/advplyr/audiobookshelf-app/pull/1777. For me it works at least but I'm hoping I did not break anything else now:)

@giejay commented on GitHub (Jan 10, 2026): I tried my best in fixing it: https://github.com/advplyr/audiobookshelf-app/pull/1777. For me it works at least but I'm hoping I did not break anything else now:)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#936