READINESS_PROBE_ATTEMPTED
I'm seeing the same error as https://discord.com/channels/1309558646228779139/1426406572447502346 on Mastra cloud.
Seemed to occur after I added basic
MastraJwtAuth
from @mastra/auth
to my project, but since there isn't really a helpful error message I don't know if that actually was the cause.
Build process failed for build 309ab564-126d-4988-aa44-43f42e740885 and project 335603de-add4-4349-b3e9-6fe5bf1af5f9: {"message":"Unknown error","details":{"message":"Unknown error","domain":"BUILDER","category":"SYSTEM","details":{}},"code":"READINESS_PROBE_ATTEMPTS_EXCEEDED"}
All deployments are failing.14 Replies
Hi @bmets ! Could you share your deploymentId as well as your project slug? Thanks 🙏
DeploymentId: 9cc22270-b46c-48d6-94ae-c1f9ffcd9a39
slug:
the-angles-agent-api
or slug might be scarce-few-laptop
Thanks!📝 Created GitHub issue: https://github.com/mastra-ai/mastra/issues/8870
GitHub
[DISCORD:1427745914377994392] READINESS_PROBE_ATTEMPTED · Issue #8...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1427745914377994392 I'm seeing the same error as https://discord.com/channels/1309558646228779139/1426...
Thanks @bmets I passed that info to the team!
Appreciate it!
Did you setup
MASTRA_JWT_TOKEN
in your mastra cloud env by any chance?I have
MASTRA_JWT_SECRET
in the env variables (in mastra cloud) which I pass in the mastra object like:
server: {
experimental_auth: new MastraJwtAuth({
secret: process.env.MASTRA_JWT_SECRET,
})
}
Oh do i need to provide the token as a variable also
I added the MASTRA_JWT_TOKEN
as a variable, but I'm still failing with the same error. New deploymentId: bd5aaf1e-b6ad-407e-a3ff-b5f09932fe61
Note: I'm simultaneously deploying this on vercel without issues.Oh, can you make sure that whatever you setup in your cloud settings matches what's in your code? I see you use
process.env.MASTRA_JWT_SECRET
in your code, so you need to make sure you setup MASTRA_JWT_SECRET
in your cloud settings (earlier I said MASTRA_JWT_TOKEN
, but it's actually whatever you're using in your code ;))I have all env variables set – they match exactly what's in the code. But I'm still seeing the error.
Is there a way to see the actual error coming from the container rather than the generic READINESS_PROBE_ATTEMPTS_EXCEEDED?
I removed MastraJwtAuth and I am now able to deploy without error. So it's clear that is the cause – is it a known issue / is Mastra JWT auth not supported on Mastra Cloud?
From what I can see, it's a 401 error, so it has to do with the auth middleware. It's not a known issue, the mastra jwt auth is compatible with Mastra Cloud. Checking with the team
Are you only using MastraJwtAuth? Do you have any other middleware that could potentially be returning a 401 error?
I am able to reproduce with this as my index.ts file:
import { Mastra } from '@mastra/core/mastra';
import { MastraJwtAuth } from '@mastra/auth';
export const mastra = new Mastra({
server: {
experimental_auth: new MastraJwtAuth({
secret: process.env.MASTRA_JWT_SECRET,
}),
}
});
Package.json:
"engines": {
"node": "22.x"
},
"@mastra/auth": "^0.1.3",
"@mastra/core": "0.20.2",
"@mastra/deployer-vercel": "^0.12.8",
"@mastra/loggers": "^0.10.16",
"@mastra/memory": "^0.15.7",
"@mastra/pg": "^0.17.3",
DeploymentId: 744a3ebf-79a6-4892-ba4d-aabd6ce9baf7
Note I also see the error on @mastra/core: "0.21.0"Got it, thanks
I'm able to reproduce btw
Sweet – I can't reproduce on @mastra/core: "0.19.1" to save you some time, so I'll use that for the time being
Got it, thanks for letting me know!