This is an exemple how to reproduce a certain bug when it comes to Intercom with Nextjs
First set the environment variable NEXT_PUBLIC_INTERCOM_APP_ID
- Open the website on mobile or with chrome mobile simulation
- Open the Intercom
- Clost the intercom
- Click on test to navigate to the test page
The test page
redirect-boundary.js:61 Uncaught TypeError: Cannot read properties of null (reading 'removeChild')
at unmountHoistable (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:35632:23)
at commitDeletionEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:20927:13)
at commitDeletionEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:20891:5)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21291:9)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21758:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21758:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21366:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21327:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21366:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21366:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21327:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21327:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21758:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21758:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21758:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21758:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21758:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21327:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21366:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21327:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21327:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21327:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21327:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21327:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21758:9)
at recursivelyTraverseMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21305:7)
at commitMutationEffectsOnFiber (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21563:11)
at commitMutationEffects (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21275:3)
at commitRootImpl (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:24994:5)
at commitRoot (webpack-internal:///(:3001/app-client)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:24860:5)
It looks like it is working as expecting if we first navigate and then open/close the Intercom
This is a Next.js project bootstrapped with create-next-app
.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx
. The page auto-updates as you edit the file.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.