Page MenuHomePhabricator

MobileFrontend browser test failing: User:<username> "before all" hook – Can't call setValue on element with selector "#wpName1" because element wasn't found
Closed, ResolvedPublic

Description

Example: https://integration.wikimedia.org/ci/job/quibble-vendor-selenium-docker/25121/console

16:24:24 ------------------------------------------------------------------
16:24:24 [Chrome 73.0.3683.75 linux #0-1] Spec: /workspace/src/extensions/MobileFrontend/tests/selenium/specs/user_page.js
16:24:24 [Chrome 73.0.3683.75 linux #0-1] Running: Chrome (v73.0.3683.75) on linux
16:24:24 [Chrome 73.0.3683.75 linux #0-1] Session ID: d67b6295-f652-47d6-b460-754531a1713c
16:24:24 [Chrome 73.0.3683.75 linux #0-1]
16:24:24 [Chrome 73.0.3683.75 linux #0-1] User:<username>
16:24:24 [Chrome 73.0.3683.75 linux #0-1]    ✖ "before all" hook
16:24:24 [Chrome 73.0.3683.75 linux #0-1]
16:24:24 [Chrome 73.0.3683.75 linux #0-1] 1 failing (12.9s)
16:24:24 [Chrome 73.0.3683.75 linux #0-1]
16:24:24 [Chrome 73.0.3683.75 linux #0-1] 1) User:<username> "before all" hook
16:24:24 [Chrome 73.0.3683.75 linux #0-1] Can't call setValue on element with selector "#wpName1" because element wasn't found
16:24:24 [Chrome 73.0.3683.75 linux #0-1] Error: Can't call setValue on element with selector "#wpName1" because element wasn't found
16:24:24 [Chrome 73.0.3683.75 linux #0-1]     at LoginPage.login (/workspace/src/extensions/MobileFrontend/node_modules/wdio-mediawiki/LoginPage.js:15:17)
16:24:24 [Chrome 73.0.3683.75 linux #0-1]     at login (/workspace/src/extensions/MobileFrontend/tests/selenium/specs/user_page.js:22:18)
16:24:24 [Chrome 73.0.3683.75 linux #0-1]     at Context.before (/workspace/src/extensions/MobileFrontend/tests/selenium/specs/user_page.js:38:3)

Event Timeline

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/615711 had a successful test build on 15:50 UTC today and then the first failure on 16:06 UTC today. https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/615682 was merged right between those times if I’m not mistaken, so that seems like a likely culprit.

Jdlrobson added a subscriber: Jdlrobson.

Adding QTE since there are some changes being made relating to T256977 which are likely to be the culprit (no other changes to MobileFrontend that I'm aware of)

For wikibase it fails for every other run. Quite annoying.

Reedy renamed this task from MobileFrontend browser test failing in Wikibase CI: User:<username> "before all" hook – Can't call setValue on element with selector "#wpName1" because element wasn't found to MobileFrontend browser test failing: User:<username> "before all" hook – Can't call setValue on element with selector "#wpName1" because element wasn't found.Jul 23 2020, 10:44 PM
Reedy triaged this task as High priority.
Reedy added a subscriber: Reedy.

Change 615880 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Selenium tests should visit user login page

https://gerrit.wikimedia.org/r/615880

Annoyingly there was no video asset of the failure, so I couldn't actually tell what the problem is here - but luckily could replicate it locally. I think this should be ficed in wdio-mediawiki/LoginPage in core but for now this should suffice to unblock people.

Ladsgroup raised the priority of this task from High to Unbreak Now!.Jul 24 2020, 1:53 PM

This patch failed three consecutive times so far. I can't get much done with this.

Change 616031 had a related patch set uploaded (by Zfilipin; owner: Zfilipin):
[mediawiki/extensions/MobileFrontend@master] Revert "Selenium: Update to WebdriverIO v6"

https://gerrit.wikimedia.org/r/616031

This patch failed three consecutive times so far. I can't get much done with this.

Apologies for all the trouble. I've reverted 616031 (Selenium: Update to WebdriverIO v6). I'll test if it fixes things as soon as it merges. We'll be much more careful the next time we attempt the update.

@Vidhi-Mody has already updated many repositories (T247844), we didn't have a problem like this so far.

There was no need to revert https://gerrit.wikimedia.org/r/c/615880 fixes the issue without the revert.

Change 615880 abandoned by Jdlrobson:
[mediawiki/extensions/MobileFrontend@master] Selenium tests should visit user login page

Reason:
The patch was reverted (but when it is eventually restored it will probably want to include this change)

https://gerrit.wikimedia.org/r/615880

Change 615880 restored by Jdlrobson:
[mediawiki/extensions/MobileFrontend@master] Selenium tests should visit user login page

https://gerrit.wikimedia.org/r/615880

Change 616112 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Run jobs inside browser.call

https://gerrit.wikimedia.org/r/616112

Change 615880 abandoned by Jdlrobson:
[mediawiki/extensions/MobileFrontend@master] Hack: Selenium tests should visit user login page

Reason:
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/ /616112 is a more logical easy to follow solution

https://gerrit.wikimedia.org/r/615880

Change 616031 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Revert "Selenium: Update to WebdriverIO v6"

https://gerrit.wikimedia.org/r/616031

Change 616112 abandoned by Jdlrobson:
[mediawiki/extensions/MobileFrontend@master] Run jobs inside browser.call

Reason:
original patch was reverted

https://gerrit.wikimedia.org/r/616112

Ladsgroup lowered the priority of this task from Unbreak Now! to High.Jul 24 2020, 3:50 PM

Thanks.

Addressed now. Assuming T256977 covers the rest. Thanks for the quick response!