Production Hub Database UI shows error
Describe the bug Database shows for build previews but production is broke. It said... Unexpected error happened 😕 Please download error context and report to our support team
Steps to reproduce Steps to reproduce the behavior:
- Starting with a working Drizzle project
- Update the schema... but had local issue...
- Deleted schema files to match production, deleted migration entries in DB... got it working
- Deployed to preview on Hub and worked...
- Deployed to production... it works but the DB interface in Hub admin broke
Expected behavior Works like before... like preview... like dev... without the error. :)
Here is the bug report it said to send. bug-report.zip
This error generally means that there's an issue connecting to the production deployment in order to query the database from it. Please could you check the network tab of your browser devtools?
There were no errors, but it was listed as an access-restricted app via CloudFlare Zero Access. Changing that resolved the issue.
Should we, or is there a way to work around that for non-public-facing solutions?
Take a look at our guide for using Cloudflare Access with NuxtHub https://hub.nuxt.com/docs/recipes/cloudflare-access
I already have my site deployed on Cloudflare via NuxtHub. Integrating the database without messing up the automated migration is the challenge.
I also get an error on the Database tab in the Nuxthub admin panel. Already recreated the app from scratch by deleting the whole app, but I still have the same issue. The strangest part is that the databases can be seen from Cloudflare.
I'm getting the same error as @50rayn in both admin panel and devtools. I think this is a different one to OP but would be great if someone from the team looks into it.
Pasting the error here to help with SEO in case there's more of us.
(p.sql.matchAll(w)||[]).forEach is not a function. (In '(p.sql.matchAll(w)||[]).forEach(k=>{const H=k[1],F=k[2].split(",").map(Z=>ll(Z.trim()));b[H]={id:`public.${p.name}.${H}`,name:H,type:"primary",schema:"public",table:p.name,columns:F}})', '(p.sql.matchAll(w)||[]).forEach' is undefined)
Hello, I have the same error...
(p.sql.matchAll(w)||[]).forEach is not a function. (In '(p.sql.matchAll(w)||[]).forEach(k=>{const H=k[1],F=k[2].split(",").map(Z=>ll(Z.trim()));b[H]={id:public.${p.name}.${H},name:H,type:"primary",schema:"public",table:p.name,columns:F}})
Please could you let me know the browser (including version) you're using to access the database? If it's Safari, ensure your macOS is up to date.
Is the issue still occurring? @sosensible @50rayn @PiuPiuson @Ambrise
I was using Windows with Edge, updated. I don't remember which project it was, and should have noted that. So I checked all my projects and found these issues. It was so long ago, I am not sure it is the same issue, but it is the only one I found.
@RihanArfan I have checked the latest version of nuxthub (version 0.8.27) on Safari Version 18.5 (20621.2.5.11.8). Everything works fine for me 👍🏻 . Thanks for the fixes.
P.S. I paused for a little while using Nuxthub, due to its beta state. I loved a lot the ease of deployments, but a couple of things stopped me from using for a while the next hub. Things like:
- emailing - #519
- scheduled tasks, a.k.a. cron job - as I found, there are only workaround