mapillary / mapillary/mapillary-js
Mapillary JS viewer - Image Distortion - Failed to cache spatial edges
@oscarlorentzon is already working on this.
Since Nov 23, 2021.
- Dominant language
- TypeScript
- Stars
- 516
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
Basic information
Mapillary JS viewer occasionally fails to render images in a very interesting way. A refresh corrects the behavior so this is not a critical bug, but it certainly doesn't look great.

This bug was encountered by Safety in Numbers analysts and has only been seen on our system to date. I haven't had time yet to setup a clean Mapillary JS instance and confirm the behavior.
MapillaryJS version: v4.0.0
System/Browser: Google Chrome Version 96.0.4664.45 (Official Build) (64-bit)
Steps to Reproduce Behavior
- Open the Mapillary JS implementation on map.safe7y.com
- Open any Mapillary sequence by selecting a green dot on the map
- Hit the
>, play button, on the Mapillary JS viewer - Continue to play through sequences until the error occurs - sometimes in as few as 5 images, sometimes after several thousand images
Expected behavior
Images should continue to load without distortion.
Actual behavior
Images become "crumpled" progressively, eventually (within about 10 new image loads) becoming too distorted to see.
Additional information
These screenshots show the progression.



Each time a distorted image is loaded the following console output is received.
mapillary.module.js:85439
Failed to cache image (500969357710199). TypeError: Cannot read properties of null (reading 'pipe')
at hy.cacheAssets$ (chunk-vendors.843f91ed.js:22)
at e.project (chunk-vendors.843f91ed.js:38)
at e._tryNext (chunk-vendors.843f91ed.js:22)
at e._next (chunk-vendors.843f91ed.js:22)
at e.next (chunk-vendors.843f91ed.js:22)
at e._next (chunk-vendors.843f91ed.js:22)
at e.next (chunk-vendors.843f91ed.js:22)
at e._next (chunk-vendors.843f91ed.js:22)
at e.next (chunk-vendors.843f91ed.js:22)
at e.next (chunk-vendors.843f91ed.js:22)
(anonymous) @ mapillary.module.js:85439
mapillary.module.js:56445
Failed to cache spatial edges. TypeError: Cannot read properties of null (reading 'pipe')
at hy.cacheAssets$ (chunk-vendors.843f91ed.js:22)
at e.project (chunk-vendors.843f91ed.js:38)
at e._tryNext (chunk-vendors.843f91ed.js:22)
at e._next (chunk-vendors.843f91ed.js:22)
at e.next (chunk-vendors.843f91ed.js:22)
at e._next (chunk-vendors.843f91ed.js:22)
at e.next (chunk-vendors.843f91ed.js:22)
at e._next (chunk-vendors.843f91ed.js:22)
at e.next (chunk-vendors.843f91ed.js:22)
at e.next (chunk-vendors.843f91ed.js:22)
Thank you!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.