Can not register an agent on an empty project

when registering an agent in an empty project, this error message appears (instead of the agent token and installation command):

Failed to register an agent
t is null

When the project has a repo, everything seems to work fine.

Expected behaviour

The agent registers fine and the token is presented to the user.

Reference

Edited by Viktor Nagy (GitLab)