You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
run git clone https://github.com/Leo1212/sentry-nextjs-issue.git
run cd sentry-nextjs-issue
run yarn
run yarn run next build
See the result --> error building
Change in the package.json the version of @sentry/nextjs to 7.16.0
run yarn
run yarn run next build
build --> success
Expected Result
A successful NextJS build.
Route (pages) Size First Load JS
┌ ○ / (394 ms) 4.33 kB 116 kB
├ └ css/ae0e3e027412e072.css 707 B
├ /_app 0 B 112 kB
├ ○ /404 181 B 112 kB
└ λ /api/hello 0 B 112 kB
+ First Load JS shared by all 112 kB
├ chunks/framework-8c5acb0054140387.js 45.4 kB
├ chunks/main-f2e125da23ccdc4a.js 26.7 kB
├ chunks/pages/_app-dfb8b8961ce26b8d.js 38.6 kB
├ chunks/webpack-94547de1949c56d7.js 950 B
└ css/ab44ce7add5c3d11.css 247 B
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
○ (Static) automatically rendered as static HTML (uses no initial props)
Done in 14.59s.
Actual Result
The build fails do to the sentry implementation of the _document.tsx file. If you delete ist, it works. But I need this file.
Funny thing is, it worked on the older versions of @sentry/nextjs (7.16.0 and below).
Leo1212
changed the title
NextJs _document.tsx implmentation broken since version 7.17.0
Next.js _document.tsx implmentation broken since version 7.17.0
Dec 9, 2022
Hi, thanks for reporting this. I can see what is going wrong here. I believe we're not properly passing this context to the wrapped getInitialProps function of the _document component that @rest-hooks exports.
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.24.2
Framework Version
React 18.2.0
Link to Sentry event
No response
Steps to Reproduce
git clone https://github.com/Leo1212/sentry-nextjs-issue.git
cd sentry-nextjs-issue
yarn
yarn run next build
package.json
the version of@sentry/nextjs
to7.16.0
yarn
yarn run next build
Expected Result
A successful NextJS build.
Actual Result
The build fails do to the sentry implementation of the
_document.tsx
file. If you delete ist, it works. But I need this file.Funny thing is, it worked on the older versions of @sentry/nextjs (7.16.0 and below).
The same issue is also mentioned here: vercel/next.js#36221 (comment)
The text was updated successfully, but these errors were encountered: