Page MenuHomePhabricator

TypeError: navigator.userAgentData.getHighEntropyValues is not a function
Closed, ResolvedPublic2 Estimated Story PointsPRODUCTION ERROR

Description

Error
message
TypeError: navigator.userAgentData.getHighEntropyValues is not a function. (In 'navigator.userAgentData.getHighEntropyValues(wgCheckUserClientHintsHeadersJsApi)', 'navigator.userAgentData.getHighEntropyValues' is undefined)
trace
at runScript https://en.m.wikipedia.org/w/load.php:11:831
at execute https://en.m.wikipedia.org/w/load.php:13:105
at doPropagation https://en.m.wikipedia.org/w/load.php:5:943
at https://en.m.wikipedia.org/w/load.php:22:737
Impact

Low as the error suggests that no support exists for Client Hints on this browser.

Notes

Seems to be constrained to one specific browser. 100 of these in the last 30 days.

Event Timeline

Discussed with @Dreamy_Jazz; let's check for the existence of the function before using. This is probably a bug from Opera on iOS which uses WebKit, which doesn't support client hints.

Change 975281 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/CheckUser@master] clienthints: Ensure navigator.getHighEntropyValues exists

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

Change 975281 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] clienthints: Ensure getHighEntropyValues() exists

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

Dreamy_Jazz set the point value for this task to 2.Nov 24 2023, 3:10 PM
dom_walden subscribed.

I don't have access to the Opera browser for iOS, so I couldn't test that particular platform.

I tested other browsers and platforms, including Chrome on iOS and Android, Safari on iOS and Opera on Mac. Either the client hints request is sent after an edit or nothing happens and there is no javascript error.

Test environment: https://test.wikipedia.org CheckUser 2.5 (477a4cd) 23:23, 10 December 2023.

I don't see this appearing in logstash anymore ( https://logstash.wikimedia.org/goto/828e06fd7c0d1e597be223ad9ad0fc11 ), so this can be resolved.