Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logs are not displayed when running supabase functions serve #3006

Closed
HayattiQ opened this issue Jan 2, 2025 · 11 comments · Fixed by #3011
Closed

Logs are not displayed when running supabase functions serve #3006

HayattiQ opened this issue Jan 2, 2025 · 11 comments · Fixed by #3011

Comments

@HayattiQ
Copy link

HayattiQ commented Jan 2, 2025

Describe the bug
I’ve encountered an issue where no logs are output to the console when using the supabase functions serve command. It makes it difficult to debug functions since there is no immediate feedback about what is happening inside the function.

To Reproduce
Steps to reproduce the behavior:
Write a simple function that contains logging (e.g., console.log('test log')).
Run supabase functions serve.
Invoke the function (for example, via curl or through your application).
Observe that no logs appear in the console, even though the function is being executed

Expected behavior
The console should display the logs produced by the function (e.g., console.log, console.error, etc.), making it possible to debug the code.

Screenshots
v2.1.1
スクリーンショット 2025-01-02 175125

v2.2.1
スクリーンショット 2025-01-02 175207

System information
Rerun the failing command with --create-ticket flag.

  • Version of OS: [Ubuntu 22.04]
  • Version of CLI: [v2.2.1]
@msgerbush
Copy link

I ran into the same issue. Looks like it broke with CLI version 2.1.5, so probably related to the edge runtime version 1.66.

@sweatybridge
Copy link
Contributor

cc @nyannyacha if you can take a look to fix or revert?

@nyannyacha
Copy link
Contributor

@sweatybridge I'll take a look

@nyannyacha
Copy link
Contributor

following is a PR that fixes this issue:
supabase/edge-runtime#469

@pickwick9
Copy link

im encountering the same issue. currently on Supabase CLI 2.2.1

@sweatybridge
Copy link
Contributor

Could you try the beta release?

npx supabase@beta start

@pickwick9
Copy link

Could you try the beta release?

npx supabase@beta start

doing this works (Supabase CLI 1.226.4)

@clwater
Copy link

clwater commented Jan 7, 2025

Could you try the beta release?

npx supabase@beta start

I try use this, But the problem not fix.

I check Supabase

npx supabase --version
2.2.1

But I am running it in GitHub CodeSpace runtime. (With install Deno Extensions(I am not sure it is connect this problem))

@clwater
Copy link

clwater commented Jan 7, 2025

It is not always have questions, Today i try develop new code, I find it is not any console log. But i remeber last time (may be 3 or 5 day ), It is work

@Harrizontal
Copy link

I am facing this issue as well.

supabase cli v2.2.1

@emretufekci
Copy link

for mac users:

brew upgrade supabase

it upgrades to 2.6.8 and console.logs are back (v2.2.1 cannot display console logs on my machine too.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants