wadewegner / deploy-to-sfdx

An open-source and community-driven tool for one-click Salesforce DX deployments from public repositories to Scratch Orgs
https://deploy-to-sfdx.com
Apache License 2.0
98 stars 22 forks source link

Handling expired access_token #11

Open FishOfPrey opened 7 years ago

FishOfPrey commented 7 years ago

My browsers access_token session cookie isn't expiring between when I leave work and return the next day. When I come in the next morning and try a Deploy to SFDX it takes me straight to the Confirm Deployment Details screen without going through the OAuth process again for the DevHub org. Pressing Deploy results in the following error:

Sorry, something went wrong. Please contact @WadeWegner on Twitter and send the following error message.

Error: {"message":"Error: ERROR running force:org:create: Session expired or invalid. \nTry this:\nVerify that the instanceUrl config setting is set to the instance that the access token belongs to.\nUse \"sfdx force:config:list\" to view your current setting.\nUse \"sfdx force:config:set instanceUrl= --global\" to set your instanceUrl to the correct instance.."}

Manually deleting the access_token cookie forced the OAuth process with the next login and allowed the deployment to proceed.

wadewegner commented 7 years ago

I think this is an issue with prompt: 'select_account'. I've escalated with the identity team and will try to resolve.

wadewegner commented 6 years ago

Is this still an issue, @FishOfPrey? I never get expired token issues as I've implemented it to force you to select your account.

FishOfPrey commented 6 years ago

Just tried starting the process off from https://github.com/muenzpraeger/salesforce-einstein-platform-apex and using the Deploy to SFDX process from there.

It took me straight to a confirmation page to deploy to my normal developer edition org. There was no prompt prior to that to login to the dev hub org.

I restarted the process from an anonymous chrome window, logged into my dev hub org via Oauth, then got the following error:

GUID: 52c5c6ff-e54f-ff88-e250-ef5d0f24fcd4 fatal: repository '.' does not exist

2) No .salesforcedx.yaml found in repository. Using defaults. 1) GUID: 52c5c6ff-e54f-ff88-e250-ef5d0f24fcd4 fatal: repository '.' does not exist

Tried again from https://deploy-to-sfdx.com/choose and selected "https://github.com/muenzpraeger/salesforce-einstein-platform-apex". That worked.

So, it's hard to say as the Deploy button isn't working from the GitHub repo I'd usually test from. I'll see if I can find another repo to test from.