Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

API error issues possibly with Combat Tracker - help?

Hi all, So I keep getting an error that breaks the API and causes me to have to reset it during my game. I'm not sure what script however is causing it or what I could do to resolved it. I captured a copy of the error from when it happened repeatedly last game. It's a 5e game using the Combat Tracker and I'm worried it's something there as I was running a lot of scripts that interacted with it before it stopped being supported by the original developer and was revived by the community. Anyway, if anyone can help me sort out what the issue is and how I can resolve it, I'd be eternally grateful. Having to restart the API after every other round of combat gets so tedious and is putting a damper on my game. "Starting webworker script..." "Loading 678 translation strings to worker..." "-=> TokenMod v0.8.45 <=-  [Wed Sep 11 2019 00:18:53 GMT+0000 (UTC)]" "-=> TableExport v0.2.3 <=-  [Tue Jan 19 2016 13:10:12 GMT+0000 (UTC)]" "-=> MotD v0.2.11 <=-  [Wed Jun 26 2019 02:55:31 GMT+0000 (UTC)]" "-=> CharUtils v0.6.4 <=-  [Fri Jan 22 2016 14:01:40 GMT+0000 (UTC)]" "Defaults" "CombatTracker Ready! Command: !ct" "-=> ChatSetAttr v1.9 <=-" "Concentration Ready! Command: !concentration" "DeathTracker Ready! Command: !dead" "StatusInfo Ready! Command: !condition" "InspirationTracker Ready! Command: !conviction" "-=> RecursiveTable v0.2.4 <=-  [Thu Jan 11 2018 15:56:43 GMT+0000 (UTC)]" "-=> ChangeTokenImg v0.1.33 <=-  [Wed Nov 01 2017 21:08:16 GMT+0000 (UTC)]" "-=> TokenSync v1.6 <=-  [Fri Mar 18 2016 17:18:10 GMT+0000 (UTC)]" "-=> CleanAbilities v0.1.2 <=-  [Fri Mar 24 2017 13:47:03 GMT+0000 (UTC)]" "-=> MonsterHitDice v0.3.6 <=-  [Mon Aug 15 2016 13:08:21 GMT+0000 (UTC)]" "-=> GroupCheck v1.9 <=-" "-=> TokenNameNumber v0.5.12 <=-  [Tue Jul 25 2017 15:01:48 GMT+0000 (UTC)]" "GMSheet v0.2.0 online. Select one or more party members, then use `!gmsheet -h`" "-=> NoteLog v0.1.2 <=-  [Sun Oct 16 2016 18:21:23 GMT+0000 (UTC)]" "-=> Bump v0.2.17 <=-  [Fri Jul 19 2019 00:18:19 GMT+0000 (UTC)]" "Handle Turnorder Change" "Turn Order Change" "ID:-LqqzNWWc9eqnJaVUXW9" "Announce Condition" "Token ID:-LqqzNWWc9eqnJaVUXW9" TypeError: Cannot read property 'length' of undefined TypeError: Cannot read property 'length' of undefined     at Object.processRolls (apiscript.js:13587:39)     at handleChatMessage (apiscript.js:13918:13)     at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:65:16)     at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:70:8)     at /home/node/d20-api-server/api.js:1637:12     at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560     at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147)     at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546)     at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489)     at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425)     at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400 Restarting sandbox due to script changes... Previous shutdown complete, starting up... Spinning up new sandbox... Another instance: Old Statuses:black-flag,red" "Handle Graphic Movement" "Handle Graphic Movement" "Handle Graphic Movement" "Handle Graphic Movement" TypeError: Cannot read property 'length' of undefined TypeError: Cannot read property 'length' of undefined     at Object.processRolls (apiscript.js:13587:39)     at handleChatMessage (apiscript.js:13918:13)     at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:65:16)     at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:70:8)     at /home/node/d20-api-server/api.js:1637:12     at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560     at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147)     at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546)     at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489)     at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425)     at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400 Restarting sandbox due to script changes... Previous shutdown complete, starting up... Spinning up new sandbox... More errors: "Action:next" "Condition:undefined" "Next Turn" "Turn Order Change" "ID:-LqqzNWWc9eqnJaVUXW9" "Announce Condition" "Token ID:-LqqzNWWc9eqnJaVUXW9" TypeError: Cannot read property 'length' of undefined TypeError: Cannot read property 'length' of undefined     at Object.processRolls (apiscript.js:13587:39)     at handleChatMessage (apiscript.js:13918:13)     at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:65:16)     at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:70:8)     at /home/node/d20-api-server/api.js:1637:12     at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560     at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147)     at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546)     at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489)     at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) Restarting sandbox due to script changes... Previous shutdown complete, starting up... Spinning up new sandbox... "Starting webworker script..." "Loading 678 translation strings to worker..." "-=> TokenMod v0.8.45 <=-  [Wed Sep 11 2019 00:18:53 GMT+0000 (UTC)]" "-=> TableExport v0.2.3 <=-  [Tue Jan 19 2016 13:10:12 GMT+0000 (UTC)]" "-=> MotD v0.2.11 <=-  [Wed Jun 26 2019 02:55:31 GMT+0000 (UTC)]" "-=> CharUtils v0.6.4 <=-  [Fri Jan 22 2016 14:01:40 GMT+0000 (UTC)]" "Defaults" "CombatTracker Ready! Command: !ct" "-=> ChatSetAttr v1.9 <=-" "Concentration Ready! Command: !concentration" "DeathTracker Ready! Command: !dead" "StatusInfo Ready! Command: !condition" "InspirationTracker Ready! Command: !conviction" "-=> RecursiveTable v0.2.4 <=-  [Thu Jan 11 2018 15:56:43 GMT+0000 (UTC)]" "-=> ChangeTokenImg v0.1.33 <=-  [Wed Nov 01 2017 21:08:16 GMT+0000 (UTC)]" "-=> TokenSync v1.6 <=-  [Fri Mar 18 2016 17:18:10 GMT+0000 (UTC)]" "-=> CleanAbilities v0.1.2 <=-  [Fri Mar 24 2017 13:47:03 GMT+0000 (UTC)]" "-=> MonsterHitDice v0.3.6 <=-  [Mon Aug 15 2016 13:08:21 GMT+0000 (UTC)]" "-=> GroupCheck v1.9 <=-" "-=> TokenNameNumber v0.5.12 <=-  [Tue Jul 25 2017 15:01:48 GMT+0000 (UTC)]" "GMSheet v0.2.0 online. Select one or more party members, then use `!gmsheet -h`" "-=> NoteLog v0.1.2 <=-  [Sun Oct 16 2016 18:21:23 GMT+0000 (UTC)]" "-=> Bump v0.2.17 <=-  [Fri Jul 19 2019 00:18:19 GMT+0000 (UTC)]" "Handle Turnorder Change" "Turn Order Change" "ID:-LqrNRsdvMA6ks8aKbz8" "Announce Condition" "Token ID:-LqrNRsdvMA6ks8aKbz8" "handleInput" "Msg:!ct next" "handleInput" "Command:ct" "Action:next" "Condition:undefined" "Next Turn" "Turn Order Change" "ID:-LqrNRqm9JYxLeJTtkld" "Announce Condition" "Token ID:-LqrNRqm9JYxLeJTtkld" "Handle Graphic Movement" TypeError: Cannot read property 'length' of undefined TypeError: Cannot read property 'length' of undefined     at Object.processRolls (apiscript.js:13587:39)     at handleChatMessage (apiscript.js:13918:13)     at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:65:16)     at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:70:8)     at /home/node/d20-api-server/api.js:1637:12     at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560     at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147)     at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546)     at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489)     at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425)     at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400 Restarting sandbox due to script changes... Previous shutdown complete, starting up... Spinning up new sandbox... "Starting webworker script..."
disable StatusInfo as it is part of the new combat tracker. To start. 
Thank you Kilter, will do.
Ok so I disabled that script and did some testing. I'm noticing the API breaks seemingly when I cast certain spells with an attack roll in them like Flame Blade or Sacred Flame, etc, but not all of them as for example Eldritch Blast works fine? It doesn't matter if this is from a macro or directly from the sheet. I'm using the the standard 5e sheet by Roll20. Here is a screen recording of it happening in real time when I cast Sacred Flame from this character's sheet: <a href="http://somup.com/cqXrqgfrfp" rel="nofollow">http://somup.com/cqXrqgfrfp</a> &nbsp;&nbsp;&nbsp;&nbsp; Error message received each time: TypeError: Cannot read property 'length' of undefined TypeError: Cannot read property 'length' of undefined &nbsp;&nbsp;&nbsp; at Object.processRolls (apiscript.js:12797:39) &nbsp;&nbsp;&nbsp; at handleChatMessage (apiscript.js:13128:13) &nbsp;&nbsp;&nbsp; at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:65:16) &nbsp;&nbsp;&nbsp; at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:70:8) &nbsp;&nbsp;&nbsp; at /home/node/d20-api-server/api.js:1637:12 &nbsp;&nbsp;&nbsp; at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 &nbsp;&nbsp;&nbsp; at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) &nbsp;&nbsp;&nbsp; at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) &nbsp;&nbsp;&nbsp; at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) &nbsp;&nbsp;&nbsp; at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) &nbsp;&nbsp;&nbsp; at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400
I think I may have worked it out. I had a script called RollStats still installed despite not using it and I guess something in it doesn't like a change to the newer version of the 5e sheet. I noticed after disabling it the particular issue above has been resolved so I'm guessing that was the culprit. I'll keep an eye on it during tonight's session and see if I run into anything else breaking the API.