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

Help Identifying Error

My API Console keeps crashing and I do not know what is causing it. If someone who speaks coding can tell me what the following error means, then I could try to disable the mod that might be related to it. Please help. And thank you for your help! Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your script's code and click the "Save Script" button. We will then attempt to start running the scripts again. More info... If this script was installed from the Mod Library, you might find help in the Community API Forum. For reference, the error message generated was: TypeError: Cannot read properties of undefined (reading 'id') TypeError: Cannot read properties of undefined (reading 'id') at handleGraphicMovement (apiscript.js:13685:28) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:169:1), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:169:1), <anonymous>:70:8) at TrackedObj.set (/home/node/d20-api-server/api.js:1100:14) at updateLocalCache (/home/node/d20-api-server/api.js:1443:18) at /home/node/d20-api-server/api.js:1629: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)
1722393549
Gauss
Forum Champion
Hi Samifico,  Your first step is to find out which script (or combination of scripts) is causing a problem.  There are a couple methods for doing this, you can do it in halves, or you can do it one at a time.  For the longer method, but simpler to troubleshoot, I suggest one at a time.  Disable all of your scripts, then start re-enabling them one at a time until you find the one that causes a problem.
1722395231
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You might try starting with Combat Master or Combat Tracker if you have them installed. " handleGraphicMovement" is a function in both of these.
keithcurtis said: You might try starting with Combat Master or Combat Tracker if you have them installed. " handleGraphicMovement" is a function in both of these. This was indeed the mod that fucked up the console. Thank you!
1722883634
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
For anyone following a long, here is a way you can possibly narrow down the list of suspects. Look for a line and character reference in the error report. In this case, this was this line: handleGraphicMovement (apiscript.js:13685:28) Unless you have installed script info, and the script is built using meta tags to pass it's start line, this may not be able to point you to the exact script. In that case, go to the github repo , and look up the function or object that is reported int he error. If it's something common, it might be a fruitless search, but  handleGraphicMovement  is pretty specific. On the github page perform a search on the function name (search box is on upper left of page, or type "/" to activate. It will return a report containing line numbers and script references wherever that name is used. In this case, it is used in multiple places in the two scripts I mentioned. This makes sense, because IIRC, Combat Master was built off of the bones of Combat Tracker. Even if you know nothing of coding, it can give you a head start on finding the script that is generating the error.