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 issues #52620

Closed
1 task done
joacub opened this issue Jul 13, 2023 · 26 comments
Closed
1 task done

Sentry issues #52620

joacub opened this issue Jul 13, 2023 · 26 comments
Labels
bug Issue was opened via the bug report template. locked please add a complete reproduction The issue lacks information for further investigation

Comments

@joacub
Copy link

joacub commented Jul 13, 2023

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

latest canary version

Which area(s) of Next.js are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

no response

To Reproduce

no response

Describe the Bug

  • error TypeError: Cannot destructure property 'RawSource' of 'require(...)' as it is undefined.
    @wsy/web:dev:partial:docker: at @sentry/nextjs (/Users/johan/dev-projects/weshipyou-monorepo/apps/web/.next/server/app/[lang]/admin/page.js:33:18)
    @wsy/web:dev:partial:docker: at webpack_require (/Users/johan/dev-projects/weshipyou-monorepo/apps/web/.next/server/webpack-runtime.js:33:43)
    @wsy/web:dev:partial:docker: at eval (./src/app/layout.tsx:21:72)
    @wsy/web:dev:partial:docker: at (sc_server)/./src/app/layout.tsx (/Users/johan/dev-projects/weshipyou-monorepo/apps/web/.next/server/app/[lang]/admin/page.js:10142:1)
    @wsy/web:dev:partial:docker: at Function.webpack_require (/Users/johan/dev-projects/weshipyou-monorepo/apps/web/.next/server/webpack-runtime.js:33:43)
    @wsy/web:dev:partial:docker: - error TypeError: Cannot destructure property 'RawSource' of 'require(...)' as it is undefined.
    @wsy/web:dev:partial:docker: at @sentry/nextjs (/Users/johan/dev-projects/weshipyou-monorepo/apps/web/.next/server/app/[lang]/admin/page.js:33:18)
    @wsy/web:dev:partial:docker: at webpack_require (/Users/johan/dev-projects/weshipyou-monorepo/apps/web/.next/server/webpack-runtime.js:33:43)
    @wsy/web:dev:partial:docker: at eval (./src/app/layout.tsx:21:72)
    @wsy/web:dev:partial:docker: at (sc_server)/./src/app/layout.tsx (/Users/johan/dev-projects/weshipyou-monorepo/apps/web/.next/server/app/[lang]/admin/page.js:10142:1)
    @wsy/web:dev:partial:docker: at Function.webpack_require (/Users/johan/dev-projects/weshipyou-monorepo/apps/web/.next/server/webpack-runtime.js:33:43)
    @wsy/web:dev:partial:docker: digest: "3742216727"

Expected Behavior

working

Which browser are you using? (if relevant)

no response

How are you deploying your application? (if relevant)

no response

@joacub joacub added the bug Issue was opened via the bug report template. label Jul 13, 2023
@balazsorban44 balazsorban44 added the please add a complete reproduction The issue lacks information for further investigation label Jul 13, 2023
@github-actions
Copy link
Contributor

We cannot recreate the issue with the provided information. Please add a reproduction in order for us to be able to investigate.

Why was this issue marked with the please add a complete reproduction label?

To be able to investigate, we need access to a reproduction to identify what triggered the issue. We prefer a link to a public GitHub repository (template for pages, template for App Router), but you can also use these templates: CodeSandbox: pages or CodeSandbox: App Router.

To make sure the issue is resolved as quickly as possible, please make sure that the reproduction is as minimal as possible. This means that you should remove unnecessary code, files, and dependencies that do not contribute to the issue.

Please test your reproduction against the latest version of Next.js (next@canary) to make sure your issue has not already been fixed.

I added a link, why was it still marked?

Ensure the link is pointing to a codebase that is accessible (e.g. not a private repository). "example.com", "n/a", "will add later", etc. are not acceptable links -- we need to see a public codebase. See the above section for accepted links.

What happens if I don't provide a sufficient minimal reproduction?

Issues with the please add a complete reproduction label that receives no meaningful activity (e.g. new comments with a reproduction link) are automatically closed and locked after 30 days.

If your issue has not been resolved in that time and it has been closed/locked, please open a new issue with the required reproduction.

I did not open this issue, but it is relevant to me, what can I do to help?

Anyone experiencing the same issue is welcome to provide a minimal reproduction following the above steps. Furthermore, you can upvote the issue using the 👍 reaction on the topmost comment (please do not comment "I have the same issue" without reproduction steps). Then, we can sort issues by votes to prioritize.

I think my reproduction is good enough, why aren't you looking into it quicker?

We look into every Next.js issue and constantly monitor open issues for new comments.

However, sometimes we might miss one or two due to the popularity/high traffic of the repository. We apologize, and kindly ask you to refrain from tagging core maintainers, as that will usually not result in increased priority.

Upvoting issues to show your interest will help us prioritize and address them as quickly as possible. That said, every issue is important to us, and if an issue gets closed by accident, we encourage you to open a new one linking to the old issue and we will look into it.

Useful Resources

@mmintel
Copy link

mmintel commented Jul 14, 2023

@joacub had the same issue after update but was related to sentry plugin

@navFooh
Copy link

navFooh commented Jul 14, 2023

Having the same issue here as well.

