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

[@sentry/vite-plugin] Benign log messages are being printed as errors (which fail the build) #650

Closed
kaiyoma opened this issue Jan 9, 2025 · 4 comments

Comments

@kaiyoma
Copy link

kaiyoma commented Jan 9, 2025

Environment

Vite: 5.4.10
@sentry/vite-plugin: 2.22.7

Steps to Reproduce

  1. Build Vite and upload source maps to Sentry

Expected Result

Success

Actual Result

In the build output, there are some log messages that sound benign, but they're being printed as errors, which is causing our build to fail:

11:07:56  [log] vite v5.4.10 building for production...
11:07:56  [error] [sentry-vite-plugin] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
11:07:56  [log] transforming...

...

11:14:54      ~/dc706d4e-4b5e-44ff-8cf6-8f34254584a3-12.js.map (debug id dc706d4e-4b5e-44ff-8cf6-8f34254584a3)
11:14:54  [error] [sentry-vite-plugin] Info: Successfully uploaded source maps to Sentry
11:14:54  [log] ✓ built in 6m 58s
@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 9, 2025
@kaiyoma
Copy link
Author

kaiyoma commented Jan 9, 2025

This seems to be an issue in 2.22.7. If I downgrade to 2.22.6, the problem goes away.

@kaiyoma
Copy link
Author

kaiyoma commented Jan 9, 2025

Might be this change causing the issue: #624

This seems like a very bad change because the wrong semantics are being used. Other tools (like task runners and monorepo tools) look for messages to stderr as part of their normal operation, and fail tasks/builds when those messages are detected.

@chargome
Copy link
Member

Let's track this in getsentry/sentry-javascript#14879

@lforst
Copy link
Member

lforst commented Jan 10, 2025

This seems like a very bad change

I think it is very bad if tools rely on stderr to be empty. https://unix.stackexchange.com/a/331620

POSIX defines standard error as "for writing diagnostic output"

Stderr doesn't automatically mean error. It could be stuff like progress bars or debug messages.

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

No branches or pull requests

3 participants