-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Not working from Next.js middleware (edge runtime) when not using src
folder
#9631
Comments
Assigning to @getsentry/support for routing ⏲️ |
Routing to @getsentry/product-owners-issues for triage ⏲️ |
Hi, can you try running a production build ( |
without
|
I unfortunately cannot reproduce this. On my Next.js 14 application without src folder and Can you please share a reproduction example? Either a github repo we can clone or a stackblitz or similar would be great. Thanks! |
Ok, I've created a repo, following the reported STR for each case: https://github.com/pladaria/sentry-middleware-issue-reproduction-repo There are two folders, After running both apps (dev and prod builds), I only get issues from the Verified that the middlewares are executed by looking at the console output logs |
Thank you for the reproduction! You are indeed right and found a very stupid bug. We don't correctly detect the existence of the |
Environment
SaaS (https://sentry.io/)
Steps to Reproduce
npx create-next-app sentry-test
. Create a new NextJS app with default values except thesrc
directory (selectNo
)src/
directory? … Nocd sentry-test
. Enter to the directorynpx @sentry/wizard@latest -i nextjs
. Run the sentry wizardmiddleware.ts
file (inside ./) that sends some traces to sentry, for example:yarn dev
. Run the dev server and openhttp://localhost:3000
Expected Result
Receive issues from the middleware
We can verify that the middleware gets executed by looking at the console.logs from the terminal
Actual Result
Not receiving issues from middleware
Product Area
Unknown
Link
No response
DSN
No response
Version
No response
The text was updated successfully, but these errors were encountered: