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] API Console error unrelated to loaded scripts?

I've been developing one of my scripts off and on over the last few weeks but when I sat down tonight, I had an error pop up before even making any changes that I can't seem to track down: "SyntaxError: Unexpected token '.' at eval (<anonymous>) at messageHandler (evalmachine.<anonymous>:713:6) at process.<anonymous> (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:65:55) at process.emit (events.js:310:20) at emit (internal/child_process.js:876:12) at processTicksAndRejections (internal/process/task_queues.js:85:21)" At first I thought it was something I hadn't noticed from the last time I was messing with things, but even after resorting to commenting out large chunks of code, I just could not get the error to go away. The script I've been working on seems to be functioning (the sandbox doesn't kill it and it responds to commands) so I started disabling it as well as every other script, including those from the menu that might have auto-updated and be the source of it. But still... no luck. While the sandbox needs at least one script to spin up, no matter what that script is (even just one of the benign math libraries that some of the others depend on) the error still appears. Then finally, I checked out some of my other games, including one I haven't launched or modified in months. It's in the console there as well. At this point, I feel it might be one of two possibilities: I did a really big dumb and my API broken something that it shouldn't have been able to break. (Maybe something attached to my account?) Something completely unrelated to my janky code broke in an update or something behind the scenes. (Maybe others are having the same issue?) Either way, I'm weary of continuing to code if my sandbox is unstable for some reason and I'll probably need staff to check it out (I can post the game URL or whatever you need) but I wanted to post it publicly in case someone else has (or had) the same problem and can offer some insight and save them the time/effort. Thanks for any assistance you can provide and sorry if I'm overlooking something here, I've been beating my head against my desk for the last few hours trying to figure this out.
I am currently encountering the exact same problem. Disabling and enabling Scripts won't fix the problem. In another game the same problem occurs, biy the scripts are obviously loaded in a different order, thus the console does not die...which is strange.
1629193308
GiGs
Pro
Sheet Author
API Scripter
If its affecting multiple people in different games with different scripts, it could be a bug at the roll20 side - it's happened before. First disable all scripts, and see if the error still happens. Then reenable scripts one at a time, and see if the error pops immediately or when a specific script is enabled.
Hi, thanks for taking note. The error pops up right away, independently of the script enabled at first. I guess we just have to wait until someone fixed it on roll20's side.
1629199429
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi all, From my investigations, this looks to be a problem with the 5e sheet. Is everyone experiencing this using the 5e sheet? The good news is that it seems to have absolutely no effect on the API sandbox and can, as far as I can tell, be ignored.
Yeah, I'm using the default Roll20 5e sheet. Glad to hear I'm not alone, at least that means I didn't break something. :-P Gonna pick up where I left off then. Thanks everyone for chiming in!
1629228638
Sam
Forum Champion
Hello, we were made aware of the issue today and are working on a fix.  Sorry for the confusion the message is generating.  At present, we haven't seen it impacting any actual script functionality.  If that is not the case for you, please do file an issue right away.
Sam [R20] said: Hello, we were made aware of the issue today and are working on a fix.  Sorry for the confusion the message is generating.  At present, we haven't seen it impacting any actual script functionality.  If that is not the case for you, please do file an issue right away. Cool. Thanks Sam
Hi. I have the same error and it is affecting my API scripts. I disabled one at a time and restarted etc but after 5 or 10 minutes of in game usage, my API's are shut down, but the game still continues to operate, but without any APIs running.  Namely, the Aura/Tint HealthColors API goes down which is the first indicator, and one we all rely on for ingame. Please help!
yup.. I have the same error and things were working fine a few weeks ago.
having the exact same error on a new 5e game.  posting here for updates
Also experiencing this error, however my scripts will not load at this point. I've tried logging out of the game completely, loading up in a different browser, etc. Disabled all scripts, and the error came back after reactivating the first one.
Gary T. said: Hi. I have the same error and it is affecting my API scripts. I disabled one at a time and restarted etc but after 5 or 10 minutes of in game usage, my API's are shut down, but the game still continues to operate, but without any APIs running.  Namely, the Aura/Tint HealthColors API goes down which is the first indicator, and one we all rely on for ingame. Please help! I am experiencing the same issue! 
Hello, I am still getting this same error as well.  It does not appear to be caused by any particular API. 
Hi team, Yep I'm also getting the same exact message as OP. "SyntaxError: Unexpected token '.'     at eval (<anonymous>)     at messageHandler (evalmachine.<anonymous>:713:6)     at process.<anonymous> (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:65:55)     at process.emit (events.js:310:20)     at emit (internal/child_process.js:876:12)     at processTicksAndRejections (internal/process/task_queues.js:85:21)"
Hi, I'm also getting the same exact message as: "SyntaxError: Unexpected token '.'     at eval (<anonymous>)     at messageHandler (evalmachine.<anonymous>:713:6)     at process.<anonymous> (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:65:55)     at process.emit (events.js:310:20)     at emit (internal/child_process.js:876:12)     at processTicksAndRejections (internal/process/task_queues.js:85:21)"
1630102524
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
For those of you getting the error, it would be helpful to the devs to indicate if it is crashing the sandbox or keeping other scripts from working. So far I only see one person reporting a general scripting failure, which may or may not be related to the error that folks are reporting.
1630200484

Edited 1630200626
Ammo
Pro
I get this error every time I start any of my sandboxes.   It does not keep any of  my scripts from working.    For testing, I put a completely harmless 1 line script in there, to make sure it has nothing to do with the contents of the sandbox, and the error still happens.   At that point, I decided it is likely some code snippet being registered by the 5e OGL sheet?    So I created a new game with NO sheet and the bug does not happen. Added the D&D 5e Sheet by Roll20 to that game, and the bug shows up. Removed the sheet again, bug is gone. So yeah, it is a bit of code registered by the 5e sheet that has some stray characters I guess...   Not sure why this would be hard for your devs to debug.  (trash talk is intentional)
Hello All, I don't know if this has been resolved yet however I am also experiencing an issue with adding one script and I get the following error: "Loading 755 translation strings to worker..." "Starting webworker script..." "Loading 755 translation strings to worker..." "SyntaxError: Unexpected token '.'" "SyntaxError: Unexpected token '.'     at eval (<anonymous>)     at messageHandler (evalmachine.<anonymous>:713:6)     at process.<anonymous> (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:65:55)     at process.emit (events.js:310:20)     at emit (internal/child_process.js:876:12)     at processTicksAndRejections (internal/process/task_queues.js:85:21)" I deleted the character sheet that was referenced in this script and then loaded a dummy script just to test (removing the offending script) and it worked again. Upon retrying uploading the script again I received the same error. 
Just to update, this issue seems to have been fixed (at least for my games). The console is now showing a new line I've not seen before instead of the error and I'm guessing was what was originally intended for the update Roll20 did on their end: "Roll20 Environment: Web" I have experienced a quirk with how my scripts are handling inline rolls, but haven't had the time yet to troubleshoot them. It could just be a bug of my own that I just hadn't ran into before or maybe the syntax has been changed with the update and I'll simply need to adjust for it. Otherwise, thanks for fixing the error line, it was a bit annoying have to look at. :-P 
FarricSarhorn said: [...cut...] I have experienced a quirk with how my scripts are handling inline rolls, but haven't had the time yet to troubleshoot them. It could just be a bug of my own that I just hadn't ran into before or maybe the syntax has been changed with the update and I'll simply need to adjust for it. Otherwise, thanks for fixing the error line, it was a bit annoying have to look at. :-P  The original problem reported here appears fixed. I am not seeing anything weird with dice rolling.  I use sendChat with callback to evaluate them as normal.  I can also do inline rolls in visible chat as normal.   
Yes, exactly. I only mentioned it because of the timing of when it started (in a session last night) and due to the fact that I've not made any changes to my scripts in the past few days. Entirely possible (and probably more than likely) it's a bug of my own that just popped up coincidentally. Just wanted to be thorough in case someone had experienced the same.