Audio issues - 'AudioBufferSourceNode': The off set provided is less than 0

I’ve received an error trying to add my own .mp3 files to existing animation files; showing ‘AudioBufferSourceNode’: The off set provided is less than 0

Would this have to do with adding the file twice to the same Audio Event at different timeframes?

/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9
Hide Stack Trace
Error: Failed to execute ‘start’ on ‘AudioBufferSourceNode’: The offset provided (-0.040625) is less than the minimum bound (0).
at Error (native)
at e.n.set (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:8226)
at e.o.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:16940)
at e.o.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:14700)
at e.o.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:10431)
at /Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:12847
at Array.forEach (native)
at e.o.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:12825)
at emitNone (events.js:72:20)
at t.emit (events.js:166:7)
at t.s.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:10:15734)
at t.s.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:10:12569)

Adding audio event, using multiple copies of a new .mp3 file to a .key file and then playing the animation creates this error…

First creating and selecting Audio event in an existing .key file; from selection UI by selecting Audio Event, then clicking the file search button and selecting my .mp3 file.

Using the ‘s’ key on the keyboard to add the audio, then moving the time slider past the audio waveform and agin hit the ‘s’ key on the keyboard to add the same .mp3 file

Atom Version: 1.8.0
System: Mac OS X 10.11.5
Thrown From: jibo-sdk package, v1.7.1

Stack Trace

Uncaught InvalidStateError: Failed to execute ‘start’ on ‘AudioBufferSourceNode’: The offset provided (-0.040625) is less than the minimum bound (0).

At /Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9

Error: Failed to execute 'start' on 'AudioBufferSourceNode': The offset provided (-0.040625) is less than the minimum bound (0).
    at Error (native)
    at e.n.set (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:8226)
    at e.o.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:16940)
    at e.o.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:14700)
    at e.o.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:10431)
    at /Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:12847
    at Array.forEach (native)
    at e.o.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:12825)
    at emitNone (events.js:72:20)
    at t.emit (events.js:166:7)
    at t.s.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:10:15734)
    at t.s.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:10:12569)

Commands

  2x -5:55.6.0 jibo-sdk:upsert-keyframe (div.)
     -3:35 core:save (atom-pane.pane.active)
  2x -0:21.9.0 jibo-sdk:upsert-keyframe (div.)
     -0:05.7.0 core:save (div.)

Config

{
  "core": {
    "automaticallyUpdate": false,
    "themes": [
      "atom-light-ui",
      "atom-light-syntax"
    ]
  },
  "jibo-sdk": {
    "AnimationEditor": "[{\"size\":1353.2501120573734,\"children\":[{\"size\":623.75,\"children\":[{\"size\":1237.0207560816593,\"children\":[]},{\"size\":959.0207560816593,\"children\":[]}]},{\"size\":227.75,\"children\":[]}]},{\"size\":186.74988794262663,\"children\":[]}]",
    "BehaviorEditor": "[{\"size\":700.5,\"children\":[{\"size\":-24,\"children\":[]},{\"size\":-24,\"children\":[]}]},{\"size\":610.5,\"children\":[{\"size\":-24,\"children\":[]},{\"size\":-24,\"children\":[]}]}]",
    "RunConfiguration": {}
  }
}

Installed Packages

# User
audio, v1.5.6
jibo-sdk, v1.7.1

# Dev
No dev packages

Hi Al,

Just tried to recreate the error you had on my end but was unable to get the same result.

I added a custom MP3 file to an Audio Event layer in two different keyframes and both played correctly. I also tried adding a third different MP3 file to the same layer and it still played correctly. Finally, I tried “stacking” the audio events (having them play on top of eachother) and didn’t get the error you mentioned.

Are you able to recreate this error in a completely new skill? If so, please post the steps and I’ll try again to reproduce it. If it seems to be happening with only a specific MP3 file, please attach that file if you can.

Hey Al!

I’m sorry to hear your are running into this error and thank you for being so thorough in your post. It sounds like there may be an issue with custom audio files. There are a few additional things I would like to confirm to make sure there are no issues with the current set up. Could you quickly verify which versions of Node.js and xcode you are running? You can find this by opening up Terminal and typing in the following commands:

node --version

xcode-select --version

It seems the audio is starting in the middle of the clip and this is throwing the error. Can you verify if the issue continues if you:

  • only add the audio file in once?
  • delete the audio layer and then recreate it?
  • or when using one of the Jibo audio files?

If you could send me the custom audio file and .keys file you are working, that would be awesome so I can test it further on my end.

Thanks!

Thanks Joe,

Here are the files. I’m wondering if it’s Xcode again, as OS X has had many updates as of late.
Node is V4.2.6
xcode-select is V 2343
Thanks,
Al

searching.keys (11.7 KB)

Thanks Al for getting these files to me!

I am not getting the same error message you were seeing, which leads me to believe it may have to do with your Node version. There have been some weird compatibility issues with some versions of Node.js v. 4.2.x. Can you update your Node version to 4.4.5 LTS and see if you are seeing the same issue?

Let me know if this helps, otherwise we can continue digging into this further.

I was able to repeat the error from adding a new animation .key file.

I’m selecting the audio layer, selecting the audio, then pressing the ‘s’ key to add the audio, then increasing the number of frames, finding the file, locating the next frame, then clicking the ‘s’ key on the keyboard again to add the audio and see the audio waveform. Then I play and get the error.

[Enter steps to reproduce below:]

Atom Version: 1.8.0
System: Mac OS X 10.11.5
Thrown From: jibo-sdk package, v1.7.1

Stack Trace

Uncaught InvalidStateError: Failed to execute ‘start’ on ‘AudioBufferSourceNode’: The offset provided (-0.00729167) is less than the minimum bound (0).

At /Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9

Error: Failed to execute 'start' on 'AudioBufferSourceNode': The offset provided (-0.00729167) is less than the minimum bound (0).
    at Error (native)
    at e.n.set (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:8226)
    at e.o.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:16940)
    at e.o.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:14700)
    at e.o.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:10431)
    at /Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:12847
    at Array.forEach (native)
    at e.o.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:12825)
    at emitNone (events.js:72:20)
    at t.emit (events.js:166:7)
    at t.s.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:10:15734)
    at t.s.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:10:12569)

Commands

     -2:43.2.0 jibo-sdk:new-animation-file (atom-pane.pane.active)
     -2:13 jibo-sdk:upsert-keyframe (div.)
     -2:07.4.0 jibo-sdk:confirm (input.native-key-bindings)
     -2:04.8.0 core:focus-next (input.native-key-bindings)
  6x -1:54.7.0 jibo-sdk:upsert-keyframe (div.)

Config

{
  "core": {
    "automaticallyUpdate": false,
    "themes": [
      "atom-light-ui",
      "atom-light-syntax"
    ]
  },
  "jibo-sdk": {
    "AnimationEditor": "[{\"size\":1353.2501120573734,\"children\":[{\"size\":623.75,\"children\":[{\"size\":1237.0207560816593,\"children\":[]},{\"size\":959.0207560816593,\"children\":[]}]},{\"size\":227.75,\"children\":[]}]},{\"size\":186.74988794262663,\"children\":[]}]",
    "BehaviorEditor": "[{\"size\":700.5,\"children\":[{\"size\":-24,\"children\":[]},{\"size\":-24,\"children\":[]}]},{\"size\":610.5,\"children\":[{\"size\":-24,\"children\":[]},{\"size\":-24,\"children\":[]}]}]",
    "RunConfiguration": {}
  }
}

Installed Packages

# User
audio, v1.5.6
jibo-sdk, v1.7.1

# Dev
No dev packages

Hey @alfarmer, is this error still happening after updating to Node 4.4.5?

Hi Al, Joe, Michael !

I ran the files you uploaded Al without error.
The only differences on my mac seems to be between our Atom version (mine 1.7.4, yours 1.8.0)
and node version

*** Atom 1.7.4
***node v4.4.1
xcode-select version 2343
mac 10.11.5
jibo 1.7.1

I hope that helps,
Bob

Thank you @michael and @bmulreni for jumping in to help test this out!

I updated, closed everything and reopened, created the new layer and got the same error when running it.

[Enter steps to reproduce below:]

Atom Version: 1.8.0
System: Mac OS X 10.11.5
Thrown From: jibo-sdk package, v1.7.1

Stack Trace

Uncaught InvalidStateError: Failed to execute ‘start’ on ‘AudioBufferSourceNode’: The offset provided (-0.00729167) is less than the minimum bound (0).

At /Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9

