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] Console crash

Is it possible to tell which script does keep crashing my console? For reference, the error message generated was:  TypeError: Cannot read property 'stroke' of undefined TypeError: Cannot read property 'stroke' of undefined at handlePath (apiscript.js:15997:39) 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 TrackedObj.added (/home/node/d20-api-server/api.js:866:10) at updateLocalCache (/home/node/d20-api-server/api.js:1342:18) at /home/node/d20-api-server/api.js:1519:11 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)
1607266669
timmaugh
Pro
API Scripter
That is something trying to handle a path object (things like a wall or door). What scripts do you have installed and what behavior produces this error?
1607270748
The Aaron
Roll20 Production Team
API Scripter
It doesn't look like this is in a 1-click script (nothing in the repo has a free function named handlePath ).   The way to track it down is: Find a reliable way to reproduce the crash. Disable one script at a time until you can't reproduce the crash The last script you disabled has the problem. You're probably looking for a script that does something like path.stroke instead of path.get('stroke').
1607271377
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I believe klobass may have the beta of my next doorknocker version installed. Can you confirm Klobass?
1607274569

Edited 1607274580
The Aaron
Roll20 Production Team
API Scripter
In DoorKnocker BETA, on line 1023 (or there about) find this: }else if(colorRegex.test(prev.stroke) && /,\["M"/i.test(obj.get('path'))){ Change it to this: }else if( prev && colorRegex.test(prev.stroke) && /,\["M"/i.test(obj.get('path'))){ Scott will probably push an update soon. =D
Scott C. said: I believe klobass may have the beta of my next doorknocker version installed. Can you confirm Klobass? I indeed have :) so downgrade or wait for patch ?:-D 
1607284958
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Aaron's got you covered up above until I get the code fixed
changed it :) thanks a bunch
1607350647
The Aaron
Roll20 Production Team
API Scripter
Console is pretty great, but it's not accessible for API scripts.  It is really useful for Sheet Workers though.