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

Two SPC tests fail on Chrome/Edge with flaky webdriver error #33690

Closed
stephenmcgruer opened this issue Apr 19, 2022 · 1 comment · Fixed by #34559
Closed

Two SPC tests fail on Chrome/Edge with flaky webdriver error #33690

stephenmcgruer opened this issue Apr 19, 2022 · 1 comment · Fixed by #34559

Comments

@stephenmcgruer
Copy link
Contributor

From https://wpt.fyi/results/secure-payment-confirmation?label=experimental&label=master&aligned, both authentication-cross-origin.sub.https.html and enrollment-in-iframe.sub.https.html flaky-fail with an ERROR from webdriver:

ERROR message: target frame detached
  (Session info: chrome=102.0.4997.0)
Traceback (most recent call last):
  File "/home/test/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py", line 403, in run_func
    self.result = True, self.func(self.protocol, self.url, self.timeout)
  File "/home/test/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py", line 493, in do_testharness
    result = protocol.base.execute_script(
  File "/home/test/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py", line 50, in execute_script
    return method(script)
  File "/home/test/web-platform-tests/tools/webdriver/webdriver/client.py", line 20, in inner
    return func(self, *args, **kwargs)
  File "/home/test/web-platform-tests/tools/webdriver/webdriver/client.py", line 791, in execute_async_script
    return self.send_session_command("POST", "execute/async", body)
  File "/home/test/web-platform-tests/tools/webdriver/webdriver/client.py", line 659, in send_session_command
    return self.send_command(method, url, body, timeout)
  File "/home/test/web-platform-tests/tools/webdriver/webdriver/client.py", line 623, in send_command
    raise err
webdriver.error.WebDriverException: target frame detached (404): target frame detached
  (Session info: chrome=102.0.4997.0)

Remote-end stacktrace:

#0 0x55e43b2a73e9 <unknown>
#1 0x55e43b2429a3 <unknown>
#2 0x55e43af55c17 <unknown>
#3 0x55e43af4212e <unknown>
#4 0x55e43af410a0 <unknown>
#5 0x55e43af4158b <unknown>
#6 0x55e43af414e5 <unknown>
#7 0x55e43af486c8 <unknown>
#8 0x55e43af48af6 <unknown>
#9 0x55e43af428bc <unknown>
#10 0x55e43af42fd4 <unknown>
#11 0x55e43af42d42 <unknown>
#12 0x55e43af4227c <unknown>
#13 0x55e43af410a0 <unknown>
#14 0x55e43af4158b <unknown>
#15 0x55e43af5fc90 <unknown>
#16 0x55e43af58663 <unknown>
#17 0x55e43af582ce <unknown>
#18 0x55e43af58aae <unknown>
#19 0x55e43af58db7 <unknown>
#20 0x55e43af59128 <unknown>
#21 0x55e43af5975b <unknown>
#22 0x55e43afbc3de <unknown>
#23 0x55e43afa8a92 <unknown>
#24 0x55e43afbb5dc <unknown>
#25 0x55e43afa8983 <unknown>
#26 0x55e43af7eddb <unknown>
#27 0x55e43af7ffb5 <unknown>
#28 0x55e43b270700 <unknown>
#29 0x55e43b2825da <unknown>
#30 0x55e43b28230c <unknown>
#31 0x55e43b282b12 <unknown>
#32 0x55e43b271b3c <unknown>
#33 0x55e43b282d7d <unknown>
#34 0x55e43b263c7d <unknown>
#35 0x55e43b299708 <unknown>
#36 0x55e43b299892 <unknown>
#37 0x55e43b2b39ee <unknown>
#38 0x7f5730f46609 <unknown>
#39 0x7f57309ec293 <unknown>

Initial investigation from @KyleJu implied that it started failing on April 8th - https://wpt.fyi/results/secure-payment-confirmation?q=authentication-cross-origin.sub.https.html&run_id=5633278756257792&run_id=5714671674851328

I'm able to reproduce locally on my MacOS device with a Chrome Dev run.

I tried looking for other tests failing this way, but have been unable to find any, so perhaps the tests are doing something unsupported? They both use a temporary cross-origin iframe to do credential enrollment, hosting https://{{hosts[alt][]}}:{{ports[https][0]}}/secure-payment-confirmation/resources/iframe-enroll.html (and are the only users of that file I believe).

@stephenmcgruer stephenmcgruer changed the title Two SPC tests fail with flaky (?) webdriver error Two SPC tests fail with flaky webdriver error Apr 19, 2022
@stephenmcgruer stephenmcgruer changed the title Two SPC tests fail with flaky webdriver error Two SPC tests fail on Chrome/Edge with flaky webdriver error Apr 19, 2022
stephenmcgruer added a commit that referenced this issue Jun 21, 2022
This was accidentally broken in 00f9369, but went unnoticed due to
issue #33690 . Fixing the method 'fixes' the test
authentication-cross-origin.sub.https.html, though it still fails due to
the underlying issue #33690
stephenmcgruer added a commit that referenced this issue Jun 23, 2022
It turns out that these tests were accidentally responding to postMessages sent
by testdriver (instead of the ones sent by the test), and deleting the iframe
whilst it was still in use - which then caused webdriver errors. Fix this by
adding an explicit tag on the SPC-related messages and filtering for that.

This did expose another issue, which is that bless() seems not to be working
reliably (at all?) inside an iframe.

Fixes #33690
stephenmcgruer added a commit that referenced this issue Jun 23, 2022
This was accidentally broken in 00f9369, but went unnoticed due to
issue #33690 . Fixing the method 'fixes' the test
authentication-cross-origin.sub.https.html, though it still fails due to
the underlying issue #33690
stephenmcgruer added a commit that referenced this issue Jun 23, 2022
It turns out that these tests were accidentally responding to postMessages sent
by testdriver (instead of the ones sent by the test), and deleting the iframe
whilst it was still in use - which then caused webdriver errors. Fix this by
adding an explicit tag on the SPC-related messages and filtering for that.

This did expose another issue, which is that bless() seems not to be working
reliably (at all?) inside an iframe.

Fixes #33690
@stephenmcgruer
Copy link
Contributor Author

(Turns out to be user-error, #34559 has the fix)

stephenmcgruer added a commit that referenced this issue Jun 24, 2022
It turns out that these tests were accidentally responding to postMessages sent
by testdriver (instead of the ones sent by the test), and deleting the iframe
whilst it was still in use - which then caused webdriver errors. Fix this by
adding an explicit tag on the SPC-related messages and filtering for that.

This did expose another issue, which is that bless() seems not to be working
reliably (at all?) inside an iframe.

Fixes #33690
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Jun 29, 2022
…ssage handling, a=testonly

Automatic update from web-platform-tests
[SPC] Avoid trampling on testdriver's message handling (#34559)

It turns out that these tests were accidentally responding to postMessages sent
by testdriver (instead of the ones sent by the test), and deleting the iframe
whilst it was still in use - which then caused webdriver errors. Fix this by
adding an explicit tag on the SPC-related messages and filtering for that.

This did expose another issue, which is that bless() seems not to be working
reliably (at all?) inside an iframe.

Fixes web-platform-tests/wpt#33690
--

wpt-commits: 7fd13d47948ccfd5015ff50f3c9a772383c5673c
wpt-pr: 34559
jamienicol pushed a commit to jamienicol/gecko that referenced this issue Jun 30, 2022
…ssage handling, a=testonly

Automatic update from web-platform-tests
[SPC] Avoid trampling on testdriver's message handling (#34559)

It turns out that these tests were accidentally responding to postMessages sent
by testdriver (instead of the ones sent by the test), and deleting the iframe
whilst it was still in use - which then caused webdriver errors. Fix this by
adding an explicit tag on the SPC-related messages and filtering for that.

This did expose another issue, which is that bless() seems not to be working
reliably (at all?) inside an iframe.

Fixes web-platform-tests/wpt#33690
--

wpt-commits: 7fd13d47948ccfd5015ff50f3c9a772383c5673c
wpt-pr: 34559
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
@stephenmcgruer and others