pym.js: pym 0.4.3(4) is breaking (intermittently, but most of the time) on (newly released?) CorePub
So, it appears that 0.4.3 has started breaking intermittently on one of our clients sites, Michigan Radio, and is throwing the exception copied in below (ugly, I know). Here’s the Michigan Radio page: http://michiganradio.org/post/what-questions-do-you-have-about-mental-health-issues-michigan#stream/0 note I’m having him switch the embed to using the newer version (0.4.4), as that seems to be fixing it.
It appears that 0.4.4 does work. It looks like a new push of core publisher was done recently, could this be the cause?
The weird thing is that it seems to be intermittent, refreshing the page causes our module to not appear (hard refresh usually brings it back).
question Is there a good URL to pull the latest version from? I see that the page has http://blog.apps.npr.org/pym.js/dist/pym.min.js as the latest, but the cdnjs link doesn’t seem to have a /dist, just specific versions a la https://cdnjs.cloudflare.com/ajax/libs/pym/0.4.3/pym.min.js https://cdnjs.cloudflare.com/ajax/libs/pym/0.4.4/pym.min.js
Or should we definitely host it ourselves. If so, are we alerted when a new version comes out, any compatibility issues with core publisher, etc?
Help.
http://requirejs.org/docs/errors.html#mismatch
B @ js_0zLPjMtKCAjb24C3jwPrWXUq6M865Iuwe5-4JC9bgBk.js:1
w @ js_0zLPjMtKCAjb24C3jwPrWXUq6M865Iuwe5-4JC9bgBk.js:1
(anonymous function) @ js_0zLPjMtKCAjb24C3jwPrWXUq6M865Iuwe5-4JC9bgBk.js:1
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 30
Hey Corey, so I can’t dive in and debug this thoroughly right now, but here’s what I know:
These sorts of on-again/off-again issues are usually caused by a race condition in loading assets. After chatting with @eads our best guess for what’s going on would be a race condition between the libraries your graphic depends on for rendering and the pym onload hook first firing. As I understand it you might be able to tell require that pym depends on all of your other assets in order to ensure it loads last.
A couple other notes:
Does any of that help?