Wavesurfer.js: Release 1.3.0 causes

Created on 31 Jan 2017  Â·  7Comments  Â·  Source: katspaugh/wavesurfer.js

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! :-)

bug

Most helpful comment

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.

All 7 comments

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

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.

lets's release a 1.3.1 that works as expected asap. Some changes were made to the master branch, can you test and see if that fixes your issue @joelpresence?

I can test tomorrow!

Sent from my iPhone

On Feb 1, 2017, at 4:34 PM, Thijs Triemstra <[email protected]notifications@github.com> wrote:

lets's release a 1.3.1 that works as expected asap. Some changes were made to the master branch, can you test and see if that fixes your issue @joelpresencehttps://github.com/joelpresence?

-
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/katspaugh/wavesurfer.js/issues/950#issuecomment-276829419, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALf8WWyGr9R0-N8a-7cF6kiAzMarET3Iks5rYSSXgaJpZM4LzQ0U.

@joelpresence everything working now? Please open a new ticket if you still see something.

Yes, all is well, sorry for the delay (I did mean to respond to your earlier comments).

Well, I mean everything is working with 1.3.0 and SingleCanvas. We haven’t verified the fix for MultiCanvas since we don’t need that functionality. Would you still like me to test the patch for MultiCanvas?

Thanks again for the great support!

From: Thijs Triemstra notifications@github.com
Reply-To: "katspaugh/wavesurfer.js" reply@reply.github.com
Date: Wednesday, February 8, 2017 at 1:23 PM
To: "katspaugh/wavesurfer.js" wavesurfer.js@noreply.github.com
Cc: Joel Shapiro joel@presence-labs.com, Mention mention@noreply.github.com
Subject: Re: [katspaugh/wavesurfer.js] Release 1.3.0 causes (#950)

@joelpresencehttps://github.com/joelpresence everything working now? Please open a new ticket if you still see something.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/katspaugh/wavesurfer.js/issues/950#issuecomment-278465941, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALf8WdZN0pz0LdoZUmBP-aPQMXrkZVpeks5rajJkgaJpZM4LzQ0U.

@joelpresence 1.3.1 has been released, please try that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

X-Raym picture X-Raym  Â·  5Comments

sebhoff picture sebhoff  Â·  4Comments

SGDAT picture SGDAT  Â·  3Comments

asdfang picture asdfang  Â·  4Comments

itamaker picture itamaker  Â·  4Comments