I have issue with Cloudinary widget in my Nextjs app. The widget does not load the ui, it gets stuck on loading state:
I have added NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME secret to my app.
Deployed app works locally and in Replit.
Why it doesn’t work on fly.io deployed app? This is preventing me from deploying my other web application to fly.io, that also works on locally, vercel and Replit.
How can I debug this? there is no errors in logs.
You can check the test app: https://nextjs-cloudinary-widget-test.fly.dev/
I did a little digging and it seems as if some people are/were experiencing a similar problem when using the Cloudinary widget.
With that being said I don’t think it’s a fly issue, however I could be wrong as well. In production or even locally are there any errors in the console when you click the “upload” button? Also have you tried using a different browser to see if it works?
I think i read those threads earlier but they didn’t fix it. There is no errors in log or console, it just opens the widget properly. It is weird, I was able to produce the same kind of error in replit, when I forgot to add the cloud name secret. I double checked that the secret is set on fly and tried it with/without quotes, no change.
I figured it out finally, i had to put the ENV variable in to my docker file. So it was available at the browser also.