Skip to content

Move Sentry to NextJS Implementation#581

Merged
AlexJSully merged 2 commits into
mainfrom
549-typeerror-cannot-assign-to-read-only-property-push-of-object-object-array
May 14, 2026
Merged

Move Sentry to NextJS Implementation#581
AlexJSully merged 2 commits into
mainfrom
549-typeerror-cannot-assign-to-read-only-property-push-of-object-object-array

Conversation

@AlexJSully
Copy link
Copy Markdown
Owner

Noticed the following error TypeError: Cannot assign to read only property 'push' of object '[object Array]' which is caused by using the depreciated @sentry/integrations. Removed that package and modernized the Sentry implementation by using NextJS Instrumentation.

Also updated all packages and updated landing error check to be general rather than just hydration based.

@AlexJSully AlexJSully requested a review from Copilot May 14, 2026 03:16
@AlexJSully AlexJSully self-assigned this May 14, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
portfolio Ready Ready Preview, Comment May 14, 2026 3:28am

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes Sentry integration for the Next.js App Router by removing deprecated integrations usage and switching to Next.js instrumentation hooks, while also updating dependencies and strengthening the landing-page E2E error checks.

Changes:

  • Added Next.js instrumentation entrypoints (src/instrumentation.ts, src/instrumentation-client.ts) to hook Sentry into request errors and router transitions.
  • Removed deprecated @sentry/integrations usage and replaced it with @sentry/nextjs-provided console integration.
  • Updated dependencies and adjusted Cypress landing coverage to check for general console errors/uncaught errors rather than hydration-specific patterns.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/instrumentation.ts Adds server/edge instrumentation registration and exports onRequestError using Sentry’s Next.js hook.
src/instrumentation-client.ts Adds client instrumentation export for capturing router transition starts.
sentry.client.config.ts Removes deprecated integrations import and uses Sentry.captureConsoleIntegration() instead.
package.json Updates Next/React/Sentry and other dependency versions; removes @sentry/integrations.
cypress/e2e/landing.cy.ts Reworks landing E2E checks and adds a dedicated test to assert no console errors or uncaught errors on initial load.

@AlexJSully AlexJSully merged commit 2712e30 into main May 14, 2026
8 checks passed
@AlexJSully AlexJSully deleted the 549-typeerror-cannot-assign-to-read-only-property-push-of-object-object-array branch May 14, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError: Cannot assign to read only property 'push' of object '[object Array]'

2 participants