How to debug Worker Error 1101?
I have deployed Next.js app to a Cloudflare Worker using OpenNext. It works well but the Google login callback triggers an Error 1101. It works fine on local and other dev platforms.
There log error I see is: Error 1101: Worker threw exception
"The Workers runtime canceled this request because it detected that your Worker's code had hung and would never generate a response."
4 Replies
Hey @jins . I am running into the same problem. Have u found a fix?
I got it working but it was part of a bigger change so not sure what fixed it. I am using better-auth social login with an external Hono.js worker for API.
I had the Next.js auth api route mentioned in better-auth docs and call the api directly now. so the callback is for the server api url instead of the next.js auth api route.
I also changed things with how I was fetching session cookie.
https://www.better-auth.com/docs/integrations/next#create-api-route
I also suspect better auth to be behind the error. will give it a shot thanks!
Try starting with the basic opennext template, deploy to worker, then incrementally add each step of better-auth next.js integration