eclipse / openvsx

An open-source registry for VS Code extensions
https://open-vsx.org/
Eclipse Public License 2.0
1.26k stars 142 forks source link

"Authorization by Eclipse required" error when attempting to publish with valid access token #913

Closed DetachHead closed 5 months ago

DetachHead commented 6 months ago

my extension is failing to publish with the following error:

Run ovsx publish --packagePath vscode-pyright.vsix --pat ***
  ovsx publish --packagePath vscode-pyright.vsix --pat ***
  shell: /usr/bin/bash -e {0}
  env:
    PYTHON_VERSION: 3.12
    ARTIFACT_NAME_VSIX: vsix
    VSIX_NAME: vscode-pyright.vsix
    VSIX_DIR: packages/vscode-pyright
    NPM_PACKAGE_DIR: packages/pyright
❌  Authorization by Eclipse required.
See the documentation for more information:
https://github.com/eclipse/openvsx/wiki/Publishing-Extensions
Error: Process completed with exit code 1.

(output from https://github.com/DetachHead/basedpyright/actions/runs/9094505273/job/24995738039)

i have not changed the access token since the previous release, and it's still valid on open-vsx.org:

image

it's definitely using that token since it updated the "Accessed" time. any ideas?

amvanbaren commented 6 months ago

It's the Eclipse access token that is missing or has expired. You might be able to solve the issue by logging in to open-vsx.org, go to User settings and click the 'Log in with Eclipse' button.

I'm currently looking into the Eclipse OAuth flow. Keep an eye on https://github.com/eclipse/openvsx/issues/912.

DetachHead commented 6 months ago

is this something that can be set to never expire, or refreshed automatically? i'd rather not have to manually login and do this every month (or however often it expires)

amvanbaren commented 6 months ago

I'll add a job that checks for expired Eclipse access tokens and tries to refresh them. Then only when the refresh token itself expired you'd have to do a manual login. This should rarely happen.

thegecko commented 6 months ago

We are seeing the same issue.

You might be able to solve the issue by logging in to open-vsx.org, go to User settings and click the 'Log in with Eclipse' button.

As we use a service account on open-vsx which doesn't match my eclipse account github username, is the expectation to create a new eclipse account for all open-vsx users?

cc @federicobozzini

amvanbaren commented 6 months ago

In general it's the user associated with the personal access token that gets checked for a valid publisher agreement. You can use the personal access token in a CI workflow to publish on behalf of you.

amvanbaren commented 6 months ago

Disregard what I said before. Release v0.15.4 fixes the issue. It will go live as soon as @kineticsquid has had a chance to review it.

kineticsquid commented 6 months ago

@amvanbaren I approved the PR.

DetachHead commented 5 months ago

now i'm getting a different error:

 ❌  Request for retrieving user profile failed: I/O error on GET request for "https://api.eclipse.org/account/profile/detachhead": webdev.eclipse.org: Name or service not known
See the documentation for more information:
https://github.com/eclipse/openvsx/wiki/Publishing-Extensions

https://github.com/DetachHead/basedpyright/actions/runs/9286481118/job/25553279137

amvanbaren commented 5 months ago

@DetachHead Getting https://api.eclipse.org/account/profile/detachhead works for me. I guess it was a temporary outage.

amvanbaren commented 5 months ago

@DetachHead @thegecko Are you still having trouble with publishing?

DetachHead commented 5 months ago

i will probably publish a new version of my extension tomorrow. will let you know how it goes

DetachHead commented 5 months ago

all good. thanks!