Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web-vitals 401 error #147

Open
MathiasGruber opened this issue Sep 7, 2023 · 4 comments
Open

Web-vitals 401 error #147

MathiasGruber opened this issue Sep 7, 2023 · 4 comments

Comments

@MathiasGruber
Copy link

Hello,

I'm developing on the website www.theninja-rpg.com, which is bootstrapped with T3, adapted to use drizzle as ORM and clerk for auth.

I also have axiom setup and deployed using the vercel integration. Looking at the console, I see the following:

image

Am I doing something wrong? The project source is available at: https://github.com/MathiasGruber/TheNinjaRPG .. I'm pretty sure I've just followed the setup guide, but maybe there is some conflics with e.g. clerk?

@dasfmi
Copy link
Collaborator

dasfmi commented Sep 12, 2023

Hi @MathiasGruber , usually that means that the integration token is not available. is this a production deployment? and it has been deployed after setting up the integration?

@frankdavidcorona
Copy link

Hi @MathiasGruber , usually that means that the integration token is not available. is this a production deployment? and it has been deployed after setting up the integration?

Hi @schehata

I'm facing the same issue and in my case, yes I'm running in production where my token should be exposed. I added next-axiom through Vercel Integration and the following steps described here for tailored logging: https://github.com/axiomhq/next-axiom

image

@DC55137
Copy link

DC55137 commented Mar 5, 2024

Hey MathiasGruber, I was getting the same warning. I added '/_axiom/web-vitals' to my publicRoutes in my middleware and the warning went away. As below:

//middleware.ts
import { authMiddleware } from "@clerk/nextjs";

export default authMiddleware({
publicRoutes: [
"/",
"/_axiom/web-vitals", // Add this line
],
});

export const config = {
matcher: ["/((?!.\..|_next).)", "/", "/(api|trpc)(.)"],
};

I hope this helps.

@voinik
Copy link

voinik commented Jun 23, 2024

Adding web vitals was causing my middleware (using Clerk) to be rerun infinitely. Adding @DC55137's suggestion fixed it for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants