Search code examples
javascriptangularjsmasonry

Noticing network calls to /undefined and /null in AngularJs


When loading an Angular (1.4.9) application, I see the console error as below: /undefined: Failed to load resource: the server responded with a status of 404 (Not Found).

I see another similar error with /null instead of /undefined.

When looking at the developer tools on Chrome, it indicates that the call originates from masonry.pkgd.min.js (line 9). Any ideas on how I can resolve this issue?

Output when hovering over the initiator column:

o @ masonry.pkgd.min.js:9

r @ masonry.pkgd.min.js:9

l.getSize @ masonry.pkgd.min.js:9

i._resetLayout @ masonry.pkgd.min.js:9

l.layout @ masonry.pkgd.min.js:9

r @ masonry.pkgd.min.js:9

e @ masonry.pkgd.min.js:9


Solution

  • This was happening because we had some background-image CSS in JS being set to /undefined. This was causing the 404 errors. The call stack (in debug and production) was incorrect however.