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

Return of the "SyntaxError: Unexpected token '.' error

Hi,

I seem to be experiencing the exact same problem that occurred in the closed thread Community Forums: [Help] API Console error unrelated to loaded scripts? | Roll20: Online virtual tabletop in post # 10318637.

I've been quite happily coding away and have been making great progress. However I've just started getting this error.

"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:314:20)
    at emit (internal/child_process.js:877:12)
    at processTicksAndRejections (internal/process/task_queues.js:85:21)"

This seems to happen regardless of what script I have. I've disabled all the scripts (tokenMod, bump and Token Action, and my own concoction) and added in a random one from the library. This seems to suggest that it is unrelated to my previously loaded scripts.

From the previous thread this seemed to be caused by a bug in the 5e character sheet. Has anyone else started experiencing the same issue?

I've reinstated my scripts and despite the console throwing this error message my script seems to be working fine.

Any help would be much appreciated.


April 04 (3 years ago)
Ezra
KS Backer

I am seeing this as well, I actually saw it in a new game I created today with no API scripts added yet.

I've the same problem:


"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:314:20)

    at emit (internal/child_process.js:877:12)

    at processTicksAndRejections (internal/process/task_queues.js:85:21)"

April 05 (3 years ago)
The Aaron
Roll20 Production Team
API Scripter

The sheet workers in Character sheets are executed in the API sandbox. If there is an error in them, it can show up in the API Console Log. Are you using the Dnd5e by Roll20 sheet?  You could try removing it and adding it back in. 

Yup, I've checked and it happens regardless of scripts whenever the D&D 5e sheet is loaded.

April 05 (3 years ago)
Andrew R.
Pro
Sheet Author

You should use the Help Center and Send a request to get Roll20 staff attention and a ticket to track your issue. 

April 05 (3 years ago)

Edited April 05 (3 years ago)
The Aaron
Roll20 Production Team
API Scripter

I just tested, and I see that error also, but it's just in the console output, it's not killing the sandbox for me.  Is that the same behavior you see?


April 05 (3 years ago)
DM
Pro

I have just pushed a hot fix which I believe will solve this issue. It should be live in a few minutes, please let me know if the issue persists here. I will be monitoring this topic. Sorry for the inconvenience this may have caused on your gaming tables.

That's amazing. Thank you to everybody for your inputs and to Miguel for reacting so promptly with the hot fix.

I can confirm that this has fixed the issue.

I apologise for not responding earlier but I'm only in a position to log on in the evenings. I should have been clearer earlier but in answer to The Aaron's questions and for future reference:

  • Yes. I was using the Roll20 D&D 5E character sheet
  • No. Aside from the error in the log it wasn't crashing the sandbox or affecting the running of the scripts.

My initial thoughts were that it must have been an error in my part in the script that I was writing as I'm new to JavaScript.


Thanks again. It is great to see that Roll20 has such a strong community.