Skip to content

TimeoutException: Failed to acquire SharedMutex lock after app update (Android) #366

@danieeelfc

Description

@danieeelfc

After updating my Flutter app from a previous version to a new version, the PowerSync sync status gets stuck in connecting: true state indefinitely with the following error:

TimeoutException after 0:00:05.000000: Failed to acquire SharedMutex lock

The sync only recovers after the user force-closes and reopens the app.

Steps to Reproduce
Install the previous version of the app
Log in (PowerSync connects successfully)
Update to the new version via Play Store (i'm using play console's internal test)
Open the updated app
Observe sync status stuck in connecting: true with SharedMutex lock error

Expected Behavior
PowerSync should successfully acquire the lock and connect normally after an app update.

Actual Behavior
syncStatus.connecting stays true indefinitely
syncStatus.anyError shows:

TimeoutException after 0:00:05.000000: Failed to acquire SharedMutex lock

Sync only recovers after manually closing and reopening the app

Environment
powersync: ^1.15.2
Flutter: 3.35.7
Platform: Android (may happen on iOS also)
Device: Pixel 8 Pro

Is there a recommended way to handle this scenario (app updates)? Or is it a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions