Open vjpr opened 9 years ago
Are you getting timeouts loading tiles? Not sure how this happens, but maybe if loading is aborted and then it finishes loading?
I'm getting this same issue. Doing some research leads me to believe it may have something to do with Angular.
I'm getting this issue too without Angular.
I think that head.removeChild(script) is sometimes executed twice. On second call, script is not in the head anymore and an error is thrown :
window[wk][functionName] = function (data) { self._cache[key] = data; delete window[wk][functionName]; head.removeChild(script); self._finish_request(key); }; this._queue_request(key, url, function () { head.appendChild(script); return { abort: function () { head.removeChild(script); // THIS LINE is executed BEFORE the other removeChild that is executed too. The issue is then ONLY showing when abort is requested. } }; });
I'm not sure exactly WHEN ABORT is needed (when timeout occures then tiles were not completly loaded I think), but I'm getting this error when I zoomIn and immediately zoomOut. Not leaving enough time to load tiles correctly (but server serves 200 response code - no timeout problem).
It would probably worth testing if childNode exist before attempting deletion to avoid this error.
We're also getting this error from the Windshaft example viewer: https://github.com/CartoDB/Windshaft/tree/master/examples/viewer
This fixed the problem for me Change
head.removeChild(script);
for
if (script.parentElement==head) {
head.removeChild(script);
}
I receive this error ocassionally.
This is the code: