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] Frequent Script Dropouts

1443357678
Scaby79
Sheet Author
API Scripter
Hi folks, I have a general question about the behavior of API-scripts. I'm using them for a while now and since I began to use more than one or two at a time I observed that now and then I had to restart the sandbox because the scripts were not working anymore even if there was no error message in the API output console. I thought that was a normal thing to do because of the experimental state of the API and got used to it. Lately I realized that this phenomenon is happening more often and as I just installed the bump script from Aaron the script stops working ANYTIME I move a token on the object layer. I observed something similar before. The DungeonDoors script from Stephen stopped working in the past any time I moved a token on the object layer if that token has not set up any values in the first token bar (the green one). So as I'm a little confused now and don't have any insights in java or the API myself I just wanted to know if this a normal behavior when you have many scripts running at the same time and if you have to get used to it, as I thought until now,  OR do I have to look for a broken script (among all the many ones running currently) that maybe causes this dropouts. I hope to hear/read about your experiences with the API. Many thanks in advance! 
This is something I used to encounter ALOT of. Then suddenly after the new Roll20 Rolleout. I never really experienced this again! I don't know why either to be honest. I tried asking and relating this bug but I mostly got silence.
1443376942
Scaby79
Sheet Author
API Scripter
I see! Thank you for your reply!
1443390039
The Aaron
Pro
API Scripter
If you want to PM me an invite and GM me, I can jump in and figure out what the issue is. 
I too am experiencing this issue and am receive very little to no information on the error. When reset the scripts work flawlessly until I reopen my game, then I'll need to re-save the scripts to fix whatever issue it is having. However I did receive a unique message the last time the api crashed (couple minutes ago). This was the message (The error fixed itself when the scripts were reloaded but I feel like this is a temporary solution): ERROR: Please use the 'thumb' size for imgsrc properties
1443525076
The Aaron
Pro
API Scripter
That error message has to do with creating objects with the API and is a fixable error. What scripts are you running?
RandomToken by Rino, here is the link .
1443564754
The Aaron
Pro
API Scripter
Ok.  Are you creating your Rollable Tables with images from your User Library, or from your Market Place library?  The API is only capable of creating images from the User Library, so if you want to use images you have purchased, you must download them and then upload them to your User Library to access them via the API.  This is a limitation that Riley has said he plans to address in the Power User update, which should be the next big thing they work on.
Thanks for the fix, I now can continue to spam out kobolds once more!
I restart my API serveral times during a game. I have no idea what makes it crash though. 
1443578638
The Aaron
Pro
API Scripter
Do you get any error messages when it happens, or just an empty box?
1443581488

Edited 1443581600
Ravenknight
KS Backer
The Aaron said: Do you get any error messages when it happens, or just an empty box? Hi Aaron. No error messages of any kind. It helps to spin up a new sandbox though so I just keep the api-tab open at all times. :) Never found out what is causing it. I do suspect it's due to the group being located in europe.
1443581856
The Aaron
Pro
API Scripter
Does the API just become unresponsive? Are you using the Blood and Honor script?  I found a bug that causes that to happen (specifically when you move a token that doesn't have numbers in the bars) and pushed a patch to the repo to fix Blood and Honor. 
1443583109
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Sometimes scripts might work by themselves, but when they run with other scripts present, they may fail due to unchecked syntax errors. I would highly recommend running any scripts you use through Google Closure compiler to make sure there are no hidden syntax errors that could cause compatibility issues.&nbsp; <a href="https://closure-compiler.appspot.com/home" rel="nofollow">https://closure-compiler.appspot.com/home</a>
I am using Blood and Honor! Perhaps that is the issue? Time to find that patch!&nbsp; And Stephen, that is a good advice - Being bad at coding is a flaw at my part. :) But I try to learn. Thanks a lot guys. I will tell you how it worked out.
1443612614
The Aaron
Pro
API Scripter
The repo has my patched version now: &nbsp; <a href="https://github.com/Roll20/roll20-api-scripts/blob/" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/blob/</a>... I also removed the dependency on isGM() and cleaned up the old fixedCreateObj() we used to have to use.
It seems to work. :) Thanks a lot. Is there a way to see when a script has been updated that I should know? I don't scan the repo as much as I should apperantly.
1443635307
The Aaron
Pro
API Scripter
Not currently, but I've got some ideas...
I am having a similar issue. &nbsp;The error I get when first launching my game is: Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again. More info... For reference, the error message generated was: But there is nothing there. I use:&nbsp;GroupInitiative, TurnMarker, TokenNameNumber, StatustRacker, 5e-shaped-scripts. If I leave the game and go to the API and force a restart they all load up, I can then go back to my game and they all seem to work (although I am having trouble getting TokenNameNumber to work presently and StatusTracker doesn't have a log message.) Restarting sandbox due to script changes... Spinning up new sandbox... "-=&gt; GroupInitiative v0.9.12 &lt;=- [Tue Oct 13 2015 08:17:50 GMT-0500 (CDT)]" "-=&gt; TurnMarker v1.3.1 &lt;=- [Tue Oct 13 2015 08:17:46 GMT-0500 (CDT)]" "-=&gt; TokenNameNumber v0.5.4 &lt;=- [Tue Sep 22 2015 17:04:58 GMT-0500 (CDT)]" "Shaped Scripts ready" I go back to my game directly and things work ok, till next time. &nbsp;I go through this every session now. Shaped Scripts seems to act like it has a memory leak, each time I create a new creature it gets slower and slower. I leave the game and re-enter and it works, starts over. But it is such a wonderful script I put up with it.
1445606900
The Aaron
Pro
API Scripter
I think there are two things going on for you, both known issues outside the control of the API scripts: 1) &nbsp;There is a bug with the API sandbox right now that causes it to shutdown between sessions. &nbsp;It has taken several forms, but the current most common one is a crash with no callstack, as you've posted above: It could also be a message with the marker EADDRINUSE and a calls tack in events.js, or something similar to " Unexpected Token s " with no callstack. &nbsp;Unfortunately, there's nothing in the API scripts that can fix that and it must be addressed by the Devs. 2) &nbsp;There is a known issue with large amounts of text in opened journals/characters/tokens. &nbsp;I've not looked into this much, but there is a correlation between having large amounts of text in a Notes field of something you've opened in the in-game UI. &nbsp;Monster import scripts rely on pasting large blocks of text into these note areas, possibly many times during preparation, and this seems to be related to a slow down in the VTT. &nbsp;Refreshing usually clears up the problem, but if it doesn't, it may be reasonable to start a Bug ticket.