Failed setup creates key that blocks user creation
Problem
When running fission setup, if you attempt to sign up as a username that already exists, it creates a key.
But then, trying to create a user fails.
To reproduce:
Run fission setup, sign up as a username that exists, then try and sign up as one that doesn't exist.
Impact
User can't create an account.
Solution
Workaround: delete the key at ~/.config/fission/key/machine_id.ed25519
Actual solution is to either put the key somewhere in a temp file, and don't actually copy it into place until the username / account is successfully registered.
- MacOS Catalina
- fission-cli 2.9.0.0
Hmm, trickier? I deleted the key while still in setup flow, then got 🚫 Unknown Error Please try again or contact Fission support at https://fission.codes
Now, trying to register borisfission is showing that it already exists. OK, something subtle in this flow.
Picked a new username, registered no problem.
Two options:
- Create a temp directory, and change the go-ipfs prefix during setup
- Use a
bracketorResourceTto clean up in the case of a failure