Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate old config file without api_server #178

Open
Dominiquini opened this issue May 9, 2024 · 5 comments
Open

migrate old config file without api_server #178

Dominiquini opened this issue May 9, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Dominiquini
Copy link

Running on Windows PowerShell 7.4.2 inside Windows Terminal:
If I run "PowerSession.exe auth"
This error occurs ($env:RUST_BACKTRACE="full"):

thread 'main' panicked at src\commands\api\asciinema.rs:38:82:
called `Result::unwrap()` on an `Err` value: Error("missing field `api_server`", line: 1, column: 53)
stack backtrace:
   0:     0x7ff6a74e912a - <unknown>
   1:     0x7ff6a75045bb - <unknown>
   2:     0x7ff6a74e4a11 - <unknown>
   3:     0x7ff6a74e8eaa - <unknown>
   4:     0x7ff6a74eb64a - <unknown>
   5:     0x7ff6a74eb2b8 - <unknown>
   6:     0x7ff6a74ebcfe - <unknown>
   7:     0x7ff6a74ebbed - <unknown>
   8:     0x7ff6a74e9b19 - <unknown>
   9:     0x7ff6a74eb8f0 - <unknown>
  10:     0x7ff6a7519205 - <unknown>
  11:     0x7ff6a7519664 - <unknown>
  12:     0x7ff6a72898ce - <unknown>
  13:     0x7ff6a728a916 - <unknown>
  14:     0x7ff6a72ac046 - <unknown>
  15:     0x7ff6a72973f6 - <unknown>
  16:     0x7ff6a72a244c - <unknown>
  17:     0x7ff6a74de128 - <unknown>
  18:     0x7ff6a72adf9c - <unknown>
  19:     0x7ff6a750bbfc - <unknown>
  20:     0x7ffb741f7344 - BaseThreadInitThunk
  21:     0x7ffb75fe26b1 - RtlUserThreadStart

Thanks.

@ibigbug
Copy link
Member

ibigbug commented May 10, 2024

did you by any chance edit the config.json in the $APP_FOLDER/PowerSession/ ?

@Dominiquini
Copy link
Author

config.json

I don't have this file! I downloaded the 'PowerSession.exe' for the releases page (https://github.com/Watfaq/PowerSession-rs/releases/tag/v0.1.11) and put it on a folder indexed by "$env:PATH"!

Thanks.

@ibigbug
Copy link
Member

ibigbug commented May 10, 2024

that's weird.

do you have anything here C:\Users\YOUR_USERNAME\AppData\Roaming\PowerSession

if not can you create a config.json with content

{"install_id":"d9870be7-bd89-4b53-844a-07b9746b8790","api_server":"https://asciinema.org"}

@Dominiquini
Copy link
Author

that's weird.

do you have anything here C:\Users\YOUR_USERNAME\AppData\Roaming\PowerSession

if not can you create a config.json with content

{"install_id":"d9870be7-bd89-4b53-844a-07b9746b8790","api_server":"https://asciinema.org"}

I already have this file, but it contains:
{"install_id":"285d7599-d8eb-4786-ba3d-622dd68f733b"}

I added the 'api_server' key and now it works!
Maybe my config file was broken because I used the older version of PowerSession (https://github.com/Watfaq/PowerSession) and this new version don't fix the file!
I think you can close this issue, but I thing that this bug will appear if someone was migrating from the older version!

Thanks

@ibigbug
Copy link
Member

ibigbug commented May 10, 2024

yeah good point. glad you solved it!

@ibigbug ibigbug changed the title Unable to authenticate migrate old config file without api_server May 10, 2024
@ibigbug ibigbug added the bug Something isn't working label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants