Skip to content

bug: startupPref seesaw bug — engine and server can't both work simultaneously #1235

@pedrohx26

Description

@pedrohx26

Summary

OpenWork has multiple startup modes controlled by overlapping localStorage keys (startupPref, engineRuntime, engineSource, modePref). When these are set incorrectly or inconsistently, only one of the engine or the server connection works — never both. Switching between modes leaves stale keys that conflict with the new mode.

To Reproduce

  1. Launch OpenWork — works correctly with startupPref=local
  2. UI (or an update) changes startupPref to server
  3. Restart OpenWork — engine doesn't start, server connection fails
  4. Change back to local — stale engineSource / modePref keys conflict
  5. Neither engine nor server works reliably

Expected behavior

  • Startup mode changes should be atomic — all related keys updated together
  • If the configured mode fails, OpenWork should fall back gracefully
  • Conflicting/stale localStorage keys should be cleaned up automatically
  • Ideally, reduce the number of overlapping keys that control the same behavior

Actual behavior

Engine and server enter a seesaw state: fixing one breaks the other. Stale keys from previous modes persist and cause silent conflicts. The user has no visibility into which keys are wrong or how to fix them.

OW version & Desktop info

  • OpenWork: 0.11.194-1 (AUR)
  • OS: Arch Linux x86_64

Additional context

Workaround: force stable preferences on every launch via direct localStorage manipulation:

UPDATE ItemTable SET value=X'6c006f00630061006c00' WHERE key='openwork.startupPref';      -- "local"
UPDATE ItemTable SET value=X'640069007200650063007400' WHERE key='openwork.engineRuntime';  -- "direct"
DELETE FROM ItemTable WHERE key IN ('openwork.engineSource', 'openwork.modePref', 'openwork_mode_pref');

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