-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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] matomo.js erroring on javaEnabled property #22836
Comments
Same problem here, also started appearing on december 9th around 10pm (CET) A little bit more output:
We're using version 5.1.1. Update: we've noticed that all calls come from Microsoft IPs. |
We have same problem. All users who initiate the error use Chrome (125.0.6422, 127.0.6523) and Windows >10 |
I've tried to check that using browser stack, but can't see any error when visiting a page where the matomo tracker is integrated with older chrome versions on windows 10 or windows 11. |
@sgiehl does the matomo code create a proxy around the If so, it seems this bug is caused by that proxy, which will need fixing here. If not, it seems likely (from @fattybenji noting that this is limited to Microsoft IPs) that this is coming from (e.g.) a malware scanning service which is creating its own In the latter case, one option matomo might want to consider is to simply not invoke (or even access) |
on your question about the call site, it is reported as Line 3422 in 20cfe2d
(specifically on the |
We are unable to reproduce that. Is anyone able to reproduce that manually or can anyone provide an URL where that happened? |
I think this is the most likely explanation (see my first comment for details) I'm not aware of this happening in a browser I have access to; just getting reports from the automated error handling. The root cause is probably for Microsoft to fix, but I doubt they'll look at it. It would be nice if matomo updated this code to only check The only other option is for every matomo user to add this to their list of ignored errors, to avoid noise from Microsoft's scans. |
We could also add a try/catch around that block. But it's hard to test if that works as expected. |
FWIW there's already a browser check for Edge on that code, which would have a similar limitation with spoofing. You can replicate the issue with this setup code, which may or may not be entirely representative of what Microsoft's environment is using: Object.defineProperty(navigator, 'javaEnabled', {
value: () => false,
writeable: false,
configurable: false,
});
Object.defineProperty(window, 'navigator', {
value: new Proxy(window.navigator, {
get(target, prop, receiver) {
if (prop === 'javaEnabled') return () => false;
return Reflect.get(target, prop, receiver);
}
}),
});
// now accessing navigator.javaEnabled throws the error from this thread |
What happened?
Errors started coming through on our end since Dec 9, 10:02 PM
Our Matomo.js script is erroring on accessing the
javaEnabled
propertyLooking at the stats, all users initiating the error are on Chrome browser (
125.0.6422
,126.0.6478
,127.0.6523
) and Windows >10.What should happen?
no error
How can this be reproduced?
n/a
Matomo version
matomo.js
PHP version
No response
Server operating system
No response
What browsers are you seeing the problem on?
Chrome
Computer operating system
No response
Relevant log output
Validations
The text was updated successfully, but these errors were encountered: