An error occurred while creating the token

Problem to solve

Hi, I am experiencing this error after I updated gitlab-ce to version 18.1.2-ce.0. When I try to create new access token there is an announcement said "An error occurred while creating the token.
"

I also created an access token before, but now I can’t see the access token list because it say:
An error occurred while fetching the tokens.

Versions

Version: gitlab-ce:18.1.2-ce.0

  • [ x] Self-managed
  • GitLab.com SaaS
  • Dedicated

Helpful resources

  1. Check the FAQ for helpful documentation, issues/bugs/feature proposals, and troubleshooting tips.
  2. Before opening a new topic, make sure to search for keywords in the forum search
  3. Check the GitLab project for existing issues. If you encounter a bug, please create a bug report issue.
  4. Review existing troubleshooting docs.

Thanks for taking the time to be thorough in your request, it really helps! :blush:

3 Likes

Try reducing the token expiry to 1 day before last day on calendar

E.g. subtract one to the last..

I’ve got the same issue. Have tried using various expiration dates but none seem to resolve the issue.

This resolved my issue:

We are seeing the same thing, we have tried to use the method of setting a shorter time but we still see the error that an error has occurred while fetcing the tokens. We are using 18.3.1

I have the same issue, I see the message “An error occurred while fetching the tokens.” whenever trying to access Preferences→Access tokens in the UI.
Upgrading from 18.2.1 to 18.3.2 made no difference.

Creating a token works, but then after a refresh you have the same error and can see your freshly minted token.

However, using the API to fetch the tokens works:
curl --header “PRIVATE-TOKEN: glpat-xxxxxxxxxxxxxxxxxxxxxxxxxx” “https://gitlab.mydomain.com/api/v4/personal_access_tokens” | jq .