tier
tier copied to clipboard
tier connect hangs
What is the issue?
Running tier connect just hangs on the terminal without completing.
$ tier -v connect
tierDEBUG: background: inBackground=false
tierDEBUG: tier: profile not found
Tier connect instructions:
1. Take a mental note of the following code:
...
2. Follow this link and verify the above code:
...
3. Return here and continue using Tier.
The followed url to stripe appears to be successful, following the prompt, stripe says "successful you can close this window", etc.
Steps to reproduce
- Run
tier connect - Follow the instructions
- Wait and wait and wait and wait... I give up :)
Are there any recent changes that introduced the issue?
No response
OS
macOS
OS version
13.2.1 (22D68)
Tier version
Whatever go install ...@latest installed
I was no able to reproduce this.
Is it possible you have something blocking network calls?
I'lll try and debug the code and find out. The way the code is written though, I think does result in an infinite loop, because the context is never used inside the loop or checked for.
Repros pretty quickly and easily here, no signs of any network calls being blocked.
Am I doing something wrong? I'm just running:
tier connect
And following the insturctions.
But as I said the function fetchProfile() https://github.com/tierrun/tier/blob/78939e21ab51293b23e7f182881a76d3f1f489e9/cmd/tier/connect.go#L92-L108 is defective here as:
- The loop never ends if the error condition is constant
- The timeout context is never checked for in the loop
@prologic,
What is the output of tier whoami?
Do you have any STRIPE_ or TIER_ envs set? If so, please unset them and try again.
Do you have a tier.state file present? If so, try again in a fresh directory or remove the tier.state file.
If none of the above apply, please try rm -rf ~/.config/tier/ and try again.
What is the output of
tier whoami?
$ tier whoami
tier: There was an error looking up your Stripe API Key: profile not found
tier: Please run `tier connect` to connect your Stripe account
Do you have any
STRIPE_orTIER_envs set? If so, please unset them and try again.
$ env | grep -i -E '(stripe|tier)' | tee | wc -l
0
$ ls -lah .state ls: cannot access '.state': No such file or directory
> Do you have a `tier.state` file present? If so, try again in a fresh directory or remove the tier.state file.
>
> If none of the above apply, please try `rm -rf ~/.config/tier/` and try again.
I did have a `~/.config/tier` which I deleted and the same result. Hangs.
I even turned off my network-wide adblocker. Same results. Just hagns.
@prologic Using the stripe CLI, Are you able to successfully complete stripe login using the same account?
Looks like using the stripe CLI also fails with the same message :/
$ stripe login
Your pairing code is: xxx-xxx
This pairing code verifies your authentication with Stripe.
Press Enter to open the browser or visit https://dashboard.stripe.com/stripecli/confirm_auth?t=xxx (^C to quit)
⡿ Waiting for confirmation...unexpected http status code: 400 {"error":{"message":"The livemode of the authorization key you provided does not match that of the key provided in the Stripe-Account header.","message_code":"stripe_account_livemode_mismatch"}}
I followed the instructions here
@prologic This seems like a stripe specific thing. The Stripe Discord is a wonderful and fast way to get fast answers about things like API keys https://discord.com/invite/stripe. They are very responsive and have more insight into things like this. Please let me know if that doesn't turn out to be helpful.