This configuration works fine:

  • @sentry/nextjs at 7.58.1
  • next at 13.4.9

Updating next to 13.4.10 causes Cannot destructure property 'RawSource' of 'require(...)' as it is undefined.

@godfrednanaowusu
Copy link

godfrednanaowusu commented Jul 14, 2023

I can't reproduce on latest Sentry - just upgraded to 7.58.1 and error went away.

sorry it doesnt solve the problem of the rawsource

@nimaa77
Copy link

nimaa77 commented Jul 14, 2023

I have these versions installed

@sentry/nextjs: 7.58.1, next: 13.4.10

and get the same 'RawSource' of 'require(...)' as it is undefined. error
maybe it's related to the i18n config?

I'm using next-intl: 3.0.0-beta.8

@web-steel
Copy link

web-steel commented Jul 14, 2023

try added transpilePackages: [ '@sentry/nextjs' ] in next.config.js

@DrChrispoper
Copy link

DrChrispoper commented Jul 14, 2023

I can confirm
This configuration works fine:

  • @sentry/nextjs at 7.58.1
  • next at 13.4.9
    But this version doesn't
  • next at 13.4.10

So I updated from "next": "^13.4.9" to "next": "13.4.9" to deploy that specific version

@navFooh
Copy link

navFooh commented Jul 14, 2023

try added transpilePackages: [ '@sentry/nextjs' ] in next.config.js

Doesn't work for me

@jknight12882
Copy link

jknight12882 commented Jul 14, 2023

Also experiencing this issue. Started with next@13.4.10

@joacub
Copy link
Author

joacub commented Jul 14, 2023

none of the solutions works, updating sentry does not work, there is something in the transpilers that is not working properly after 13.4.10, seems like is not locating the package properly. also there is other issues similar to this one, that can not locate the correct file

this maybe related: #52621

@HamAndRock
Copy link

Having same issues after updating from next@13.4.9 to next@13.4.10, even tried updating sentry like people are suggeting but that also didn't help.

@godfrednanaowusu
Copy link

for everyone having this issue, i had to revert to versions that worked, in my case

next = 13.4.7
@sentry/nextjs =7.57.0

these versions work

@creativoma
Copy link
Contributor

I also had the same problem. I had to revert the changes to a previous commit and not update Next to next@13.4.10.

@KrustyC
Copy link

KrustyC commented Jul 17, 2023

same here, problem started as soon as I update to next@13.4.10 and stopped as soon as I downgrade to 13.4.9

@grabbou
Copy link

grabbou commented Jul 17, 2023

FYI, there's beta release of Sentry SDK as mentioned in getsentry/sentry-javascript#8541, please try it out and report if it fixes the problem.

@jinsley8
Copy link

It looks like the issue occurs since 13.4.10-canary.5

getsentry/sentry-javascript#8541 (comment)

@GRA0007
Copy link

GRA0007 commented Jul 18, 2023

This issue has been fixed in Sentry release v7.59.0
https://github.com/getsentry/sentry-javascript/releases/tag/7.59.0

@emmgfx
Copy link

emmgfx commented Jul 18, 2023

Anyone has been able to install the new releases?

npm i @sentry/nextjs@7.59.0
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @sentry/nextjs@7.59.0.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm i @sentry/nextjs@7.59.1
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @sentry/nextjs@7.59.1.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

And @latest installs"@sentry/nextjs": "^7.58.1",

@DusanStojanovic-gowago
Copy link

I can confirm that it works for me:

"next": "^13.4.10",
"@sentry/nextjs": "^7.59.2",

@jonahallibone
Copy link

Is this a Next issue or a Sentry issue though? Afaik the Sentry team unsure why the 13.4.10 broke their Webpack import

@DusanStojanovic-gowago
Copy link

I believe the Next team made a change that caused the issue for Sentry. But the Sentry team found a workaround. That explains why upgrading the @sentry/nextjs fixed it, not vice-versa.

@Barokai
Copy link

Barokai commented Jul 19, 2023

maybe related: 13.4.10 had a change to how/when webpack is loaded: #52587

@jonahallibone
Copy link

maybe related: 13.4.10 had a change to how/when webpack is loaded: #52587

Ah yes this is what I was curious about

@jandolezal71
Copy link

jandolezal71 commented Jul 21, 2023

Looks like it is fixed in @sentry/nextjs 7.59.3 getsentry/sentry-javascript#8584

@balazsorban44
Copy link
Member

Hi, we (the Next.js team) just wanted to give a minor update here.

I believe the Next team made a change that caused the issue for Sentry. But the Sentry team found a workaround. That explains why upgrading the @sentry/nextjs fixed it, not vice-versa.

To sum it up, Sentry currently relies on some internal parts of Next.js which we cannot guarantee to be stable between releases. This is especially true for Webpack-related changes, which is why we have it mentioned in the docs as:

Good to know: changes to webpack config are not covered by semver so proceed at your own risk

https://nextjs.org/docs/app/api-reference/next-config-js/webpack

So updates (like #52587) could cause an issue like this one.

We are working with the Sentry team to address these issues in the future better.

Since this is not a Next.js bug, I'm going to close the issue, but feel free to leave your comments/thoughts!

@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. locked please add a complete reproduction The issue lacks information for further investigation
Projects
None yet
Development

No branches or pull requests