Skip to content

Authentication error on creating deploy with correct authentication token. #1939

Closed

Description

@hsleewis

Environment

sentry-cli version: 2.28.5, platform: "linux", architecture: "x86_64"

Steps to Reproduce

Creating a deploy fails with authentication error.

sentry-cli" "releases" "deploys" "--release" "<.....>" "new" "-e" "production"

Expected Result

new deploy on sentry

Actual Result

Authentication error.
Unrecognized auth token format!

response:
body: {"projects":["Insufficient access to project"]}

It's not an auth error because before I try to create the deploy I can successfully create a new release and upload the sourcemap with the same authentication token.

I think this started with todays release, last week there were no issues at all.

Anyone else have the same issue or knows how to solve it?

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 2on Feb 12, 2024
  2. VincentClair commented on Feb 12, 2024

    @VincentClair

    Hello, I have the same error. It seems there is no sufficient rights with our actual tocken.
    It works with 2.28.0 but fails for 2.28.4 and 2.28.5 (no tries for intermediary versions).

    Changed "Project" permissions from "No Access" to "Read & Write" (have not try "Read" only) resolve the problem.

  3. warmwaffles commented on Feb 12, 2024

    @warmwaffles

    I can confirm this for us as well. Was failing for 2.28.5.

  4. szokeasaurusrex commented on Feb 12, 2024

    @szokeasaurusrex
    Member

    @hsleewis, I tried to reproduce your error by running the same command you ran, using version 2.28.5, but everything worked as expected for me.

    If you downgrade to Sentry CLI 2.28.01 but keep everything else the same, do you still experience the same error?

    If not, could you please rerun the command that causes the error on version 2.28.5 with --log-level=debug, and paste the full output logs of the command?

    Footnotes

    1. Version 2.28.0 is the version immediately prior to 2.28.5. Some intermediate versions may exist on some platforms, but because we were experiencing problems with our release process, none of these were fully released to all platforms. ↩

  5. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 2on Feb 12, 2024
  6. hsleewis commented on Feb 12, 2024

    @hsleewis
    Author

    @szokeasaurusrex

    If you downgrade to Sentry CLI 2.28.01 but keep everything else the same, do you still experience the same error?

    No, everything works as expected on 2.28.0

    If not, could you please rerun the command that causes the error on version 2.28.5 with --log-level=debug, and paste the full output logs of the command?

    I'll do that later tonight

  7. moved this to Waiting for: Product Owner in GitHub Issues with 👀 2on Feb 12, 2024
  8. warmwaffles commented on Feb 12, 2024

    @warmwaffles

    Fairly certain this is the culprit e11e231 it tries to read the projects when the official documentation says "no access" is the minimum.

  9. szokeasaurusrex commented on Feb 12, 2024

    @szokeasaurusrex
    Member

    Yes, I was also thinking that this change might have something to do with e11e231. Can you please link the official documentation that you are referring to @warmwaffles?

  10. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 2on Feb 12, 2024
  11. 37 remaining items

  12. moved this to Waiting for: Community in GitHub Issues with 👀 2on Feb 13, 2024
  13. szokeasaurusrex commented on Feb 13, 2024

    @szokeasaurusrex
    Member

    Would anyone here be able to confirm whether 2.28.6 fixes the problems you were experiencing with 2.28.5?

  14. alexkops commented on Feb 13, 2024

    @alexkops

    Would anyone here be able to confirm whether 2.28.6 fixes the problems you were experiencing with 2.28.5?

    I can confirm that 2.28.6 fixed it:

    This script will automatically install sentry-cli (latest) for you.
    Installation path: /usr/local/bin/sentry-cli
    Warning: this script is currently running as root. This is dangerous. 
             Instead run it as normal user. We will sudo as needed.
    ######################################################################## 100.0%
    Installed sentry-cli 2.28.6
    Done!
    Created release 4abe1d72124448205d57a6f023faea11ea26f0b9
    +------------------------+--------------+
    | Repository             | Revision     |
    +------------------------+--------------+
    | <<redacted>>           | 4abe1d721244 |
    +------------------------+--------------+
    Finalized release 4abe1d72124448205d57a6f023faea11ea26f0b9
    Created new deploy unnamed for 'acceptance'
    
  15. moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 2on Feb 13, 2024
  16. moved this from Waiting for: Product Owner to Waiting for: Community in GitHub Issues with 👀 2on Feb 13, 2024
  17. szokeasaurusrex commented on Feb 13, 2024

    @szokeasaurusrex
    Member

    The supplied SENTRY_AUTH_TOKEN is a Custom Integration token on Organization level with scopes: org:read, project:releases. (It reads Project: No access in the scope settings table above)

    Thank you @janpapenbrock for providing this information – it is exactly what I needed to be able to reproduce the issue on version 2.28.5. I now should have all the information I need to be able to implement and test a permanent solution to this problem, so I will close this issue in favor of #1927

  18. warmwaffles commented on Feb 13, 2024

    @warmwaffles

    @szokeasaurusrex thank you for working through this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions