How to solve this issue of The session or access key being used is invalid, please run "code-push-standalone login" again.
Gautham495 opened this issue ยท 15 comments
I had the same problem.
In my case, it was because I was running the application incorrectly.
I started running something like:
yarn clean && yarn build && yarn start:env
But you need to have filled in 1 set of keys
either GitHub Or Microsoft in ./api/.env
GITHUB_CLIENT_ID
GITHUB_CLIENT_SECRET
MICROSOFT_CLIENT_ID
MICROSOFT_CLIENT_SECRET
I was having the same issue, I stopped and restarted the server, it helped but not completely. Now, I am getting the same error in the server logs. Here are the steps that I followed:
- I have
.env
in./api
withGITHUB_CLIENT_ID
,GITHUB_CLIENT_SECRET
set.SERVER_URL
is pointing tohttp://localhost:3000
- While server is up and running, I run
code-push-standalone login
which opens a browser to authenticate, when I am clicking on Github, or Microsoft, it redirects to authorize the action, then it throwsInternal Sever Error
. Upon checking the logs, it saysError: connect ECONNREFUSED 127.0.0.1:10002
. I addedHTTP_PROXY
in .env to fix it, then the error cahnged to the same message mentioned in the original question.
@icarusdust
i am using azurite by visual studio code.
port 10002 was used by azurite:table port by defaultm so i changed to 10003 and then it worked.
@Jeyoung-Park thanks, I have already updated it to 10003 and synced it but still throwing the same error. Wondering if you configured anything specifically inside .env
@Jeyoung-Park thanks, I have already updated it to 10003 and synced it but still throwing the same error. Wondering if you configured anything specifically inside
.env
i just used GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET
I didn't use MICROSOFT_CLIENT_ID and MICROSOFT_CLIENT_SECRET
I'm also facing the same issue, any solution?
Error on page at http://localhost:3000/auth/callback/github?code=someValue&state=someValue
Internal Server Error
Error in logs:
Error: connect ECONNREFUSED 127.0.0.1:10002
My .env has following values:
EMULATED=true
SERVER_URL=http://localhost:3000
GITHUB_CLIENT_ID=someValue
GITHUB_CLIENT_SECRET=someValue
LOGGING=true
I'm able to resolve the Error: connect ECONNREFUSED 127.0.0.1:10002 issue by installing azurite and running the server locally.
Just modify .env to have below config, which is default for Azurite (emulator for local)
AZURE_STORAGE_ACCOUNT=devstoreaccount1
AZURE_STORAGE_ACCESS_KEY=Eby8vdM02xNOcqFEY3PL4kAzqT0qY5cV
you need to add these credentials GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET your .env file for authentication and after that app will redirect to github
Make sure to add the SERVER_URL configuration under your .env
file.
SERVER_URL
: The URL of your server, for local deployment it will be either http://localhost:3000 or https://localhost:8443. For Azure it will be your Azure App URL
I'm also facing the same issue, any solution?
Error on page at http://localhost:3000/auth/callback/github?code=someValue&state=someValue
Internal Server Error
Error in logs:
Error: connect ECONNREFUSED 127.0.0.1:10002
My .env has following values:
EMULATED=true SERVER_URL=http://localhost:3000 GITHUB_CLIENT_ID=someValue GITHUB_CLIENT_SECRET=someValue LOGGING=true
This solve my same problem.
I'm also facing the same issue, any solution?
Error on page at http://localhost:3000/auth/callback/github?code=someValue&state=someValueInternal Server Error
Error in logs:
Error: connect ECONNREFUSED 127.0.0.1:10002
My .env has following values:
EMULATED=true SERVER_URL=http://localhost:3000 GITHUB_CLIENT_ID=someValue GITHUB_CLIENT_SECRET=someValue LOGGING=trueThis solve my same problem.
I am getting same error with github login as mentioned .env configuration.
Try to clear the data of azurite. Then re-initialize and run azurite. Then change const devConnectionString = "UseDevelopmentStorage=true";
to a full connection string. And do not use the default storage account. And set the value of the storage account in the environment variable configuration file .env or .test.env.
Example: const devConnectionString = "DefaultEndpointsProtocol=http;AccountName=alice;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1: 10000/alice;QueueEndpoint=http://127.0.0.1:10001/alice;TableEndpoint=http://127.0.0.1:10002/alice;";
I had the same issue and managed to fix it by installing the Azurite via terminal (instead of previously VSCode) by npm install -g azurite
. Then runnning the command azurite
(without the any flag like --silent
or --location
) to fire up the service.
You must to add Bearer token to your requests.
Example:
curl --location 'http://localhost:3000/apps' \ --header 'Authorization: Bearer YOUR BEARER TOKEN'
You can take your bearer token after register(localhost:3000/auth/register) in chrome.
I had DEBUG_DISABLE_AUTH=true
and DEBUG_USER_ID=1234567890
, removing those allowed me to register.