jazz-soft/JZZ

Uncaught (in promise) TypeError in 1.2.9

SmallHollow opened this issue · 7 comments

After updating to version 1.2.9 (from 1.2.8) I get this message at the console:

JZZ.js:899 Uncaught (in promise) TypeError: self._resume is not a function at onGood (JZZ.js:899)

Just noticed this message too that I didn't get with the previous version (1.2.8):

[Deprecation] Web MIDI will ask a permission to use even if the sysex is not specified in the MIDIOptions since around M82, 
around May 2020. See https://www.chromestatus.com/feature/5138066234671104 for more details.

Thanks for the fast notice! Can you please give me more detail on how to reproduce it?

I'm using JZZ inside a React app with a lots of (unrelated) code but I isolated the following piece of code which is enough to generate both messages (on Google Chrome console):

    const jzzEngine = await JZZ({
      engine: ['webmidi'],
      sysex: true,
      degrade: true,
    })
      .or('FAIL')
      .and('OK');

If I change sysex to false, the TypeError goes away but the deprecation message still remains.

Does it still work ok in spite of TypeScript complains?
(Need to understand how urgent the new release should be)

Yes, it works fine!

I have spotted a similar message while debugging another issue.
You can shut the message up by wrapping the whole await statement into a try/catch block.
I'm still looking for a better solution...

Fixed in the new release. Thanks a lot for reporting the bug!