OpenLayers 6 HeatMap - Uncaught Error: Cannot read property 'indexOf' of undefined - javascript

We have a an OpenLayers application based upon v6 which is blowing up with this error. It was working well yesterday, and today it is not. We're not finding where we broke something. The error is coming from some asynchronous event in the renderer (no obvious top-level function in the backtrace). Lots of single-letter function names in the ol libraries. We're needing some help figuring out where to go next.
http://www.nufosmatic.com/nufosmatic/html/frame.html
The "Ol6 Maps Heatmap" page...

Well, it turns out that Chrome went toxic. The page would render in Brave, Edge, and Firefox but not in Chrome. We closed all of our Chrome windows (Windows 10, Chrome Version 91.0.4472.124 (Official Build) (64-bit)) and then made certain that all of the background processes were dead and re-started the browser. Everything is working everywhere again.
The error was buried deep in the rendering logic in OL, and we were not going to be able to figure this out. Fortunately, we thought to try another browser just to see.

Related

An internal error occurred in the Microsoft Internet extensions when accessing localStorage on IE11

Quite strange this one.
I was testing a webpage on IE11 when I suddenly realized that each time that javascript code reaches a call to localStorage it's returning 'An internal error occurred in the Microsoft Internet extensions' error.
IE ver is 11.09600.17358 on Windows 7 SP1
All IE extensions are currently disabled and I've already tried to empty temporary files and restore IE defaults, also I've checked that DOM storage is enabled, however the problem is still there.
Firefox and Chrome shows no problem executing the app.
I've been googling for a while without success about this one, any insight will be much appreciated.
I had this same issue until I turned off Protected Mode. Funnily enough, it's why I couldn't look into Stack Overflow just a couple minutes ago :).

Polymer-Project objects not rendering in OS X 10.10

Recently I have been considering using Polymer elements in a project I am working on. However, I am unable to see any elements being rendered in the new beta version of safari for OS X 10.10 Yosemite. I completely understand that Yosemite and Safari are currently in the DP phase, but I am curious as to why the new verison of Safari has broken compatibility with Polymer elements (I can confirm Polymer elements work in Mavericks version of Safari).
I was able to open the developer console and spot an error. I am unable to reach the exact error at this time, but I know the error was at patches-mdv.js at line 57, claiming a Read Only error.
I just tested the Polymer Project website on my iPhone with iOS8, having the same results.
Does anyone have an idea on what I could do to fix this issue temporarily until the Polymer-Project team fixes it?
One apparent problem is that the Safari beta has at least one low-level property accessor (specifially HTMLBaseElement.prototype.href) that is misconfigured from the standard.
So, cursory investigation implies this is a bug in Safari, not Polymer.

PDF.js is randomly crashing the Google Chrome tab

My problem may seem a bit vague (it is to me too), but here is my attempted explanation of it.
A few months ago, I implemented PDF.js in my web application. It was really useful, and I am using it for interactions with my clients.
Suddenly, last week, my clients reported to me "Aw, Snap" messages in Google Chrome on their PCs when they try to launch PDF.js. I have an iMac and two PCs at home, so I decided to test this out.
When I used Google Chrome on my iMac to launch PDF.js, I found it worked fine.
When I used Google Chrome on my first PC to launch PDF.js, I found it worked fine.
When I used Google Chrome on my second PC to launch PDF.js, even though it previously worked, it kept crashing and showing me "Aw, Snap" messages.
This was weird. I tried removing all the extensions, clearing the cache, clearing the LocalStorage, but nothing seemed to fix the problem.
I then realised, after some communication with my clients, launching PDF.js in Safari, Torch, Opera or Firefox on any operating system worked perfectly fine.
Why would this happen? I am using the web viewer in PDF.js. I also tried with the basic hello world example, but that broke as well (which I now find really weird), so I suspect there's something wrong with the rendering engine.
I also tried including the compatibility.js file after building the source, but with no avail.
Is there any known bug which causes Google Chrome tabs to crash?
Yes, I got it now.
From https://github.com/mozilla/pdf.js/issues/4104, I found the answer (thanks Rob and PDF.js dev team!). Take a look yourself!
I'm only posting this here so that anyone who stumbles upon this post with a similar problem can be helped (as this error took me quite a while to figure out).
Unfortunately, this does not seem to be the case. We've tried the latest version of pdf.js from github, also tried Chrome 33 (stable) which should have their V8 fix included and it still crashes. Also, tried the pdf.js commit mentioned in github thread (4ce6cb8 - https://github.com/mozilla/pdf.js/commit/4ce6cb8b0fa9db948516b2b738fa1503cf0ef90e) - still crashes. Also tried latest Chrome Canary available on 19/03/2014 - crash is there.
We can provide the WinDbg memory dump if it's of any help.
PS: sorry, this should be the answer to Rob W thread right above but I cannot add it there due to 0 reputation.

One page PDF crashes Chrome with PDF JS [duplicate]

My problem may seem a bit vague (it is to me too), but here is my attempted explanation of it.
A few months ago, I implemented PDF.js in my web application. It was really useful, and I am using it for interactions with my clients.
Suddenly, last week, my clients reported to me "Aw, Snap" messages in Google Chrome on their PCs when they try to launch PDF.js. I have an iMac and two PCs at home, so I decided to test this out.
When I used Google Chrome on my iMac to launch PDF.js, I found it worked fine.
When I used Google Chrome on my first PC to launch PDF.js, I found it worked fine.
When I used Google Chrome on my second PC to launch PDF.js, even though it previously worked, it kept crashing and showing me "Aw, Snap" messages.
This was weird. I tried removing all the extensions, clearing the cache, clearing the LocalStorage, but nothing seemed to fix the problem.
I then realised, after some communication with my clients, launching PDF.js in Safari, Torch, Opera or Firefox on any operating system worked perfectly fine.
Why would this happen? I am using the web viewer in PDF.js. I also tried with the basic hello world example, but that broke as well (which I now find really weird), so I suspect there's something wrong with the rendering engine.
I also tried including the compatibility.js file after building the source, but with no avail.
Is there any known bug which causes Google Chrome tabs to crash?
Yes, I got it now.
From https://github.com/mozilla/pdf.js/issues/4104, I found the answer (thanks Rob and PDF.js dev team!). Take a look yourself!
I'm only posting this here so that anyone who stumbles upon this post with a similar problem can be helped (as this error took me quite a while to figure out).
Unfortunately, this does not seem to be the case. We've tried the latest version of pdf.js from github, also tried Chrome 33 (stable) which should have their V8 fix included and it still crashes. Also, tried the pdf.js commit mentioned in github thread (4ce6cb8 - https://github.com/mozilla/pdf.js/commit/4ce6cb8b0fa9db948516b2b738fa1503cf0ef90e) - still crashes. Also tried latest Chrome Canary available on 19/03/2014 - crash is there.
We can provide the WinDbg memory dump if it's of any help.
PS: sorry, this should be the answer to Rob W thread right above but I cannot add it there due to 0 reputation.

How do you debug IE & jQuery errors like this

I'm developing in Javascript for quite a long time now. Usually when I hit an error in IE I know roughly where it originated even if the message received from IE is useless bunch of text. When I don't know where the error originated, I usually try to "delete" parts of my code, until the error doesn't repeat itself, and that start manually checking line by line until I find the error.
I'm sure that it's far from the best approach, so I'd like to ask you how you debug error like these:
If you are using IE8+, you can press F12 on a page to open the Developers Tools.
This contains a JavaScript debugger, much like Firebug & Chrome Dev Tools
EDIT:
In response to the comment under the question, if IE is throwing a cryptic error that you are unsure of, there is a couple of steps I would do.
Is it an IE only error? Does the same error occur in Firefox? Chrome?
Is the error occurring in a 3rd party library. If you believe it is, use an un-minified version of the library.
Can you replicate the error outside of your website? Can you make the error occur in a http://jsfiddle.net/ for instance?
If you still can't narrow down the issue, post a question on SO with your code, any error messages, and expectations of the result.
HTH
Try using non-minified version of jQuery - it will give you a better idea where exactly the error is. Also, if you use VS 2010 to debug your js code in IE, it will break at the error line. This always works fine for me.
IE is the only browser that I've managed to successfully use the fantastic Visual Studio script debugger with - in my experience Visual Studio is hands down the best script debugger out there, so quite often I find myself in the reverse situation to you (running broken scripts in IE just so I can use the script debugger)
See How to debug JavaScript in Internet Explorer for instructions on how to use Visual Studio Express to debug scripts in IE - if you own a full edition of Visual Studio then its much simpler (just attach to IE as normal).

Categories

Resources