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

How to solve this issue of The session or access key being used is invalid, please run "code-push-standalone login" again. #10

Open
Gautham495 opened this issue Oct 5, 2024 · 15 comments

Comments

@Gautham495
Copy link

Screenshot 2024-10-05 at 8 13 48 PM

I have done all the things mentioned in the readme and i am stuck here. Please solve this.

@cleberhensel
Copy link

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

@icarusdust
Copy link

icarusdust commented Oct 7, 2024

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:

  1. I have .env in ./api with GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET set. SERVER_URL is pointing to http://localhost:3000
  2. 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 throws Internal Sever Error. Upon checking the logs, it says Error: connect ECONNREFUSED 127.0.0.1:10002. I added HTTP_PROXY in .env to fix it, then the error cahnged to the same message mentioned in the original question.

@Jeyoung-Park
Copy link

@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.

image

@icarusdust
Copy link

@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
Copy link

@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

@icarusdust

i just used GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET
I didn't use MICROSOFT_CLIENT_ID and MICROSOFT_CLIENT_SECRET

@imanshul
Copy link

imanshul commented Oct 8, 2024

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

@imanshul
Copy link

imanshul commented Oct 8, 2024

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

@batuhanbag
Copy link

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

@amir-ben-shimol
Copy link

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

@houjinyun
Copy link

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.

@ahsanparacha02
Copy link

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 am getting same error with github login as mentioned .env configuration.

Image

@iiifinal
Copy link

iiifinal commented Oct 24, 2024

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;";

@amiinous
Copy link

amiinous commented Nov 8, 2024

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.

@mustafauyysl
Copy link

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.

@kaushil111
Copy link

I had DEBUG_DISABLE_AUTH=true and DEBUG_USER_ID=1234567890, removing those allowed me to register.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests