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] AARGH! Api keeps hanging on spinup!

As title says!  I'm a little freaked out! I was working on an issue with CashMaster v 9.1.0 throwing an error every time I issued a Combat Master command by modifying the Cashmaster.js script. After updating, the API sandbox hung up about two thirds of the way through.  I restored Cashmaster to the original script, but it is still hanging at the same spot. I have even gone through and disabled every script one at a time to try to find the culprit, but it still hangs up every time about halfway through spin up. I have spent a GREAT deal of time setting up my customizable APIs and REALLY do not want to have to re-install all of them and go through about 200 hours of setup again. HELP!
The Pingdom Public Report states the DEV server is experiencing disruption of service (.14% downtime) as of one hour ago... Hopefully it is a temporary thing and will come back overnight. I will wait until tomorrow to really panic.
1605879760
timmaugh
Pro
API Scripter
Typically, if a script is going to break the sandbox, you get the pink error message. When the sandbox reboot hangs, you can pop over to the main Script page and just hit the "Restart Sandbox" button. If that still doesn't work, you can refresh your client (the player browser), and then the Script page, and then restart it again. If it's still having trouble at that point, it's most likely R20 issues. My experience, anyway.
Ok, call me an alarmist.  I get jumpy at 12am after four solid hours of API setup. So the sandbox was not hanging. It just finished way sooner than I thought, and never gave me the chat ping "Search Index Complete," which rang alarm bells in my lizard brain. It also did not go through the normal "<##> seconds..." count that it normally does. But as far as I can tell, my APIs are working as they should. And my fix to CashMaster v0.9.1 worked. I am in the process of checking the scripts one by one. Hopefully they are all there and firing...
1605889400
The Aaron
Roll20 Production Team
API Scripter
Those messages come from the Search API script.  It sounds like you might have disabled it, so you don't get those notices. (and it starts up faster)
Of course!!! I did remove it, since I never use it and I was cleaning out my script library of unused scripts!  It was nice to have that ping to let me know when all scripts were spun up, but the time saved seems very worth doing without it. I guess I should admit I am a bit of a crisis junkie. Mortal nemesis to you blessed scripters. Many thanks, Aaron.
1605896249
timmaugh
Pro
API Scripter
If none of your scripts give you a read out of when the sandbox is up and ready, you could just drop this into a new script tab, or at the bottom (ie, past the last line of text) of an existing script: on('ready', () => { log(`============= w00t, we're up and running! =============`); }); Your specific message may vary. ;-)
1605896478

Edited 1605896738
The Aaron
Roll20 Production Team
API Scripter
Here ya go: on('ready', ()=>{ const checkStyle = `font-size: 0.8em; line-height: 1em; background-color: rgba(255,0,0,.2);color: red;font-weight: bold;border-bottom: 2px solid red;border-top: 4px solid red;font-variant: small-caps;left: -5em;position: relative;padding: 0 5em;width: 100%;right: 6em;`; sendChat('',`/w gm <div style="${checkStyle}">API is Running.</div>`); setTimeout(()=>log("==> API is Running: Scripts started. <=="),0); }); (Added a log message, thanks Tim!)
<<sips tea>> Ahhhhh!  So tasty! (I took the liberty of changing the color to blue for aesthetic purposes) Aaron and TimMaugh, you are quickly earning a seat in my pantheon of gods.
1605900639
The Aaron
Roll20 Production Team
API Scripter
Hahahahaha! =D I bet it looks pretty good in blue.  
1605902951

Edited 1605902964
1605904178
timmaugh
Pro
API Scripter
Sweet! *does a pantheon dance* ...btw, Aaron, I like the use of setTimeout(), there. Then it doesn't have to be absolute last thing in the script library to be "accurate." Little tricks... little tricks. =D
1605906761
The Aaron
Roll20 Production Team
API Scripter
Steal my secrets. =D