What is instantSearchSDKJSBridgeClearHighlight? - javascript

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.

Related

JavaScript execution throws "Error: OLE Automation error in eval: Unknown name or named argument." in wx.html2.WebView on MSW

I’m developing a cross-platform GUI app for Mac and Windows using wx.html2.WebView, using the latest wxPython 4.1.1. (Hint: The problem started appearing in 4.1. Earlier wxPython versions, as well as the wxPython 4.1.1 for Mac, don’t have that problem, but I’m trying to migrate to the latest wxPython for various benefits it has)
The Windows app throws an error message Error: OLE Automation error in eval: Unknown name or named argument. when executing some JavaScript on WebView.RunScript().
I honestly don’t know where to start debugging. I can’t find out what JavaScript code caused the problem since the code isn’t displayed anywhere. I tried throwing in a confirmation dialog before each RunScript() call, but the execution doesn’t wait, and instead, the dialogs pile up over each other.
As the JavaScript code gets generated by the app on runtime, I did route all JavaScript code into a file and syntax-checked it externally, without errors.
The only result that shows up in Google search for that error message is this page: https://trac.wxwidgets.org/ticket/17893?cversion=2&cnum_hist=10 and the discussion hints at a custom protocol being used, which I’m not using, so it seems irrelevant.
Any ideas?
Don't know the reason behind, but I have solved the same error by adding an <script></script> element into the page contents. That is, for instance, replacing:
self.browser = wx.html2.WebView.New(self)
self.browser.SetPage('<p>Hello World!</p>')
with this:
self.browser = wx.html2.WebView.New(self)
self.browser.SetPage('<p>Hello World!</p><script></script>')

What piece of software governs/owns 'registerDomMutation'?

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.

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.

IE9 says Syntax Error but not where?

So, I have a large project with a bunch of javascript stuff going on.
Now I did some testing with IE9 and on one event triggered AJAX-operation it aborts and tells me
Syntax Error: Expected ')'
but that's all it says. It leaves me without any clue about where to start looking.
I'm using Dojo for most of the things I do and at this particular point I'm retrieving JSON-data with the AJAX-request. But I've ruled out an error in the JSON-string, simply because JSON ususally does not contain brackets (), right?
There also is a console.log(data) right after the request should be completed, but it doesn't fire either. And I don't see any fancy bracketwork before that, that could make IE lose it's mind. But I might still be looking at the wrong spot, just trying to give as much info as possible here.
(btw: Firefox is fine with everything. No errors or warnings; everything runs just fine)
What's the best way to debug this or possible causes?
Versions of Internet Explorer from 8 upwards have a built in debugger which is similar to Firebug - press F12 to launch it (by default).
The standard error reporting is terrible, but the debugger will give you much more accurate feedback on where the error occurred.
(My take on this is that the standard Javascript error handling assumes you're a typical IE user and gives you very little feedback. Firing up the dev tools lets it know you can handle the truth.)
It was the response from AJAX after all.
IE had problems sending all the GET parameters resulting in an error message being mixed with the JSON code. I still don't understand why it expected a ) but fixing the response fixed the issue.

Browsers no longer reporting js errors - YUI history manager

I'm using YUI's browser history manager, and my browsers no longer report runtime errors. They will still show a parse error in the error console, but if I call a bogus function, for example, inside some event handler, the browser just stops all js processing it seems. Even firebug's debugger will just quit when I get to a line with an error. Anyone else seen this? Is it even YUI?
The only solution I found to this problem ( which I've experienced a couple times now ) is to create an entirely new profile. I haven't narrowed down what exactly is going wrong with FF but my money is on a weird combination of Firebug, web developer tool bar, and one other extension. If firebug is missing or the web developer toolbar is missing in a FF profile, it doesn't happen.
Getting closer to storing my firefox profile in svn but it only happens every few months and not everyday after I recreate my profile.
As a half-assed solution, I keep a personnel and developer profile in Firefox now and the extensions I need for the developer profile on one of my websites.
Turns out the answer to this question is here...

Categories

Resources