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

@clerk/nextjs logs are truncated on netlify #1683

Closed
5 of 6 tasks
mcky opened this issue Sep 5, 2023 · 2 comments · Fixed by #1866
Closed
5 of 6 tasks

@clerk/nextjs logs are truncated on netlify #1683

mcky opened this issue Sep 5, 2023 · 2 comments · Fixed by #1866

Comments

@mcky
Copy link

mcky commented Sep 5, 2023

  • I have reviewed the documentation
  • I have searched for existing issues
  • I have ensured I am on the most recent version, and checked the changelog for that version
  • I have provided the Frontend API key from my application dashboard: pk_test_Y2hlZXJmdWwtbWFtbW90aC00OC5jbGVyay5hY2NvdW50cy5kZXYk
  • I have provided a minimal reproduction or replay recording below

Brief Summary of the Issue

I'm unable to view the full output of the debug logs on netlify as netlify seems to cap the length of it. This is because the package emits all logs on one line instead of one per debug statement.

It would be great if this decision was either reconsidered, or a logger instance of our own could be passed in to workaround this problem. It seems to be a problem in vercel environments too considering the truncate function.

Minimal Reproduction or Replay

We require either a minimal reproduction or a replay recording to be able to address a bug report. Any issues lacking a minimal reproduction or replay recording will be closed.

This line in the debug logger causes all log lines to be emitted in one console.log

I appreciate that netlify's handling is out of your control, but the decision to combine all logs into one call has made for an extremely frustrating debugging experience

A repro/recording here really wouldn't tell you anything more than the ticket/screenshot

See the logs here are truncated before the headers have even finished printing (this is datadog, but it's the same in the netlify log streaming UI)
CleanShot 2023-09-05 at 16 55 13

Patching the package (using pnpm patch @clerk/[email protected]) and to make each .debug() call trigger a console.log immediately allows me to inspect all logs, and finally see the auth state log section
CleanShot 2023-09-05 at 19 29 46

Browser/OS

N/A

Package + Version

  • @clerk/nextjs 4.23.0
@jescalan jescalan added the needs-triage A ticket that needs to be triaged by a team member label Sep 6, 2023
@mcky
Copy link
Author

mcky commented Oct 25, 2023

Thanks @BRKalow! I ran into the same issue yesterday so glad to see it’s already been fixed for a while

@LekoArts LekoArts removed the needs-triage A ticket that needs to be triaged by a team member label Jan 8, 2024
@clerk-cookie
Copy link
Collaborator

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@clerk clerk locked as resolved and limited conversation to collaborators Jan 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants