Generate Tokens flashes and disappear - not able to copy

Version 10.1.0.73491 Deployed as zip

  • trying to generate a token but the token flashes and disappears. not able to copy
  • i have restarted several times

Hey there.

I can’t reproduce this on my side. What OS/Browser are you using (and what versions)? Does it happen in another browser?

i have tried in different browsers and results are the same. am running sonarQube on ubuntu 22.

Perhaps you can take a screen recording to make it clear where the issue is?

sonar.zip (4.0 MB)
here is a short clip. created 3 different users including including Admin. but anytime i hit Generate token.the token flashes and am not able to copy

Thanks @rbonti. I still can’t reproduce this (and don’t have a Linux machine ready-to-go). I’ll tag this for some experts.

In the meantime, are you able to generate tokens (and get the value) by going to My Account (clicking your avatar in the upper right?

Yes! that actually worked for me! However, am running into another issue authenticating with github. i keep. am trying to use actions for a node project but i keep getting SonarQube server can not be reached

Thank you @Colin

build:
name: sonar_test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# If you wish to fail your job when the Quality Gate is red, uncomment the
# following lines. This would typically be used to fail a deployment.
# We do not recommend to use this in a pull request. Prefer using pull request
# decoration instead.
# - uses: sonarsource/sonarqube-quality-gate-action@master
# timeout-minutes: 5
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

Let’s keep this topic focused on tokens – I suggest you make a new topic (and please provide the log text, not screenshots)

Gotcha! Thanks

This message, including any attachments, may contain information which is confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not read, use, copy or disclose to anyone the message, its attachments, or any information contained therein. If you have received the message in error, please advise the sender by reply e-mail and delete the message and any attachments.

We have the same issue just like you, but it just happened in Chrome.
It is okay for use in Safari 16.5.1(18615.2.9.11.7).

@Colin Here is the related system info:
We are using self-hosted Community Edtion and deployed by the container.
OS: MacOS Ventura v13.14.1 (MBP M2)
Browser: Google Chrome 114.0.5735.198 (Arm version)

Did you got any resolution doe this Sonar Token disappear issue ? Same is hapenning for me please let me know If any luck or not .

Hello everyone,

Thank you for reaching out and for the screen recording. It helped a lot.
I can confirm that we have a bug for this token modal. It is not reproducible in fast network connections, that’s why not everyone faces it.
However, the fix for that is done and will be released in SonarQube 10.2.

Meanwhile, I see two workarounds here -

  1. The solution that @Colin proposed - generate token from My Account / Security.
  2. Direct API call to api/user_tokens/generate. The details of this call can be found in Help ((?) icon near your avatar at the top right corner) / Web API

Sorry for the inconvenience.

Best regards,
Viktor

1 Like