playwright
playwright copied to clipboard
[BUG] "TypeError: Cannot read properties of undefined (reading 'childFrames')" when running tests in Firefox
Context:
- Playwright Version: 1.28.0-alpha-oct-28-2022
- Operating System: Mac (M1 Pro)
- Node.js version: v16.16.0
- Browser: Firefox
- Extra:
Code Snippet
import { test } from '@playwright/test';
test('test', async ({ page }) => {
await page.goto(
'https://id2.navexglobal.com/SecureTokenServer/Auth/SamlLogin?SAMLRequest=jZJfa9swFMW%2FitF7LFsLaSbiQNpQFsg2t3b7sJciy9eJmCy5ulL%2FfPvKzko7xkpBD%2BLq8Lv3nKsVil4PfBP80VzDfQD0yVOvDfLpoSDBGW4FKuRG9IDcS15tvu85SzM%2BOOuttJokG0RwXllzYQ2GHlwF7kFJuLneF%2BTo%2FYCc0tZa1wuTGvEATwdtG6FTaXtaHVXTWA3%2BmCJaOuIZLX9WNUm2cR5lxEh%2B46iW%2FcsAGRzU9jeYsTU4OlqiVTSxtwdlSLLbFuSuW3YLaDNYZPOzufwSTytFEy9z1nXZYhlliAF2Br0wviAsY2yWZzO2rFnG48m%2F%2FiJJ%2Bcf3uTKtMoePQ2pOIuTf6rqcnWzdgsPJUhSQ9WqMmk%2BN3bvwP8aK18TJ%2BvP5rui7Vqe%2BA%2F8R2bttabWSz8lGa%2Ft44UB4KEhOkssR6f8%2FSp7mU0W1s26S8mBwAKk6BS1JqnKkXwWhx4IriAje9tM%2BfVwtKg%2BErk9j%2Ff0L1y8%3D&RelayState=cookie%3A1666988419_8131'
);
await page.getByPlaceholder('User name').fill('Martin1');
await page.getByPlaceholder('Password').fill([PASSWORD]);
await page.getByRole('button', { name: 'Sign In' }).click();
await page
.getByRole('link', { name: 'Policy & Procedure Management' })
.click();
await page.locator('id=SideBar_NewDocuments').click();
const [page1] = await Promise.all([
page.waitForEvent('popup'),
page.getByRole('link', { name: 'HTML Document HTML Document' }).click(),
]);
await page1
.frameLocator('iframe[name="WizardPanelPropertiesEdit_Iframe"]')
.locator('input[name="ctl00\\$ContentPlaceHolder1\\$TitleField"]')
.fill('Test');
await page1
.frameLocator('iframe[name="WizardPanelPropertiesEdit_Iframe"]')
.getByRole('button', { name: 'Save' })
.click();
await page1.getByRole('cell', { name: 'Reviewers' }).click();
await page1
.frameLocator('iframe[name="WizardPanelPropertiesEdit_Iframe"]')
.frameLocator('#UserFinderFrame')
.locator('input[type="checkbox"]')
.check();
await page1
.frameLocator('iframe[name="WizardPanelPropertiesEdit_Iframe"]')
.getByRole('button', { name: 'Save' })
.click();
await page1.getByRole('cell', { name: 'Approvers' }).click();
await page1
.frameLocator('iframe[name="WizardPanelPropertiesEdit_Iframe"]')
.frameLocator('#UserFinderFrame')
.locator('input[type="checkbox"]')
.check();
await page1
.frameLocator('iframe[name="WizardPanelPropertiesEdit_Iframe"]')
.getByRole('button', { name: 'Save' })
.click();
});
Describe the bug
NOTICE - The password for this test is missing. Upon request, I can privately message it to whomever will be reviewing this issue.
As per the request on this issue and this issue, I am opening a new issue. When running tests in Firefox, I am getting the following error: TypeError: Cannot read properties of undefined (reading 'childFrames')
I tried using next 1.28.0 which purportedly fixed it, but it still seems to be ran issue.
@eatonjl can you please send the password privately to me at [email protected] ?
@aslushnikov I sent it.
I can reproduce it. When running under VS Code the browser closes after await page1.getByRole('cell', { name: 'Reviewers' }).click();
Still got the issue on Playwright Python 1.28 Firefox
-

-
Sometime the log only show Frame got detach
after click button submit
iframe.type("#input2", 'myvalue!', delay=100) self.enter() // then redirect to another page called pageX self.wait_element_loading("text=Value on ", 5000) // text on pageX
@dgozman and @aslushnikov is there any update on this issue that you are able to share?
@eatonjl we debugged the root cause of this issue to an incorrect juggler event instrumentation in firefox but were not able to come up with a legit fix so far.
@aslushnikov thank you for the update! We are excited for when this is fixed and we can begin testing on Firefox.
Should be fixed in the future by #20271.
@dgozman Thank you for the update!
@dgozman What version is this fix being applied to?
@eatonjl Should be in v1.31.
@dgozman Thank you!
@eatonjl we would also appreciate if you try it out using @playwright/test@next!
@dgozman How do I call that from the terminal?
@eatonjl you can install canary version as npm i @playwright/test@next. It should update your package.json. See also https://playwright.dev/docs/next/canary-releases
@aslushnikov Thank you for confirming. I thought it was that but I get "Error: ENOENT: no such file or directory, uv_cwd" when I try it. I will look around and see what is wrong with my build.
@aslushnikov Please disregard. I got it working. I had to completely close out and reopen VSCode to get it to work. Thank you! I will begin testing.
@dgozman I gave it a try. I think the issue is fixed, but there is now a problem where reloading the page times out and fails. Would you like me to create a new issue for it, even thought it is still in canary?
@eatonjl Yep, a new issue with a repro would be great! It seems like your scenarios have the best coverage for Firefox 😄