Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Bug]: Microsoft SAML login closes page on Edge since 1.60; adding --enable-automation fixes regression

Abierto
#42,379 7 comentarios 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

  • #42403 de @dcrousso — cerrado sin fusionar

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
testing-qa

Línea de trabajo

Comienza comparando los argumentos de lanzamiento de Chromium de Playwright 1.59.1 y 1.60.0, centrándote en la eliminación de --enable-automation. Reproduce el flujo SAML de Microsoft Entra ID con channel: 'msedge' en el entorno de Edge administrado y, a continuación, verifica que la página permanezca abierta y redirija correctamente sin añadir el argumento manualmente.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

P3-collecting-feedback
Version

1.60.0

Steps to reproduce

[Bug]: Microsoft SAML login closes page on Edge since 1.60; adding --enable-automation fixes regression

Version

Regression starts with Playwright 1.60.0.

  • 1.59.1 — ✅ works
  • 1.60.0 — ❌ fails
  • later stable versions — ❌ fail
  • latest @next / canary — ❌ fails
  • 1.60.0 with --enable-automation explicitly added — ✅ works

Environment

  • OS: Windows 10 win64
  • Node.js: v22.13.0
  • Browser: Microsoft Edge 151
  • Browser configuration: channel: 'msedge'
  • Edge is organization-managed through enterprise policies
  • The same installed Edge binary/version is used for all Playwright versions tested
  • Authentication: Microsoft Entra ID / login.microsoftonline.com SAML flow
  • Playwright: Node.js / TypeScript

Description

After upgrading from Playwright 1.59.1 to 1.60.0, our Microsoft SAML authentication flow started closing the Playwright page immediately after the final Sign in action.

The application, machine and browser environment are unchanged.

The important finding is that explicitly restoring the Chromium/Edge launch argument:

--enable-automation

makes the authentication flow work again with Playwright 1.60.0.

This appears significant because --enable-automation was present in Playwright's Chromium launch arguments in 1.59.1 but is no longer present starting with 1.60.0.

Reproduction

Our Playwright configuration normally contains:

use: {
  channel: 'msedge',
}

The test navigates through our application authentication flow to:

https://login.microsoftonline.com/...

and performs the Microsoft login.

Simplified example:

await page.getByLabel('Password').fill(password);

await page
  .getByRole('button', { name: 'Sign in' })
  .click();

With Playwright 1.59.1, Microsoft completes the SAML redirect back to the application normally.

With Playwright 1.60.0 and every newer version tested, the click itself succeeds, but shortly afterwards Playwright reports that the page has been closed.

For diagnostics I added:

page.on('close', () => {
  console.log('PAGE CLOSED');
});

page.on('crash', () => {
  console.log('PAGE CRASHED');
});

browser?.on('disconnected', () => {
  console.log('BROWSER DISCONNECTED');
});

The observed event is:

PAGE CLOSED

The failure can subsequently surface as:

Target page, context or browser has been closed

depending on which Playwright operation is awaiting the page at that moment.

Originally this surfaced from waitForResponse(), but removing all response/token handling did not change the behavior. The page still closes after the Microsoft Sign in action.

Important finding / workaround

With Playwright 1.60.0, changing only the launch configuration to:

use: {
  channel: 'msedge',

  launchOptions: {
    args: ['--enable-automation'],
  },
}

fixes the issue.

The Microsoft SAML login and redirect then complete successfully.

Therefore the comparison is:

Same machine
Same managed Edge
Same Edge version
Same application
Same authentication flow

Playwright 1.59.1                         PASS
Playwright 1.60.0                         FAIL
Playwright > 1.60                         FAIL
Playwright @next                          FAIL

Playwright 1.60.0 + --enable-automation   PASS

I also tested whether the Edge-specific msForceBrowserSignIn feature was responsible by changing the corresponding --disable-features configuration.

That did not fix the issue.

Only restoring:

--enable-automation

has fixed it so far.

Expected behavior

Expected behavior

Microsoft SAML authentication should complete successfully after clicking Sign in, and the existing Edge page should continue the redirect back to the application without being closed.

This is the behavior observed with Playwright 1.59.1 and also with Playwright 1.60.0 when --enable-automation is explicitly restored.

Actual behavior

Actual behavior

Starting with Playwright 1.60.0, the page is closed during/after the Microsoft authentication redirect.

Adding --enable-automation restores the previous working behavior.

Additional context

The Microsoft Edge installation is controlled by organization enterprise policies, so changing the browser version is not possible.

However, this makes the regression comparison quite controlled: all Playwright versions are tested against the same Edge installation and version.

This seems potentially related to #41348, which reports a Playwright 1.60 regression around Microsoft Entra/OAuth cross-origin navigation and TargetClosedException.

The additional observation here is that the regression can be deterministically avoided by restoring --enable-automation.

It may be worth investigating whether removing --enable-automation in Playwright 1.60 changes Microsoft Edge behavior under enterprise policies during Entra/SAML authentication.

Additional context

No response

Environment
System:
  OS: Windows 11 10.0.26100
  CPU: (8) x64 Intel Xeon Processor (Cascadelake)
  Memory: 16.48 GB / 31.88 GB

Binaries:
  Node: 22.13.0 - C:\Program Files\nodejs\node.EXE
  npm: 10.9.2 - C:\Program Files\nodejs\npm.CMD

IDEs:
  VSCode: 1.100.0 - C:\Program Files\Microsoft VS Code\bin\code.CMD

npmPackages:
  @playwright/test: ^1.60.0 => 1.60.0
  playwright-bdd: ^9.2.0 => 9.2.0
  playwright-mail-reporter: ^0.0.10 => 0.0.10
Lenguaje dominante
TypeScript
Estrellas
97.4k
Forks
6.6k
Merge medio
18 h 53 min
PR fusionados (30 d)
307

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/playwright

Todos los issues de microsoft/playwright

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.