Admin panel 401 error

System Information
  • Strapi Version: 4.5.5
  • Operating System: Ubuntu Linux
  • Database: PostgreSQL
  • Node Version: v19.3.0
  • NPM Version: 9.2.0
  • Yarn Version: N/A

I updated a strapi installation from version 4.5.2 to 4.5.5. Now I am getting a message when opening the /admin page:
Warning: An error occurred while requesting the API

On the back-end, I get a log message:
[2022-12-29 15:43:39.971] http: GET /admin/telemetry-properties (2 ms) 401

I am new to strapi. Your insights are very much appreciated!

Thank you and happy holidays!

ā€“Wei

1 Like

Welcome to the Strapi Community :wave: :cake:
Please have a read a the migration guides. and make sure that everything was followed.
After that make sure you delete your .cache build folders and node_modules then also do a yarn install / npm install to update all dependencies.
Once done you can do yarn develop npm run develop to build the admin UI again.

2 Likes

I had the same error and Iā€™d like to report that it was because I forgot to execute yarn build after the update from 4.5.1 to 4.5.5. After executing the command I didnā€™t get any 401 telemetry errors.

1 Like

@Eventyret @drakedev ā€“ Thank you all for responding. I should have read more on the fine manual! Didnā€™t think rebuilding the code was related to the 401 error. But that worked! Thanks again for the help!

1 Like

I do the following steps but still get http: GET /admin/telemetry-properties (2 ms) 401 and unable to register with error code ERR_BLOCKED_BY_CLIENT . This is my ful error preview

the telemetry-properties is not what is causing the issues.
That is the telemetry sending to strapi.

Then how can i resolve this issue? I tried changing to any version 4.5.1 to 4.5.6 and removing .cache and build folder then running build manually but still got this telemetry-properties error. Did a miss something on my configuration?

ERR_BLOCKED_BY_CLIENT has been resolved by adding my domain on middleware cors origin option

How did you do this? Iā€™m getting the same error as you did.

@willembeke Thereā€™s a code sample in the docs that I was able to use to help me.

Please, I need help with the same error, but I have already deployed my project on AWS. The project has been deployed successfully and is working fine. The problem I am facing is that I want to access the admin panel to add more properties, but I encounter the following issue:
Failed to load resource: the server responded with a status of 401 (Unauthorized)
{
ā€œdataā€: null,
ā€œerrorā€: {
ā€œstatusā€: 401,
ā€œnameā€: ā€œUnauthorizedErrorā€,
ā€œmessageā€: ā€œMissing or invalid credentialsā€,
ā€œdetailsā€: {

}

}
}
Please somebody can help me ?

Just in case you havenā€™t solved it yet, Iā€™ve had the exact same issue in AWS using a CloudFront setup in terraform with nginx in front of Strapi. Noticed that I was only forwarding along the Host header to requests, so the Authorization header got scrubbed from requests after registering the admin user.

To check if this is your issue, after registering an admin user check if your Authorization request header is ā€˜Bearer nullā€™

Added ā€˜Authorizationā€™ as a permitted header in my CloudFront distribution and now everythingā€™s working.

1 Like

thanks, this was my issue as well