Uncaught TypeError: Cannot read property 'canvas' of undefined
See original GitHub issueWe have been using waversurferjs to great success (thanks for this awesome library!). 😃 However, it suddenly stopped working and we have no idea why. There were no code changes on our end. It works when run locally on my laptop, but when I deploy to Heroku, we get the error:
vendor-ce0b1d3….js:21 Uncaught TypeError: Cannot read property 'canvas' of undefined
at Object.updateDimensions (vendor-ce0b1d3….js:21)
at Object.updateSize (vendor-ce0b1d3….js:21)
at Object.setWidth (vendor-ce0b1d3….js:21)
at Object.drawPeaks (vendor-ce0b1d3….js:21)
at Object.drawBuffer (vendor-ce0b1d3….js:20)
at Object.loadDecodedBuffer (vendor-ce0b1d3….js:20)
at Object.<anonymous> (vendor-ce0b1d3….js:20)
at Object.<anonymous> (vendor-ce0b1d3….js:20)
at Object.<anonymous> (vendor-ce0b1d3….js:20)
updateDimensions @ vendor-ce0b1d3….js:21
updateSize @ vendor-ce0b1d3….js:21
setWidth @ vendor-ce0b1d3….js:21
drawPeaks @ vendor-ce0b1d3….js:21
drawBuffer @ vendor-ce0b1d3….js:20
loadDecodedBuffer @ vendor-ce0b1d3….js:20
(anonymous) @ vendor-ce0b1d3….js:20
(anonymous) @ vendor-ce0b1d3….js:20
(anonymous) @ vendor-ce0b1d3….js:20
This was working on Heroku last week, and it just stopped working, with no code changes on our our end. However, it still works on our local laptops, it’s only busted when wavesurfer is running inside our Ember app deployed to heroku. waversurfer inside our Ember app deployed to my local laptop works fine.
I have no idea how to debug this … the div it’s supposed to render into is definitely there. Any ideas?
Any help would be hugely appreciated!
Thanks. 😃
Issue Analytics
- State:
- Created 7 years ago
- Comments:11
Top Results From Across the Web
Cannot read property 'canvas' of undefined - Stack Overflow
I am getting the following error: Uncaught TypeError: Cannot read property 'canvas' of undefined Does anywhone know how to fix this?
Read more >cannot read property canvas of undefined · Issue #557 - GitHub
and I added the script for the chart with the options and data as the example of the pie chart. I am getting...
Read more >Uncaught type error: cannot read property of undefined
I have a problem when updating datapoint in canvas chart. I get this error message: Uncaught TypeError: Cannot read property 'getTime' of ...
Read more >Uncaught TypeError: Cannot read property 'async' of undefined
I hit the error below when try to load back the object into canvas. Any idea how to fix this? Uncaught TypeError: Cannot...
Read more >TypeError: Cannot read property 'canvas' of null - Web
Description When a participant tries to share the screen by executing the below code, it throws error :“Cannot read property 'canvas' of ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
does #945 fix it?
OK, I rolled back to a much older version of our code that seems to work on Heroku, so I will try to binary search to find what broke things.