Cron job not passing middleware
Unanswered
Toy Manchester Terrier posted this in #help-forum
Toy Manchester TerrierOP
When attempting to run my cron job, the only log I ever get is from middleware, with a generic 200.
The api route itself is producing no logs, nor am I seeing any errors. If I hit the api route manually (i.e just navigate to it in the browser) it runs as expected, so not really sure what's going wrong here.
The middleware in this case is just a supabase middleware:
The api route itself is producing no logs, nor am I seeing any errors. If I hit the api route manually (i.e just navigate to it in the browser) it runs as expected, so not really sure what's going wrong here.
The middleware in this case is just a supabase middleware:
const res = NextResponse.next();
const supabase = createMiddlewareSupabaseClient<Database>({ req, res });
await supabase.auth.getSession();
return res;2 Replies
Common Tern
Hey, I have the exact sme problem. Did you find a fix for this so far?
Cape lion
I'm having this issue as well. The api route works when I hit it manually, the cron job is running in vercel but I am not seeing the results. I am expecting a table in supabase to update each time I hit the endpoint and it is updated when I go to /api/cron but not when I deployed to Vercel even though Vercel is showing logs and status 200 on each log.