What piece of software governs/owns 'registerDomMutation'? - javascript

Recently, in a piece of software I'm working on, I have been receiving a spate of errors in Sentry from clients that I'm having a lot of trouble pinning down. The specific error is this:
Non-Error promise rejection captured with value: 'registerDomMutation' is not defined
The specific error seems to be generated by Sentry itself as it attempts to capture some other problem. What has really got me stuck is that I can't track down where registerDomMutation is being called, or which piece of software that should be defining it. It doesn't appear to be part of Sentry; I know that it's not in my code; and it doesn't appear to be in any of the packages I use. It sounds like it could be a browser method of some kind, but I can't find any information on it. This error only seems to be occurring in the new version of iOS Safari (14.3), but it's also not occurring consistently.
Is anyone familiar with this method? Can you point me in the right direction?

I believe they're coming from internal WebView of Klarna application. I cannot seem to find any source code for the app to prove this point. But recurring Klarna/<some version> pattern shared among all the errors' userAgent string makes me think so.
Android version of the app is affected too. I guess they are sharing the same JS code.
I have strict CSP rules regarding scripts allowed to run on my page and I guess some code the app is relying on just doesn't run due to them.

Related

What is instantSearchSDKJSBridgeClearHighlight?

Sometimes I get ReferenceError in my sentry with this instantSearchSDKJSBridgeClearHighlight. Google says nothing.
All I found is https://github.com/algolia/instantsearch-android and https://github.com/algolia/instantsearch-ios that may be related to my issue.
I got 53 issues from 5 different users and all of them Edge Mobile on iphone.
Maybe someone knows what this thing is (or know method how to know)?
Edit: I also found this issue using github search. Same issue as mine and created by bot
This is a bug in the Bing Instant Search feature in Edge on iOS; the feature tries to call a function that no longer exists. Thanks for the bug; I've passed it along to the feature owners.
The basic idea is that for Edge on iOS the actual web engine is not our normal one (Blink); it is instead Safari's WkWebView.
In order to implement features like Bing's instant search, we have to inject JavaScript into the pages we load. Then our outer browser calls those JavaScript functions we injected.
Here, someone goofed and got rid of (or renamed) the injected JavaScript function, but failed to remove/update the browser code that tries to call that injected JavaScript.
So users who are watching the browser's error logs see an error message saying "Hey, there's no such function."
This is normally harmless, but if you have "Sentry" code that watches for error messages and complains about them to the website developers, it starts complaining about this error message we're causing.

Javascript - Find source of console.errors in webpage

I'm developing a React app and incorporated a few packages, some of which seem to be spitting out uncaught console.error messages despite UI and functionality working just fine. The Console output currently looks like this:
I can't seem to find anything online about this, but is there any way I can track down and silence these messages? In particular I'm looking at the one saying Failed to load resource: net::ERR_FAILED, since the others seem to be coming from the React debugger.
EDIT: The error seems to be a side effect of some sort of Adblocker/tracker blocker built into Brave. Is there anyway I can still catch that in my Javascript code?
At first glance it could be something like a cache or some extension. Since you've said that you searched for a solution online and didn't find anything, I believe you already tried these solutions, but if not, here is something you can try:
Start Chrome with your extensions disabled or start in incoginito mode (the extensions will be disabled by default).
Clean your browser cache and cookies.
If you are like me (I hope not) and open 99+ tabs in your broswer, close them, it could be a problem due lack of memory.
Check the network tab to see if Chrome failed to download any resource file.
These are the tips I can give to you, I hope it helps.

Intermittent "invalid character at 1,1" errors in Visual Studio 2017 project

I have a large project I'm testing locally where, intermittently, with no changes to the code, and with no common events, the site will suddenly display massive numbers of "invalid character" errors in basic js libraries like jquery. If you try to look at said js files in debug in the various browsers, they come up as gibberish as if they were compiled (they aren't)
The site will lose its formatting because of the lost access to various js libraries, and everything will misbehave. Hitting ctrl+F5 will randomly make it better, worse, or have no effect at all.
Rebuilding the site, resetting IIS, and restarting Visual Studio has no standard result. The only thing that is true is that after A Period Of Time, with no changes made or unmade to the code, the issue will clear as mysteriously as it arrived. Looking at the js files return to their un-gibberishy format, and all proceeds as if nothing has occurred.
It's a large project, and there are certainly packages and libraries that have updates which we're not in a position to update right now. It's the intermittent nature of the issue that's the most annoying - it'll happen with no changes made to the code, and fix itself as mysteriously. It's happening for all users, so it doesn't appear to be any one person's issue.
We're not seeing such a thing happen on out test and production servers, only which running and testing locally. It'll happen whether or not the VS debugger is on or not. There's no common trigger that we can find.
Anyone ever heard of something like this?

