wavetermdev / waveterm

An open-source, cross-platform terminal for seamless workflows
https://www.waveterm.dev
Apache License 2.0
4.04k stars 97 forks source link

Concurrent multi-user not supported #369

Open pptheberge opened 7 months ago

pptheberge commented 7 months ago

It doesn't seem possible to run waveterm concurrently with different users.

  1. Start waveterm with one user.
  2. Change to a different OS user
  3. Start waveterm

The app starts as a black window. Looking in the dev console, this error message is repeated multiple times

WaveTerm v0.6.3 20240220-021439
get-client-data:1 

       Failed to load resource: the server responded with a status of 500 (Internal Server Error)
model.ts:4614 [error] calling get-client-data Error: Bad status code response from fetch 'http://127.0.0.1:1619/api/get-client-data': code=500 Internal Server Error
x-authkey header is invalid
    at util.ts:39:15

We often have dev processes running with one user and switch to a different user for testing reasons. It's possible to alter the test workflow to sandbox things differently using remote connects but this prevents the tool from being a drop-in replacement for the standard terminal.

Desktop (please complete the following information):

sawka commented 7 months ago

Thanks for submitting. This came up as a hypothetical in Discord and we did some brainstorming. Now that it isn't hypothetical anymore we can work on the solution. Our thought was to use a random port in the "dynamic range" (49152 to 65535). Then we can communicate that port to the frontend (via some other mechanism, like a file). That should allow for multiple copies of wave to run as different users.