[Bug]: Microsoft SAML login closes page on Edge since 1.60; adding --enable-automation fixes regression
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
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— ✅ works1.60.0— ❌ fails- later stable versions — ❌ fail
- latest
@next/ canary — ❌ fails 1.60.0with--enable-automationexplicitly 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.comSAML 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
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/playwright
-
[Feature]: Set `this.name` in `TargetClosedError` constructorQuizá libre de nuevo @LeonxLJX la tomó hace 42 días y no hay ningún pull request abierto. AbiertoP3-collecting-feedback
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
microsoft/playwright#42522 · 7 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Bug]: mouse movement deltas is 0 in mouse events in webkitPosiblemente ocupada @yury-s la tomó hoy. Abiertobrowser-webkit v1.65
microsoft/playwright#43417 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Bug]: WebKit (WPE) web process aborts at exit in PlatformDisplay::sharedDisplay() since 1.64 (webkit-2370)Posiblemente ocupada @yury-s la tomó hace 1 día. Abiertobrowser-webkit v1.65
microsoft/playwright#43394 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Chromium 149 headless shell crashes in service-worker DevTools resource loading during context teardownPosiblemente ocupada @yury-s la tomó hace 1 día. Abiertobrowser-chromium upstream v1.65
microsoft/playwright#43374 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Feature]: Allow `retryStrategy: 'isolated'` in test.describe.configure() for tests requiring zero background workersPosiblemente ocupada @yury-s la tomó hoy. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 22/100
microsoft/playwright#43351 · 7 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de microsoft/playwright
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 75/100
siyuan-note/siyuan#20629 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Volume eject does not refuse system, root or /home mountsPosiblemente ocupada @bernardopg la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
spacedriveapp/spacedrive#3159 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
melgarafael/DeskcommCRM#3000 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
callstackincubator/simlock#639 ·
Los mantenedores suelen responder en 1 día