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

API unresponsive - runnerOK is not defined

The API is acting up again. First we hit major lag and now we can't even restart the Sandbox without receiving the following error: To call this annoying is an understatement. No scripts have been altered or added in any way afaik.
I didn't experience this error, but API and overall performance was brutal last night. Had to restart the API every 2-5 minutes and everything was extremely slow.
When playing I now always run a modified version of the API heart beat script that logs a line to the API console every 30 seconds. Those log statements are as steady as can be, and at the same time the game experiences lag for some or all of the players. I am adding debug statements to more and more scripts and it looks like the culprit is internet and/or some of the cloud components of roll20 (like firebase).
With regards to Ravenknight's error log. The scripts you selected are concatenated in the order of the tabs in the API settings page. As the error  happens on line 39200, my guess is that you run a lot of scripts. I would disable all scripts and then enable them one by one until this error re-occurs: that's the script that's the culprit.
Martijn S. said: With regards to Ravenknight's error log. The scripts you selected are concatenated in the order of the tabs in the API settings page. As the error  happens on line 39200, my guess is that you run a lot of scripts. I would disable all scripts and then enable them one by one until this error re-occurs: that's the script that's the culprit. Thanks for the input but the API restarted after one hour or so and now it works, kinda, still laggy but it works.
Ok, I made a new copy of the game and cleared out some unused characters and now it seems to work fine again. Perhaps the campaign was broken in one way or another. :/ I'm confused.
Same error, new campaign. One week later. This isn't good people.
Adding some clarity. I'm a player in Ravenknight's campaign and this error occurs not when a particular script is used but on seemingly random occasions. For example, A macro that has been used flawlessly on multiple occasions during an evening suddenly produces this error. Even after restarting the API several times it still occurs and only after some time has passed (sometimes minutes, sometimes hours) does the restart remove the problem. It's not linked to a particular token in the game, or a particular macro, or a player. It doesn't seem linked to a particular script, nor does it happen during controlled testing. Ravenknight's copied the campaign and cleansed it from unused information in order to ease the burden for the server, but that didn't fix the issue. The only similarity between the crashes, is that they happen when a macro is used. It's a fairly rare occurrence as it only happens a few times per game night, but it completely breaks the game as well as the mood for players and GM alike.  Please advice. 
A good way to truly test is to disable scripts one at a time and see if the error stops. Another would be to search through each script for the term "runnerOK".
Not related to any one script as far as I can tell. ( Disabling them all was a pain in the b... though ) and at the moment. Everything works again, the instability drives me mad.
1604876757

Edited 1604876826
Oosh
Sheet Author
API Scripter
Have you searched through the code for "runnerOK" as Rabulias suggested? I'd say that will be much faster than enabling them one by one and waiting hours to see if the crashes come back. API wizards - is there any way to grab the concatenated .js after the API compiles it so you can go straight to the line in question? I'm guessing not, or someone would have suggested it....
1604890054
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You can so it for all manually installed scripts by Using The Aaron's bookmarklet here , but I don't think that works for One-Clicks.Still it's a good place to start.
keithcurtis said: You can so it for all manually installed scripts by Using The Aaron's bookmarklet here , but I don't think that works for One-Clicks.Still it's a good place to start. Yep, you're correct. Not working with one-clicks. Blargh. Good idea though. :)
1604949048

Edited 1604949178
What about the Airbag script? <a href="https://app.roll20.net/forum/post/7289686/script-airbag-api-crash-handler" rel="nofollow">https://app.roll20.net/forum/post/7289686/script-airbag-api-crash-handler</a> Though you would have to uninstall and reinstall all your scripts, so maybe not ideal...
1604962435
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The Aaron's Bookmarklet will give you a hunk of text you can search through for "runnerOk" To search one clicks, you can run the same search on the github repository. Actually, I just ran it, so it isn't likely to be a Oneclick. Did you check the text dump created by the Aaron's bookmarklet?
So far I've found no mentioning of runnerOK in any of the scripts I'm using. The search continues.
1605200476

Edited 1605200651
Ravenknight
KS Backer
So far nothing. I was hoping for an answer from Roll20 but we seem to be alone in reporting this problem so I guess it has low priority. Hopefully the platform will work better the upcoming weekend then the last three.
Which scripts are you using?
1605246061
Oosh
Sheet Author
API Scripter
Did you use the bookmarklet above to concat all the non-One-Click scripts into a big ole lump?
Oosh said: Did you use the bookmarklet above to concat all the non-One-Click scripts into a big ole lump? Yep, all of the non script-library ones. So far, no luck, but on the other hand the API has worked during testing all week. It only seems to crumble during game time. Rabulias said: Which scripts are you using? Haha, far too many. Perhaps that is the issue, but it didn't matter in the past.
Ravenknight said: Rabulias said: Which scripts are you using? Haha, far too many. Perhaps that is the issue, but it didn't matter in the past. No, the number of scripts should not matter; I know The Aaron runs tons. Maybe post a screenshot of the API screen showing the tabs with the script names. I asked because I wanted to try replicating the same combo of scripts.
1605594223

Edited 1605618726
Ravenknight
KS Backer
Rabulias said: Ravenknight said: Rabulias said: Which scripts are you using? Haha, far too many. Perhaps that is the issue, but it didn't matter in the past. No, the number of scripts should not matter; I know The Aaron runs tons. Maybe post a screenshot of the API screen showing the tabs with the script names. I asked because I wanted to try replicating the same combo of scripts. That's very nice of you and well, here is my current script list. No need to make any work on my part though since this has been the last straw. The last month has been a lesson in frustration for me and my players and we will probably make the move to Foundry as soon as the campaign permits. Installed Scripts: 5e OGL Bloodspatter Calender CangeTokenImage Carry Tokens Cashmaster (0.9.1) Character Sheet Utils ChatSetAttr Check it Out Delay EasyExperience HTML Builder Healthcolors It's a Trap It's a Trap - D&amp;D 5E Generic Maplock Mapteleporters Marching Order MarkdownDocumentation MarkdownNotesBio MatrixMath Matt's Doorscript (The Aaron's edit) Message of the Day MonsterHitDice One-Way Dynamic Lightning Path Math Powercards Recursive Tables Roll20 Audio Master Roof Control Snippet to change color of tiles when stepped on (The Aaron) Snippet to keep small tokens centered (The Aaron) SpinTokens StateBrowser TableExport. Token Collisions Token Fate TokenCondition TokenMod TokenNameNumber Tongues Torch Vector Math WaypointPatrol WorldMapDiscovery libTokenMarkers splitArgs