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

Experimental Sandbox Won't Load

1732029337

Edited 1732029375
When I try to load the API Sandbox in my Jumpgate game it gives me this error: Error: Sheet worker error: Cannot access 'AttackIntegrant' before initialization ReferenceError: Cannot access 'AttackIntegrant' before initialization at eval (eval at self.onmessage (eval at toFunction (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:11:2)), <anonymous>:57173:31) at self.onmessage (eval at toFunction (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:11:2), <anonymous>:9:25) at process.<anonymous> (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:65:55) at process.emit (node:events:517:28) at emit (node:internal/child_process:944:14) at process.processTicksAndRejections (node:internal/process/task_queues:83:21) Switching to the Default Sandbox fixes the problem, but then TokenMod no longer works. Switching back to Experimental or restarting the sandbox does not fix the problem. I only have TokenMod enabled, but I tried disabling it and trying with just another script and it still gave the same error, so is there some problem on roll20's end? I don't know what else I could be missing.
1732083301
The Aaron
Roll20 Production Team
API Scripter
That appears to be an issue with the 2024 sheet integration with the API server. The sheet devs will need to fix that I'm afraid.  With the default API server, what do you mean regarding TokenMod not working?
Well, with the knowledge that it's a problem on the 2024 sheet's end, it may be the cause there as well. I have two Character Macros set up on a character, and they work fine from that "Character Macros" page using the Test Macro buttons, but despite them being toggled as "Show on token action", when I try to use them from the pop-up thing when the token is selected, they give me two different errors despite them both just selecting a side for the token and changing its size. One error is "Unable to find sheet action or character macro with the name '[name of the one macro]'." and the other is just "Character not found."
1733091719
The Aaron
Roll20 Production Team
API Scripter
Can you post the contents of those Character Macros so I can duplicate?
I got this same error as op 'AttackIntegrant' before initialization ReferenceError: Cannot access 'AttackIntegrant' before initialization which lead me into a down spiral of removing code part by part, and even when I reduced to a simple test msg like this: on("chat:message", function(msg) { if (msg.type === "api" && msg.content === ("!anything")) { sendChat("System", "Msg"); } }); it will still give the reference error with the sheet worker error.
The Aaron said: Can you post the contents of those Character Macros so I can duplicate? Ah, sorry for the delay - I didn't think I was getting another reply haha These are the two macros: !token-mod --set currentside|2 scale|2u !token-mod --set currentside|1 scale|.5u Considering they're nearly identical it's very confusing why they'd give two different errors.
Having a simmilar error; the only mod I'm loading is a door mod that interacts with tokens.  The error and code are below.  This is in both Jumpgate and Legacy, but only witht he 2024 character sheet.  Is there any way to get a mod to function with the 2024 5e character sheet?  The sheet itself must be the issue, but not sure how to fix it to get my doors to work. I get the following error: Error: Sheet worker error: Cannot access 'RollBonusIntegrant' before initialization ReferenceError: Cannot access 'RollBonusIntegrant' before initialization at eval (eval at self.onmessage (eval at toFunction (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:11:2)), <anonymous>:97191:34) at self.onmessage (eval at toFunction (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:11:2), <anonymous>:9:25) at process.<anonymous> (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:65:55) at process.emit (node:events:517:28) at emit (node:internal/child_process:944:14) at process.processTicksAndRejections (node:internal/process/task_queues:83:21) The code is as follows: /* SimpleDoorControls Use Creating a linked door system ----------------------------- Verify you're on the Token/Object Layer. Place a graphic of a door or other barrier in the closed position. Name that token DoorClosed (all one word, and yes the D and C need to be capitalized). Place a graphic of a door in the desired open position. Name that token DoorOpen (all one word, and yes the D and O need to be capitalized). Draw a line to act as the Dynamic Lighting barrier for the door when closed (while still on the Token layer). Select all three objects. Type !DoorsLink (or set it as a macro and use that macro) The Open Door and Dynamic Lighting barrier will be moved to the GM layer and Dynamic Lighting layer, respectively. The open and closed doors will be renamed.  This is how they are linked. DO NOT RENAME THE LINKED OBJECTS. Do this for each set of doors needed. Opening and Closing doors ------------------------- Once the objects are linked Select the door on the token layer Type !DoorOpenClose The door will open if it is closed, or it will close if it is opened. */ on("chat:message", function (msg) {     "use strict";     var Parts = {};     if (msg.type !== "api") {         return;     }     switch(msg.content.split(/\s+/).shift()) {         case "!DoorsLink":             //make sure three items are selected             if (msg.selected.length > 3) {                 sendChat("Doors", "/w gm You have selected too many things, looking among them for what I need.");             } else if (msg.selected.length < 3) {                 sendChat("Doors", "/w gm You have not selected enough things.");                 break;             }             //identify and get the ID for each each type of selected item             _.each(msg.selected, function(obj) {                 var o = getObj(obj._type, obj._id);                 if(o) {                     if (o.get("_type") === "graphic" && o.get("name") === "DoorOpen" && !Parts.DoorOpen) {                         Parts.DoorOpen=o;                     } else if (o.get("type") === "graphic" && o.get("name") === "DoorClosed" && !Parts.DoorClosed) {                         Parts.DoorClosed = o;                     } else if (o.get("type") === "path" && !Parts.Path) {                         Parts.Path = o;                     }                 }             });                          if( Parts.DoorOpen && Parts.DoorClosed && Parts.Path) {                 Parts.DoorOpen.set({                     name: Parts.Path.id +" "+Parts.DoorClosed.id,                     layer: "gmlayer"                 });                 Parts.DoorClosed.set({                     name: Parts.Path.id +" "+Parts.DoorOpen.id                 });                 Parts.Path.set({                     layer: "walls"                 });             } else {                 sendChat("Doors", "/w GM Couldn't fine required piece:<ul>"                         +(Parts.DoorOpen ? '' : '<li>Token named "DoorOpen".</li>')                         +(Parts.DoorClosed ? '' : '<li>Token named "DoorClosed".</li>')                         +(Parts.Path ? '' : '<li>Path for Dynamic Light Layer.</li>')                     +'</ul>'                 );             }             break;         case "!DoorOpenClose":             _.chain(msg.selected)                 .map(function(o){                     return getObj('graphic', o._id);                 })                 .reject(_.isUndefined)                 .filter(function(o){                     return 'objects' === o.get('layer');                 })                 .each(function(o){                     var params=o.get('name').split(/\s+/),                         oDoor = getObj('graphic',params[1]),                         oPath = getObj('path',params[0]);                     if(oDoor && oPath) {                         o.set({                             layer: 'gmlayer'                         });                                          oDoor.set({                             layer: 'objects'                         });                         oPath.set({                             layer: ( 'walls' === oPath.get('layer') ? 'gmlayer' : 'walls')                         });                     } else {                         sendChat('Doors','/w gm Missing components: <ul>'                             +(oDoor ? '' : '<li>GM Layer Door</li>')                             +(oPath ? '' : '<li>Dynamic Lighting Path</li>')                             +'</ul>');                     }                 });             break;     } });
1737879098
The Aaron
Roll20 Production Team
API Scripter
This is a bug with the Beacon sheets right now. 
Weirdly, got it to work last night, still failing this morning.  Looks like they need to lessen the things tinyworker checks for, or include them in the new sheet even is unused, but that's just me.