question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'insertBefore' of null errors in Opera, Chrome, Mozilla, Safari.

See original GitHub issue

Esri-Loader Team redirects me here. Started issue closed without any help answer: https://github.com/Esri/esri-loader/issues/154

Expected behavior User should see map always without any limitations.

Project setup - angular, esri-loader v2.6.0, arcgis js ver. 4.13

Steps to reproduce Create a localhost server however you choose with a simple esri-loader implementation.

loadModules(["esri/Map", "esri/views/MapView", "esri/layers/WebTileLayer", "esri/Basemap", "esri/geometry/support/webMercatorUtils", "esri/geometry/Point", "esri/layers/GraphicsLayer", ], {}).then (([ Map, MapView, WebTileLayer, Basemap, webMercatorUtils, Point, GraphicsLayer] ) => { console.log("MapView:" + MapView)

The rest of the code doesn’t really matter because the error happens during the loading/fetching of the resource files.

Actual behavior If a developer or CLIENT ON PRODUCTION refreshes the map frequently while making changes and testing, they can encounter an error originating in the dojo.js script used by the loader. image

Resources downloaded when everything goes fine: image

Resources downloaded on error: image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
odoecommented, Oct 17, 2019

Do you have a repro app this happens with? This looks like the AMD loader can’t add the scripts to the page during load for some reason, but I’m unsure why that would happen. This probably happens here.

I tried with angular-cli and cra without issue after multiple refreshes.

0reactions
github-actions[bot]commented, Aug 26, 2022

This issue has been automatically closed due to inactivity. If you need additional assistance please contact Esri Technical Support.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AngularJS TypeError: Cannot read property 'insertBefore' of null
Looking at the source code of Angular, it is complaining some node has no parent node. Actually, I found out your question when...
Read more >
Node.insertBefore() - Web APIs | MDN
The insertBefore() method of the Node interface inserts a node before a reference node as a child of a specified parent node.
Read more >
HTML DOM Element insertBefore Method - W3Schools
list.insertBefore(node, null); ... The insertBefore() method inserts a child node before an existing child. ... Chrome, IE, Edge, Firefox, Safari, Opera.
Read more >
jQuery and Ajax Tutorial
... jQuery code runs on the big-5 browsers (Chrome, Firefox, IE, Safari and Opera). ... as you can't possibly test your JavaScript codes...
Read more >
Everything You Need to Know About HTML5 Video and Audio
Safari doesn't support Ogg/WebM, while Opera and Firefox don't ... way to detect lack of codec support is to listen for the error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found