Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] iframe inside an iframe is not visible #5313

Closed
DoroNahari opened this issue Feb 4, 2021 · 5 comments
Closed

[BUG] iframe inside an iframe is not visible #5313

DoroNahari opened this issue Feb 4, 2021 · 5 comments

Comments

@DoroNahari
Copy link

Context:

  • Playwright Version: [1.7.1]
  • Operating System: [Mac]
  • Node.js version: [12, 14.9.0]
  • Browser: [Chromium, Firefox]

System:
OS: macOS 11.1
Memory: 1.25 GB / 32.00 GB
Binaries:
Node: 14.9.0 - /usr/local/bin/node
Yarn: 1.22.5 - /usr/local/bin/yarn
npm: 6.14.7 - /usr/local/bin/npm
Languages:
Bash: 3.2.57 - /bin/bash
npmPackages:
playwright: ^1.7.1 => 1.7.1

Describe the bug
I have a website with an iframe inside iframe such as:

<iframe src="https://host-x/">
<iframe src="https://host-x/webview/index.html></iframe>

</iframe>

On chrome when i go to this webside i can see the inner iframe.
When i'm running a test with playwright on this website, the inner iframe is blank. (when i open dev-tools, it's suddenly appears)
When i run the same chromium by my self i can see the inner iframe.

my test config:

            browser = await chromium.launch({headless: isHeadless, args: ["--start-maximized"]});
            page = await browser.newPage(
                {
                    viewport: isHeadless ? {
                            width: 1920,
                            height: 1080
                        } : null
                }
            );

Any idea what could be the issue?

@dgozman
Copy link
Contributor

dgozman commented Feb 5, 2021

Try launching like this, to see why Playwright makes it different:

const browser = await chromium.launch({
  ignoreDefaultArgs: ['--disable-features=TranslateUI,BlinkGenPropertyTrees,ImprovedCookieControls,SameSiteByDefaultCookies,LazyFrameLoading']
})

Otherwise, it's hard to help without a repro script.

@JoelEinbinder
Copy link
Contributor

Feel free to reopen this with more info. Thanks!

@odeliat
Copy link

odeliat commented Mar 2, 2021

I'm trying to figure out this issue.
I added the ignoreDefaultArgs but got the same result.

@dgozman
What are the propose of those ignoreDefaultArgs options?

@JoelEinbinder
What more information do you need?
I also tried it on a windows machine.

Can you please reopen this issue? we couldn't.

Do you have any further ideas on how to solve this?

@dgozman
Copy link
Contributor

dgozman commented Mar 2, 2021

@odeliat My snippet disabled some Chromium arguments that might affect iframes visibility.

What more information do you need?

Do you have a repro script by any chance? It is hard to help without a script, or at least a page url that exhibits this behavior.

@odeliat
Copy link

odeliat commented Mar 3, 2021

@dgozman
One way to reproduce this issue is to open theia IDE gitpod on Chromium.

  1. Open Theia Gitpod on a regular browser.
  2. Click Open on the master branch:
    Screenshot 2021-03-03 140404
  3. Copy the url of the gitpod and open it at Chromium.
  4. Login with your git/bitbucket account.
  5. Wait for Theia to open.
  6. Click on the extensions pane:
    Screenshot 2021-03-03 140706
  7. Search for 'Browser Preview' and install it:
    Screenshot 2021-03-03 140837
  8. A new icon will appear on the left. Click on it and you need to see a webview but in the Chromium it does not show
    (in the screenshot we see the desired result)
    Screenshot 2021-03-03 141529

You can do the same steps on a regular browser and see that it does show.

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

No branches or pull requests

4 participants