supabase: Local Supabase Studio development shows 500 errors when trying to view logs

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Supabase Studio for local development flow is not reliable at all.

  1. I can’t see logs. If I try to see Postgres logs (or any other logs) I get a 500 error.
  2. When you go to Triggers and refresh the page I see a “Failed to retrieve database triggers” error.
  3. If I create a trigger through SQL query I can’t see it listed on the dashboard (although it is created and it does work). If I create a trigger through the dashboard I can see it on the dashboard.

It’s really hard to develop on a development/staging/production environment when the local development environment is so unstable. I’ll need to either develop directly on production or look for a different solution.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Run supabase with supabase start
  2. Open the dashboard.
  3. Create a trigger through a sql query
  4. Go to Triggers on the dashboard and look for the trigger, it won’t be there.
  5. Go to the Logs page. There will be a 500 error.

Expected behavior

I should be able to see all triggers, no matter if I create it through a query or through the dashboard/ui. I should be able to see the postgres logs on the dashboard.

Screenshots

Captura de Tela 2023-11-11 às 21 25 53 Captura de Tela 2023-11-11 às 21 26 41

System information

  • OS: MacOS Sonoma 14.0 (Intel Chipset)
  • Edge and Chrome
  • Version of supabase-js: 2.38.4
  • Version of Node.js: 20.6.1

Additional context

Add any other context about the problem here.

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Reactions: 6
  • Comments: 20 (6 by maintainers)

Most upvoted comments

If it helps anybody… As mentioned above, to have logs locally, you need to edit config.toml and enable analytics:

[analytics]
enabled = false  <-- Set this to true
port = 54327
vector_port = 54328
\# Configure one of the supported backends: `postgres`, `bigquery`.
backend = "postgres" 

Important! After enabling, you need to restart supabase: npm supa stop npm supa start

Honestly I feel like there’s a lack of interest from supabase on the selfhosted stack. You can tell from the lack of features that you have on the hosted app.

This would be totally understandable (after all the selfhosted app doesn’t bring in any money), except that the self hosted stack is a critical part of a mature/production app.

I develop locally and afterwards deploy to staging and production which are cloud (paid for) apps.

Supabase is such a great platform, you can tell there’s a lot of hard work done on the cloud app, but I must say that the local development feels unpolished and somewhat painful to work with.

Hmm I don’t even have “supabase_analytics_test”, see screenshot

In the config.toml file, you can enable it as shown in this image:

image

Hmm I don’t even have “supabase_analytics_test”, see screenshot

In the config.toml file, you can enable it as shown in this image:

image

I was running into this same error and I needed to enable analytics in my config.toml file, but I had to add the entire analytics entry manually, likely because I was running an older project that was created before analytics were supported in the local studio. Doing that and restarting supabase, it pulled the logging containers and works correctly for me.

Hi @kaumac, @joshling1919, Can I know to which port of analytic you are connecting? During local development, we will need to make some adjustments to the port and API key of LOGFLARE Here is my configuration; I hope it can be helpful. image image image

Hi guys - Are you having issues creating tables from using the Table Editor as well locally?

I also have no issues creating tables and rows. Even the trigger erros seem to have been fixed in one of the latest versions.

I only have issues viewing the logs which are still showing a 500 error

I’m also getting error 500 on logs page. Is this currently being worked on?

I’m impacted by both bugs described here. While I have been having the log page 500 error for a long while (at least since supabase CLI 1.93.0 and still to this day 1.106.1), the issue with the trigger page returning an error after refresh is something that I didn’t see in previous versions. Edit, the refresh bug on the trigger page seems to be solved in 1.110.1

Honestly I think the logs are more critical than the triggers not showing. We can still see the triggers through SQL queries (even though this is not an ideal solution/experience). Logs on the other hand are critical to development. I’m getting errors and I have no way to debug them.