Error: Failed to execute 'start' on 'AudioBufferSourceNode': The offset provided (-0.00729167) is less than the minimum bound (0).
    at Error (native)
    at e.n.set (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:8226)
    at e.o.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:16940)
    at e.o.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:14700)
    at e.o.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:10431)
    at /Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:12847
    at Array.forEach (native)
    at e.o.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:9:12825)
    at emitNone (events.js:72:20)
    at t.emit (events.js:166:7)
    at t.s.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:10:15734)
    at t.s.value (/Users/alfarmer/.atom/packages/jibo-sdk/lib/jibo-sdk.js:10:12569)

Commands

  2x -0:20.7.0 jibo-sdk:upsert-keyframe (div.)

Config

{
  "core": {
    "automaticallyUpdate": false,
    "themes": [
      "one-light-ui",
      "one-light-syntax"
    ]
  },
  "jibo-sdk": {
    "AnimationEditor": "[{\"size\":1353.2501120573734,\"children\":[{\"size\":623.75,\"children\":[{\"size\":1237.0207560816593,\"children\":[]},{\"size\":959.0207560816593,\"children\":[]}]},{\"size\":227.75,\"children\":[]}]},{\"size\":186.74988794262663,\"children\":[]}]",
    "BehaviorEditor": "[{\"size\":700.5,\"children\":[{\"size\":-24,\"children\":[]},{\"size\":-24,\"children\":[]}]},{\"size\":610.5,\"children\":[{\"size\":-24,\"children\":[]},{\"size\":-24,\"children\":[]}]}]",
    "RunConfiguration": {}
  }
}

Installed Packages

# User
audio, v1.5.6
jibo-sdk, v1.7.1

# Dev
No dev packages

You can see the second time I ran node --version it was 4.4.5 after upgrading.

My atom decided to update from 1.7.4 to 1.8.0
So… it runs the animation ok as before with 1.7.4

Hi Al,

Thank you for sticking through this with me. I have a few more things we can try to get this up and running for you:

  1. Open up Terminal one more time and type node --version to make sure your system is aware of the new Node version. If it is still showing 4.2.6, try restarting your system. If the issue continues, try following these troubleshooting steps and make sure you are using lts for the update, not stable

  2. Open the package.json file and make sure under dependencies using the correct versioning:
    “dependencies”: {
    “behaviorify”: “^1.0.0”,
    “jibo”: “^3.0.0”
    },

  3. Open up Terminal and follow these steps to change directories into the root folder of your skill cd ~/<folder-path>/<new-skill-name> and run npm install then reload Atom.

  4. If this error continues, follow these steps to disable the Jibo-SDK package, uninstall the Jibo-SDK, and then reinstall the Jibo-SDK. This fixes most problems with the SDK.

  5. After doing that, you will want to go to your command line and cd into ~/.atom/packages/jibo-sdk. Once you are there you will want to run rm -rf node_modules and then immediately run npm install in that same directory. This will make sure that the master dependencies are generated for any skill is pulling from the most current node modules.

  6. At this point I would close out of Atom entirely and re-open your skill.

If you are still seeing the error after taking the above steps please let me know and, if possible, upload a copy of a skill where you are seeing this issue to GitHub so that I can take a direct look at it for you. That will help me further determine what in the SDK or your system might be leading to this behavior.

It appears the versions look ok. Note: the error is from inside the SDK when the ‘play’ function for this .key file is used, the error is generated; it’s not used in any skill yet.

Those didn’t seem to work?

Notice where the error occurs; while playing the sound for the first time; it’s not even through the sound when it fails.

@alfarmer can you upload a copy of a skill where you are seeing this issue to GitHub so that I can take a direct look at it for you? That will help me further determine what in the SDK or your system might be leading to this behavior. Thanks!

Still uploading but should appear here:

Also in a zip file here:

https://github.com/jiborobot/jibo-sdk/issues/8

Hey @alfarmer, I tried running your test skill on my machine and still not able to reproduce the error you were seeing. Could you confirm you were seeing this same error in both the test skill you posted as well as the other skill from the first screenshot? It does seem like there is an issue with the SDK install. Could you run through the last two steps again so we can make sure the SDK is installing properly?

  1. Follow these steps to:
    Disable and uninstall the Jibo-SDK, then reinstall the Jibo-SDK. Test out the animation again, see if you are still see the same error.

  2. If you are still seeing the same error, then open Terminal and run the following commands again:
    cd ~/.atom/packages/jibo-sdk
    rm -rf node_modules
    npm install
    If you could copy and paste your console log here, I can take a closer look to ensure everything it is printing out looks good.

Thank for your patience Al!