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.

Release 1.3.0 causes

See original GitHub issue

Referencing https://github.com/katspaugh/wavesurfer.js/issues/947 .

Sorry, I don’t mean to beat a dead horse, and I’m not trying to lay blame or be argumentative, but we locked down the version of wavesurfer.js to 1.2.8 and it works perfectly, no issues or crashes or anything. Then, without changing any of our code in any way, if we upgrade wavesurfer.js to 1.3.0 we get the following fatal error:

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)

// The error seems to be around here
 e.start=e.waveCtx.canvas.offsetLeft/i||0,e.end=e.start+n/i,e.waveCtx.canvas.width=t,e.waveCtx.canvas.height=r,this.style(e.waveCtx.canvas,{width:n+"px"})

So to repeat, leaving our own code constant, with no changes: wavesurfer.js 1.2.8 no issues, wavesurfer.js 1.3.0 we get the crash above.

So something seems to have changed in wavesurfer.js between 1.2.8 and 1.3.0 that is causing this crash.

For now, I have changed my package.json from

"wavesurfer.js": "^1.2.8"

to

"wavesurfer.js": "1.2.8"

and we are not seeing the crash. But I would like to be on the latest version if possible.

I will try an experiment, and change our initialization from

    let p = WaveSurfer.create({
      container: `#${this.get('waveformId')}`,
      waveColor: 'violet',
      progressColor: 'purple',
      barWidth: 1,
      skipLength: 4
    });

to

    let p = WaveSurfer.create({
      container: `#${this.get('waveformId')}`,
      waveColor: 'violet',
      progressColor: 'purple',
      barWidth: 1,
      skipLength: 4,
      renderer: 'Canvas'
    });

and then deploy wavesurfer.js 1.3.0 and report back.

I notice in the release notes that there is a remark about going to MultiCanvas, not sure if this is related? I do notice in https://github.com/katspaugh/wavesurfer.js/blob/02d99ab7ec4c576132ad6a19b3e4d227b084bbeb/src/wavesurfer.js that MultiCanvas became the default renderer whereas it was Canvas before. We were not setting the renderer in the options, so maybe this is the issue? Multicanvas is broken?

I am using Chrome 55.0.2883.95 (64-bit) on macOS 10.12.3. However, this crash in wavesurfer.js also happened in Firefox.

Any thoughts?

And thanks again for all the help and for making wavesurfer.js available - it is really awesome and we are grateful to use it! 😃

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

3reactions
joelpresencecommented, Jan 31, 2017

OK, I just deployed wavesurfer.js 1.3.0 to heroku with renderer: 'Canvas' added to the initializer args, and now it works without the crash above.

So wavesurfer.js 1.3.0 with default MultiCanvas renderer does not seem to work on heroku. Not sure why …

I’m happy to help however you need me to, if you want to test patches, etc.

We are using node 6.9.1 and ember 2.9.0.

1reaction
joelpresencecommented, Jan 31, 2017

And to be clear, I’m worried that others might encounter this issue, that’s why I’m posting this …

Read more comments on GitHub >

github_iconTop Results From Across the Web

1.3.0 Release · Issue #6972 · python-poetry/poetry - GitHub
This issue tracks the progress of version 1.3.0 of Poetry. ... I'm not sure what it is that causes poetry's release-paralysis - is...
Read more >
Release notes/1.3 - MediaWiki
1 broke handling of extension and <pre> sections, causing garbage data to be inserted in output and saved edits. This version works around...
Read more >
OpenSearch 1.3.0 is out now!
As of yesterday (March 16), the team identified the roadmap for 1.3.0 included references to RPM and Debian distributions. In late January, the ......
Read more >
Upgrading WebGrease to version 1.3.0 causes error only on ...
Upgrading WebGrease to version 1.3.0 causes error only on production server ; I have the exact same scenario and the same problems! Did...
Read more >
Fragment - Android Developers
3 are released. Version 1.5.3 contains these commits. Bug Fixes. Fixed an error that caused fragments on the back stack to get onMultiWindowModeChanged()...
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