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

Webpack serialization performance warnings when using @sentry/nextjs #15100

Open
3 tasks done
scobbe opened this issue Jan 20, 2025 · 4 comments
Open
3 tasks done

Webpack serialization performance warnings when using @sentry/nextjs #15100

scobbe opened this issue Jan 20, 2025 · 4 comments

Comments

@scobbe
Copy link

scobbe commented Jan 20, 2025

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nestjs

SDK Version

8.50.0

Framework Version

React 19.0.0, Next 15.1.4, Node 22.9.0

Link to Sentry event

No response

Reproduction Example/SDK Setup

Description

When adding Sentry configuration to next.config.ts using withSentryConfig, I encounter the following warning during the build process:

<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (318kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)

Is this a known issue? Are there any recommendations for addressing this warning, such as additional configuration options or workarounds?

Thank you!

Steps to Reproduce

  1. Start with a minimal next.config.ts file:

    import type { NextConfig } from "next";
    
    const nextConfig: NextConfig = {};
    
    export default nextConfig;
  2. Update the file to include Sentry's configuration using withSentryConfig:

    import type { NextConfig } from "next";
    
    import { withSentryConfig } from "@sentry/nextjs";
    
    const nextConfig: NextConfig = {};
    
    export default withSentryConfig(nextConfig, {
      automaticVercelMonitors: true,
      disableLogger: true,
      hideSourceMaps: true,
      org: "MyOrg",
      project: "javascript-nextjs",
      reactComponentAnnotation: {
        enabled: true,
      },
      silent: !process.env.CI,
      sourcemaps: {
        deleteSourcemapsAfterUpload: true,
        disable: process.env.NODE_ENV === "development",
      },
      tunnelRoute: "/monitoring",
      widenClientFileUpload: true,
    });
  3. Run the build process.

Expected Result

The build completes without warnings or errors.

Actual Result

The following warning appears during the build process:

<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (318kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 20, 2025
@github-actions github-actions bot added the Package: nestjs Issues related to the Sentry Nestjs SDK label Jan 20, 2025
@andreiborza
Copy link
Member

Hello @scobbe, thank you for filing this.

Could you please provide a reproduction repo? I tried setting up a new nextjs project using npx create-next-app@latest and setting Sentry up using npx @sentry/wizard@latest -i nextjs but did not run into any such warnings.

@kimdanielarthur-cowlabs
Copy link

kimdanielarthur-cowlabs commented Jan 23, 2025

same issue here with same env , however do not have reproduction repo sadly

@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 23, 2025
@getsantry getsantry bot moved this to Waiting for: Community in GitHub Issues with 👀 3 Jan 23, 2025
@aaa3334
Copy link

aaa3334 commented Jan 26, 2025

Same issue here. Only happened when I added sentry in and the build (running npm run dev) now takes a LOT longer.

Versions:

"@sentry/nextjs": "^8.51.0",
"next": "14.2.16",

@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 26, 2025
@Lms24
Copy link
Member

Lms24 commented Jan 27, 2025

We still need a reproduction for this to investigate further. Thanks!

@Lms24 Lms24 added Waiting for: Community and removed Package: nestjs Issues related to the Sentry Nestjs SDK labels Jan 27, 2025
@getsantry getsantry bot moved this to Waiting for: Community in GitHub Issues with 👀 3 Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Community
Development

No branches or pull requests

5 participants