Skip to content

Fix(deployment-id): prevent exception on old webkit#94604

Open
kyamaz99 wants to merge 2 commits into
vercel:canaryfrom
kyamaz99:fix/dataset-delete-old-webkit
Open

Fix(deployment-id): prevent exception on old webkit#94604
kyamaz99 wants to merge 2 commits into
vercel:canaryfrom
kyamaz99:fix/dataset-delete-old-webkit

Conversation

@kyamaz99

@kyamaz99 kyamaz99 commented Jun 9, 2026

Copy link
Copy Markdown

What?

Start a next application after 16.2.0 in a safari 9 which is used in playstation 4.
The application will error with this message
TypeError: Unable to delete property

Why?

We narrow down the problem to this line

delete document.documentElement.dataset.dplId
in
packages/next/src/shared/lib/deployment-id.ts

It seems to be related of how webkit implemented dataset, as discussed in this thread

How?

replace
this line

delete document.documentElement.dataset.dplId;
with
document.documentElement.removeAttribute('data-dpl-id');

if data cannot be deleted , we can remove the attribute.
It should achieve the same with a different syntax

Fixes #
#94601

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Failing test suites

Commit: 39e7ae9 | About building and testing Next.js

pnpm test-start test/production/app-dir/metadata-static-route-cache/metadata-static-route-cache.test.ts (job)

  • app dir - metadata static routes cache > should generate different content after replace the static metadata file (DD)
Expand output

● app dir - metadata static routes cache › should generate different content after replace the static metadata file

next already started

  65 |   ) {
  66 |     if (this.childProcess) {
> 67 |       throw new Error('next already started')
     |             ^
  68 |     }
  69 |
  70 |     this._cliOutput = ''

  at NextStartInstance.start (lib/next-modes/next-start.ts:67:13)
  at Object.start (production/app-dir/metadata-static-route-cache/metadata-static-route-cache.test.ts:17:16)

pnpm test-start test/e2e/telemetry/telemetry.test.ts (job)

  • Telemetry CLI > production mode > cli session: babel tooling config (DD)
  • Telemetry CLI > production mode > cli session: custom babel config (plugin) (DD)
  • Telemetry CLI > production mode > cli session: package.json custom babel config (plugin) (DD)
  • Telemetry CLI > production mode > cli session: custom babel config (preset) (DD)
  • Telemetry CLI > production mode > cli session: next config with webpack (DD)
  • Telemetry CLI > production mode > detect static 404 correctly for next build (DD)
  • Telemetry CLI > production mode > detect page counts correctly for next build (DD)
Expand output

● Telemetry CLI › production mode › cli session: babel tooling config

can not run export while server is running, use next.stop() first

  253 |   ) {
  254 |     if (this.childProcess) {
> 255 |       throw new Error(
      |             ^
  256 |         `can not run export while server is running, use next.stop() first`
  257 |       )
  258 |     }

  at NextStartInstance.build (lib/next-modes/next-start.ts:255:13)
  at build (e2e/telemetry/telemetry.test.ts:196:42)
  at NextStartInstance.runWithTempContent [as patchFile] (lib/next-modes/base.ts:962:15)
  at Object.<anonymous> (e2e/telemetry/telemetry.test.ts:195:7)

● Telemetry CLI › production mode › cli session: custom babel config (plugin)

can not run export while server is running, use next.stop() first

  253 |   ) {
  254 |     if (this.childProcess) {
> 255 |       throw new Error(
      |             ^
  256 |         `can not run export while server is running, use next.stop() first`
  257 |       )
  258 |     }

  at NextStartInstance.build (lib/next-modes/next-start.ts:255:13)
  at build (e2e/telemetry/telemetry.test.ts:219:42)
  at NextStartInstance.runWithTempContent [as patchFile] (lib/next-modes/base.ts:962:15)
  at Object.<anonymous> (e2e/telemetry/telemetry.test.ts:218:7)

● Telemetry CLI › production mode › cli session: package.json custom babel config (plugin)

can not run export while server is running, use next.stop() first

  253 |   ) {
  254 |     if (this.childProcess) {
> 255 |       throw new Error(
      |             ^
  256 |         `can not run export while server is running, use next.stop() first`
  257 |       )
  258 |     }

  at NextStartInstance.build (lib/next-modes/next-start.ts:255:13)
  at build (e2e/telemetry/telemetry.test.ts:246:42)
  at NextStartInstance.runWithTempContent [as patchFile] (lib/next-modes/base.ts:962:15)
  at Object.<anonymous> (e2e/telemetry/telemetry.test.ts:245:7)

● Telemetry CLI › production mode › cli session: custom babel config (preset)

can not run export while server is running, use next.stop() first

  253 |   ) {
  254 |     if (this.childProcess) {
> 255 |       throw new Error(
      |             ^
  256 |         `can not run export while server is running, use next.stop() first`
  257 |       )
  258 |     }

  at NextStartInstance.build (lib/next-modes/next-start.ts:255:13)
  at build (e2e/telemetry/telemetry.test.ts:269:42)
  at NextStartInstance.runWithTempContent [as patchFile] (lib/next-modes/base.ts:962:15)
  at Object.<anonymous> (e2e/telemetry/telemetry.test.ts:268:7)

● Telemetry CLI › production mode › cli session: next config with webpack

can not run export while server is running, use next.stop() first

  253 |   ) {
  254 |     if (this.childProcess) {
> 255 |       throw new Error(
      |             ^
  256 |         `can not run export while server is running, use next.stop() first`
  257 |       )
  258 |     }

  at NextStartInstance.build (lib/next-modes/next-start.ts:255:13)
  at build (e2e/telemetry/telemetry.test.ts:292:42)
  at NextStartInstance.runWithTempContent [as patchFile] (lib/next-modes/base.ts:962:15)
  at Object.<anonymous> (e2e/telemetry/telemetry.test.ts:291:7)

● Telemetry CLI › production mode › detect static 404 correctly for next build

can not run export while server is running, use next.stop() first

  253 |   ) {
  254 |     if (this.childProcess) {
> 255 |       throw new Error(
      |             ^
  256 |         `can not run export while server is running, use next.stop() first`
  257 |       )
  258 |     }

  at NextStartInstance.build (lib/next-modes/next-start.ts:255:13)
  at Object.build (e2e/telemetry/telemetry.test.ts:326:40)

● Telemetry CLI › production mode › detect page counts correctly for next build

can not run export while server is running, use next.stop() first

  253 |   ) {
  254 |     if (this.childProcess) {
> 255 |       throw new Error(
      |             ^
  256 |         `can not run export while server is running, use next.stop() first`
  257 |       )
  258 |     }

  at NextStartInstance.build (lib/next-modes/next-start.ts:255:13)
  at Object.build (e2e/telemetry/telemetry.test.ts:337:40)

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Stats cancelled

Commit: 39e7ae9
View workflow run

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.

2 participants