[Bug]: Watcher/ 'Missing" #3261

Open
opened 2026-04-25 00:14:36 +02:00 by adam · 2 comments
Owner

Originally created by @keenan-fullbleed on GitHub (Mar 11, 2026).

What happened?

on a watcher event, if fs.pathExists(fullPath) is false once, it immediately marks the item missing

Problematic when network/cloud mounted drives have intermittent connectivity: Restoring a title from a missing state requires deep interventions.

What did you expect to happen?

Watcher reports actual current status of files

Steps to reproduce the issue

  1. Mount a network/cloud storage drive
  2. disconnect from the drive and wait for a title to show as 'Missing'
  3. reconnect drive to same mount.

Audiobookshelf version

v2.32.1

How are you running audiobookshelf?

Built from source

What OS is your Audiobookshelf server hosted from?

Windows

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Chrome for Android

Logs


Additional Notes

No response

Originally created by @keenan-fullbleed on GitHub (Mar 11, 2026). ### What happened? on a watcher event, if fs.pathExists(fullPath) is false once, it immediately marks the item missing Problematic when network/cloud mounted drives have intermittent connectivity: Restoring a title from a missing state requires deep interventions. ### What did you expect to happen? Watcher reports actual current status of files ### Steps to reproduce the issue 1. Mount a network/cloud storage drive 2. disconnect from the drive and wait for a title to show as 'Missing' 3. reconnect drive to same mount. ### Audiobookshelf version v2.32.1 ### How are you running audiobookshelf? Built from source ### What OS is your Audiobookshelf server hosted from? Windows ### If the issue is being seen in the UI, what browsers are you seeing the problem on? Chrome for Android ### Logs ```shell ``` ### Additional Notes _No response_
adam added the bug label 2026-04-25 00:14:36 +02:00
Author
Owner

@nichwall commented on GitHub (Mar 11, 2026):

The watcher relies on file system events, it doesn't really work with network file systems. You will probably have a better experience using Automatic Library Scans.

@nichwall commented on GitHub (Mar 11, 2026): The watcher relies on file system events, it doesn't really work with network file systems. You will probably have a better experience using Automatic Library Scans.
Author
Owner

@keenan-fullbleed commented on GitHub (Mar 11, 2026):

I was using that but it was failing.
I added a retry-based existence check for watcher-triggered scans only:

WATCHER_PATH_EXISTS_RETRIES = 4
WATCHER_PATH_EXISTS_RETRY_DELAY_MS = 2000
new helper pathExistsWithRetries()
scanFilesChanged() now calls scanFolderUpdates(..., { cautiousMissingCheck: true })
scanFolderUpdates() uses the retry helper before deciding an item/file-update group is actually gone

@keenan-fullbleed commented on GitHub (Mar 11, 2026): I was using that but it was failing. I added a retry-based existence check for watcher-triggered scans only: WATCHER_PATH_EXISTS_RETRIES = 4 WATCHER_PATH_EXISTS_RETRY_DELAY_MS = 2000 new helper pathExistsWithRetries() scanFilesChanged() now calls scanFolderUpdates(..., { cautiousMissingCheck: true }) scanFolderUpdates() uses the retry helper before deciding an item/file-update group is actually gone
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3261