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

Next13 app dir support #6290

Closed
3 tasks done
cipriancaba opened this issue Nov 24, 2022 · 11 comments
Closed
3 tasks done

Next13 app dir support #6290

cipriancaba opened this issue Nov 24, 2022 · 11 comments
Assignees
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK Type: Bug

Comments

@cipriancaba
Copy link

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/nextjs

SDK Version

7.21.1

Framework Version

React 18 Nextjs 13

Link to Sentry event

No response

Steps to Reproduce

  1. follow the docs
  2. errors not being reported

Expected Result

Errors being reported to sentry

Actual Result

No errors reported to sentry

@AbhiPrasad
Copy link
Member

Hi @cipriancaba - let's dig into why this is happening!

To help us debug, could you provide where you ran Sentry + Next (locally, server, Vercel, etc.). A reproduction would be even better!

If you provide debug: true as a option to your Sentry.init call, what does that show? Do you see any logs that indicate some kind of error?

Thanks!

@AbhiPrasad AbhiPrasad added Status: Needs Information Package: nextjs Issues related to the Sentry Nextjs SDK labels Nov 24, 2022
@cipriancaba
Copy link
Author

Thanks for the quick reply. I think that the sentry.client.config and the sentry.server.config files never get called due to the webpack plugin not working with the latest nextjs version

here is a repro:
https://github.com/razvan-soare/sentry-next13-example

@AbhiPrasad
Copy link
Member

Ah yeah it's a dup of #6284 probably then, which we are fixing at the moment!

@AbhiPrasad
Copy link
Member

Closing as a duplicate!

@AbhiPrasad AbhiPrasad closed this as not planned Won't fix, can't repro, duplicate, stale Nov 24, 2022
@cipriancaba
Copy link
Author

cipriancaba commented Nov 24, 2022

Wouldn't be so sure @AbhiPrasad We've seen this problem with 7.20.1 too, just updated to the latest for the repro repo. Next13 adds a completely new folder structure which will definitely mess with the nextjs plugin https://nextjs.org/blog/next-13#new-app-directory-beta

@lforst
Copy link
Member

lforst commented Nov 25, 2022

The Next.js SDK currently doesn't support the app dir. That feature is still in beta and we will sit it out a bit until we can be confident that the instrumentation we add will not break users.

@sneko
Copy link

sneko commented Nov 28, 2022

Interested too :)

On my side everything was fine with the pages/ folder, I just wanted to migrate to app/ directory (by using appDir: true) to benefit from beta features but Sentry just errored in the CI/CD:

***:build: TypeError: Cannot read properties of undefined (reading 'replace')
***:build:     at Object.escapeStringForRegex (xxxxxxxxxxxx/node_modules/.pnpm/@sentry+utils@7.21.1/node_modules/@sentry/utils/cjs/string.js:147:22)
***:build:     at Object.newWebpackFunction [as webpack] (xxxxxxxxxxxx/node_modules/.pnpm/@sentry+nextjs@7.21.1_next@13.0.5+react@18.2.0/node_modules/@sentry/nextjs/cjs/config/webpack.js:91:38)
***:build:     at Object.getBaseWebpackConfig [as default] (xxxxxxxxxxxx/node_modules/.pnpm/next@13.0.5_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/build/webpack-config.js:1426:32)

image

I totally understand there is some work to be planned, so if someone succeeds in a near future, please share it here (even if that's a custom patch for now). In the meantime I will disable Sentry.

Thank you,

sneko added a commit to inclusion-numerique/mediature that referenced this issue Nov 28, 2022
@ramnes
Copy link

ramnes commented Dec 12, 2022

Definitely interested in app/ support as well.

Do you think there could be any kind of workaround in the meantime?

@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2023

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@yordis
Copy link
Contributor

yordis commented Jan 3, 2023

keep

@lforst
Copy link
Member

lforst commented Mar 13, 2023

Closing because error reporting should be stable now. Please follow our roadmap for more news on the app dir: #6726

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK Type: Bug
Projects
None yet
Development

No branches or pull requests

7 participants