Skip to content

Desktop fails to start when the user profile path contains non-ASCII characters (x-openscience-directory header) #828

Closed

Description

On Windows with a non-ASCII (here Cyrillic) user name, the desktop app never finishes bootstrapping its default workspace. The sidecar log repeats this every 10 s (user name replaced with sample_user; the real one is Cyrillic):

TypeError: Header 'x-openscience-directory' has invalid value: 'C:\Users\sample_user\AppData\Roaming\@synsci\desktop\workspace'
    at mergeHeaders (tooling/sdk/js/src/gen/client/utils.gen.ts:184:23)
    at mergeConfigs (tooling/sdk/js/src/gen/client/utils.gen.ts:161:20)
    at createClient (tooling/sdk/js/src/gen/client/client.gen.ts:21:17)
    at createOpenScienceClient (tooling/sdk/js/src/client.ts:38:18)
    at <anonymous> (src/plugin/index.ts:63:20)

Version 2.0.145, Windows 11.

Cause. tooling/sdk/js/src/client.ts puts the raw directory into the x-openscience-directory header. Header values must be Latin-1, so any non-ASCII path throws in Headers.set. The v2 client and frontend/workspace/src/utils/openscience-fetch.ts already percent-encode non-ASCII paths, and backend/cli/src/server/project-selection.ts already decodes them. Only the v1 client, which backend/cli/src/plugin/index.ts uses, was missed.

Workaround. Start the app with an ASCII data dir, e.g. openscience.exe --user-data-dir=C:\OpenScienceData. Project folders also need ASCII-only paths until this is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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