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

Unexpected Token Error in API

Hi, I am having issues with my API console. I have tried enabling and disabling different scripts to identify the issue but as yet have not found out what is causing the issue. All my API's i have enabled are added straight from the Roll20 Library. Somebody please help. Spinning up new sandbox... "Starting webworker script..." "Loading 705 translation strings to worker..." "SyntaxError: Unexpected token {" "SyntaxError: Unexpected token {\n    at eval (<anonymous>)\n    at messageHandler (evalmachine.<anonymous>:284:6)\n    at process.<anonymous> (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:65:55)\n    at emitTwo (events.js:106:13)\n    at process.emit (events.js:194:7)\n    at process.nextTick (internal/child_process.js:766:12)\n    at _combinedTickCallback (internal/process/next_tick.js:73:7)\n    at process._tickCallback (internal/process/next_tick.js:104:9)" "-=> TokenMod v0.8.48 <=-  [Mon Dec 16 2019 05:20:41 GMT+0000 (UTC)]" "CombatTracker Ready! Command: !ct"
1585082337
The Aaron
Roll20 Production Team
API Scripter
This is something in the sheet workers of the character sheet you're using.  Which one do you have configured?
Sorry for hi-jacking the thread, i also have the exact same issue, no scripts currently work they all throw up this error. I am currently using the 5e ogl sheet (the D&D 5E by roll20 sheet)
1585084908
The Aaron
Roll20 Production Team
API Scripter
Usually sheet worker errors in the API don't cause it to crash, are you sure it's not working?
ive tried with the tokenlock script and easyexperience script. they both throw up the same type / same error. when the game loads all my maps / assets are missing. if i disable all the scripts then all the maps and tokens etc appear again
1585090176
The Aaron
Roll20 Production Team
API Scripter
That is bizarre. The API shouldn't have any effect on the loading of resources in the game. What browser are you using? Also, Cassie tracked down the issues with the sheet, guessing at a patch shortly!
chrome, awesome that the patch is on the way, planning to run a game tomorrow afternoon and hope that i can run my api's
1585093656

Edited 1585093876
Yeah 5e OGL character sheet too (Firefox). Weird, I had loaded Patrol, TokenMod and CombatTracker and they were all working fine. I added TokenMod Macro's in for Wildshape changes. Here is an example of one Macro Set incase there is something wrong here: &{template:npcaction} {{name=@{selected|token_name} }} {{rname=CR0 Wildshape}} {{description=[Owl](!token-mod --set currentside|66 width|45 height|45 represents|@{Druidic Owl|character_id} bar1_link|hp bar2_link|npc_ac bar3_link|npc_speed name|'Druidic Owl' showname|yes light_radius| light_dimradius| light_angle|360 --off light_otherplayers @{selected|token_id}) - Flying [Spider](!token-mod --set currentside|82 width|45 height|45 represents|@{Druidic Spider|character_id} bar1_link|hp bar2_link|npc_ac bar3_link|npc_speed name|'Druidic Spider' showname|yes light_radius| light_dimradius| light_angle|360 --off light_otherplayers @{selected|token_id}) [**Back to Menu**](! #Wildshape)}} Other than that I added one characters stats into the character sheets as a PC. Then today its not loading, I noticed after I added the StatusInfo API, but im pretty sure it was down before that because even after I deleted them and tried to re-load.
1585094815
The Aaron
Roll20 Production Team
API Scripter
It's because the 5e sheet was updated to this morning, which introduced the issue.
Ah gotcha, makes sense. One other thing too is, when I type and enter anything to chat it doesn't show, just disappears and the chat window history skips, just incase that is something that needs looking into. You said it was being patched?
1585099079
The Aaron
Roll20 Production Team
API Scripter
Yeah, don't know when, I'm guessing overnight with the downtime, but I really have no idea.
everything seems to be working as intended now! Thanks for the quick response and info 
1585143210
The Aaron
Roll20 Production Team
API Scripter
Woot!
I'm not sure if I should have just started a new post or not...  but I am getting a similar message: "Starting webworker script..." "Loading 705 translation strings to worker..." And nothing happens.  It never loads those things.  I was using Flight, Aura/Tint Health Colors, and TokenMod.  I had been working on TokenMod to make a Wildshape... macro?  Table?  Combination?  I had done something wrong with one of the creatures (a Lizard).  Then my player logged in and started changing his Token while I was attempting to make the Wildshape thing work.  As you can guess, TokenMod hated this, monumentally.  It broke everything I had set-up with TokenMod and I ultimately had to turn the API off before the game (which was in 20 minutes). Flight and Aura/Tint Health Colors worked for about 45 minutes of our game, then all of the APIs crashed.  I deleted Aura/Tint Health Colors and TokenMod.  Not even Flight will work now, though.