playwright
playwright copied to clipboard
[BUG] Buttons and Text in popup missing when run in Firefox
Context:
- Playwright Version: 1.22
- Operating System: Mac OS
- Node.js version: 16.15.0
- Browser: Firefox
- Extra: Seems to be a new issue
Code Snippet
Describe the bug
This seems to be a recent issue. When the test is running in Firefox, the buttons and text within a popup are invisible, even thought the buttons and text are visible in the timeline screenshots. On Chrome, the buttons can be interacted with and the test passes fine. Included are screenshots of the test failure in the trace, showing the buttons and text missing, and a screenshot of the timeline screenshot showing the buttons and text being visible. I even did s debug wait for ten second to make sure the popup is fully loaded, but that did not help it.
Screenshot of test failure (showing no button or texts). https://freeimage.host/i/hwquwB Screenshot of the test timeline showing the buttons and text of the popup visible. https://freeimage.host/i/hwqTuV
When the test is running in Firefox, the buttons and text within a popup are invisible, even thought the buttons and text are visible in the timeline screenshots
- By "timeline screenshots" do you mean filmstrip in the trace viewer?
- "within a popup are invisible" - do you mean in the real browser (you run it in headed mode), or in the snapshots in the trace viewer?
To better help you, could you please provide a repro that we can run locally to reproduce the issue? Also, attaching trace files from both successful and unsuccessful runs might help.
@dgozman I tried getting the trace, but now I am having an issue where Firefox is crashing before it even gets to that part of the test. Honestly, Firefox is seeming quite buggy right now. If I can get it to work, I will include a trace file. Sorry about that.
- By "timeline screenshots" do you mean filmstrip in the trace viewer?
- "within a popup are invisible" - do you mean in the real browser (you run it in headed mode), or in the snapshots in the trace viewer?
Yes, I mean the filmstrip in the trace viewer. The real browser shows the text and button when run in headed, and shows in the filmstrip in the trace viewer when run headless. But the snapshot below in the trace viewer does not show them.
@dgozman I tried getting the trace, but now I am having an issue where Firefox is crashing before it even gets to that part of the test. Honestly, Firefox is seeming quite buggy right now. If I can get it to work, I will include a trace file. Sorry about that.
That's sad. If you have some logs from the Firefox crash, perhaps we would be able to fix that.
Yes, I mean the filmstrip in the trace viewer. The real browser shows the text and button when run in headed, and shows in the filmstrip in the trace viewer when run headless. But the snapshot below in the trace viewer does not show them.
Thank you for clarifying. So the issue is with tracing snapshots not showing the buttons. Sounds like a bug in the snapshotter. If you could share your script (and page url), we'll be able to fix the issue!
I am trying to figure out a good way to share a repo with you. The test I am writing is on production code and requires authentication to get in. It is stored on a private GitHub repo. Let me see how I can get a mimic set up and provide you with that. I will let you know once I have something. It would be great to have someone look into this, as we would love to use Firefox in our testing.
I spoke to my manager. He agrees we need to get you access to something. Giving you the Playwright test code will be super easy, but access to a site will take some time. The sites I test on need VPN access, so we will need to get you access to a production instance. That has a lot of blockers involving access to make one. My manager is looking into it and, once we get one set up, I will send you the test repo and URL so you can look into this further with me. Thanks for helping!
Closing at part of triage, but please re-open if you have additional information or repros to share. Thanks!
@dgozman I am sorry for the long delay. There was a lot of red tape to get allowance for, and to set up a test site in production. But I think I have it all ready. Where would be the best place to send the zip file with the code and a the URL for the site?
Send me all the details to dgozman [at] microsoft [dot] com
Email has been sent.
Let me know if you need any help with working with it.
(assigned to Dima so that we don't forget about this)
@eatonjl Unfortunately, I don't see an email with additional information. Perhaps, a spam filter? Could you try again, maybe without an attachment for now?
I sent a test email without any attachment.
Full email sent after receiving your confirmation email.
Were you able to get the attached file from me?
Thanks for the archive! I did play with it, but failed to reproduce the issue so far. In the included traces I don't see the popup dialog at all, am I missing it somehow?
I tried to run tests myself with @playwright/[email protected]
. Is there a specific one I should run? For example, when running reviewandapprovalshould.spec.ts
, I am not able to reproduce the original issue. However, it always fails for me with the following error:
1) [firefox] › reviewandapprovalshould.spec.ts:41:2 › Review Document2 › Send Document To Review =
TypeError: Cannot read properties of undefined (reading 'childFrames')
This seems like an internal error in Playwright that we should fix. Do you get the same error when running the tests? Overall, am I doing the right thing, or perhaps you could let me know how to reproduce the issue?
Thanks for checking! I did notice the issue you mentioned. If you view the trace files you can see that the timeline view shows the pages as blank, almost like it is losing information about the page. I tried it locally and wasn’t able to reproduce one of the issues at first (the one where the popup is missing text) I removed line 17 in the draftandcollaborationshould.spec.ts file (it was a temp line added while we fixed a bug in our code and was added after I reported this issue). I had to run it headless twice after that, but I saw the error again. As for Firefox crashing while running, I haven’t reproduced that yet. I will see if I can get it to happen again.
@dgozman Ok, I did some more investigating. I was able to get the error you got when you tried. That would be great to get that fixed. I also am still getting the missing text on the popup, but it isn't consistent. I no longer am experiencing Firefox crashing (maybe Firefox had an update). I am not seeing these issues in the other browsers.
And when I say that the blank text on the popup is not a consistent issue, I should say I don't see that specific error all the time because other errors sometimes occur before it, not that it sometimes works.
@eatonjl I played with it more, following your instructions. Unfortunately, I was not able to repro the blank popup - perhaps it's racy enough to not repro on my computer.
The Cannot read properties of undefined (reading 'childFrames')
error is blocking approximately half of the runs for me. We'll work on fixing that first, see issue #9840 for tracking it.
@dgozman Thanks for checking again! I have a hard time reproducing it at times because of the Cannot read properties of undefined (reading 'childFrames') error as well. I agree that we can wait for that fix and then see if it is still happening after that point. I see the if was put in for 1.23 then removed and put into 1.24, then removed and put into 1.25. Then it was removed from 1.25. Any idea if it will be going back into 1.25 or into 1.26?
@eatonjl Fix for the childFrames
issue depends on a larger refactoring in Firefox code, so no precise ETA yet, unfortunately.
Thanks for letting me know. I will keep an eye on that issue. Firefox will be a no-go for us until that can be fixed. Thanks!
We have updated the Firefox after the large refactoring, as an example it fixed #9840, so let's see how it will behave with the next v1.28.0 release. I'll close this issue for now, but please open a new one if you encounter problems after the next release.
@dgozman Thanks for the update. I just gave this a try with next v.1.28.0 ( but still had issues with popups not showing text as well as with "TypeError: Cannot read properties of undefined (reading 'childFrames')". I will a new one to continue the investigation.