Why do I fail to debug a nodejs app in Intellij IDEA 11?

I have a single process node.js application, which I wish to debug with Intellij IDEA 11 32 bits (node.js is 32 bits too).
So, I place an initial breakpoint and run. The debugger stops at the breakpoint, but then it refuses to do any of the following:
step into
go to another breakpoint
pause execution
When I step into, it seems just to run, without stepping through the code. Once running, it ignores any subsequent breakpoints and does not break when I press the pause button.
This issue drives me crazy.
Any ideas on how should I troubleshoot it?
EDIT
More info. After IDEA breaks on the first breakpoint (the only successful time) I try to inspect the variables and am unable to see any. IDEA is stuck on "Collecting data..." The watch window does not work too.
EDIT2
Justed posted an issue to their bug tracking system - http://youtrack.jetbrains.com/issue/IDEA-112925
I've been noticing that IntelliJ's node.js debugger kinda sucks. It's death by 1000 cuts. I love IntelliJ to death, its such a nice IDE. But for node, the debugger has a million different scenarios where breakpoints don't work properly, and another million where it doesn't properly give you access to the in-scope variable values, and another million where it doesn't step properly...
I'm gonna hafta try looking for another tool..
UPDATE 2014-01-13: I've been using IntelliJ's debugger for a while now (having found no other good tool). It seems some of the problems with it are problems with node or v8 itself. Most of the problems I was having have either actually been solved by newer versions of IntelliJ, or by using this workaround:
1. create a file called proxyDebug.js
2. put the following content in it:
require('path/to/the/script/you/want/to/debug.js')
3. point your debugger to that file
Apparently the node.js debugging hooks go buggy at the entrypoint script, so by creating this proxy entrypoint that we don't care at all about, there won't be any weird bugs caused by that in the scripts you do care about. The bugs this workaround fixed were missed breakpoints, predefined variables (exports, module, process, etc) being inaccessible by the debugger, and one or two other things I can't remember.
Last WebStorm version I tried (7.0.3) actually takes ages in collecting data but eventually works. If it seems stuck to you, try to leave it for a minute

Is it possible to trigger Chrome's "Rats! WebGL hit a snag" accidentally?

From what I can tell about this message, it appears when the driver encounters an error. The implication seems to be that the JavaScript code can't trigger this warning even if there's some kind of mistake in it, because of higher-level error checking.
But my code recently triggered it, just once and I haven't been able to reproduce it (and the code — in theory at least — sends the exact same commands to WebGL every time). So I just want to know if I should be debugging my code (I can't see any obvious errors), or if I should put it down to a hardware random / browser bug.
I can post semi-reduced code on request, but it's still about half a thousand lines and I certainly don't expect people to debug it for me, hence the more general is-it-possible question.
I'm struggling a little with what your question means by "trigger". When this error occurs, javascript is always in the causal chain, because WebGL doesn't run without javascript executing it, right? So certainly it's possible to trigger the error accidentally (unless you always trigger it on purpose, which I'm sure is not the case).
However, graphics drivers are notorious for being affected by many factors that are not under programmer control or necessarily detectable by the programmer, and therefore seem non-deterministic. That's why Google recommends that you try reloading the page when the error occurs. (A link to their guidance was here, but they moved or removed the page.) I've often had Chrome successfully display some WebGL after reloading a page, when the previous attempt ended in the "snag" error. (And I know you're aware of that.)
There are certainly times when WebGL code (like the various shaders on http://shadertoy.com/) work fine on some machines and not others, and work fine one minute and not the next, on the same machine. So that suggests that the "snag" error doesn't necessarily imply that your code is at fault.
However, articles like How to write portable WebGL can help you minimize risky practices in your code, and reduce the frequency of these errors.

Categories

Resources