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 w/API Crash Due to Roll20-Side Error?

Whenever I leave my game for any length of time, I return to find my scripts disabled due to the following error: As you can see, the error doesn't reference any of my scripts, so I'm at a loss as to how to track down the problem.   It appears to happen after the sandbox has been idle for some time; perhaps it's related to the automatic sandbox shutdown for campaign inactivity?  In any event, the problem prevents the API from automatically spooling back up when players log in---I have to go in and restart it manually. Any guidance would be greatly appreciated!
1586747862
The Aaron
Roll20 Production Team
API Scripter
In the past when I've seen emitOne in the callstack of a crash, it was a Sheet Worker for a Character Sheet.  The Sheet Worker for the configured sheet is executed in the API sandbox along with the API scripts.  Usually, it's well isolated to where even if it has an issue, it doesn't cause a crash.  What Character Sheet are you using?
One I built myself, actually :)  Could I pin the error down by looking for something in my browser console, if it's a sheetworker thing?
1586810888
The Aaron
Roll20 Production Team
API Scripter
I'd start by disabling your character sheet and see if you still get the error.  After confirming that's the issue, look for where you are trying to access the property "body".  There's something strange about the way scopes are handled in character sheet script workers.  I haven't had a chance to investigate it, but you might be able to fix it by wrapping your entire script worker in a closure to enforce a known scope.