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 settings and configurations not saving on sandbox restart

As of this afternoon games that have been longstanding running API have stopped saving any settings and configurations I apply to them after a restart. Some examples of this include new spells added to Combat Master manually and automatically, GroupInitiative losing and prompting for Sheet configuration in a brand new game with no other API, and Groupcheck prompting for sheet configuration. It may be something simple but I'm at a loss trying to create & configure a new game when everything resets to default on every API restart. Please help!
1680226917
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Merit! Have you added any new scripts recently? Or updated browser/OS or antivirus extensions?
1680228733

Edited 1680228808
keithcurtis said: Hi Merit! Have you added any new scripts recently? Or updated browser/OS or antivirus extensions? Nosir. I've also just confirmed with two other DMs that they are experiencing the same issues, one of them even also made a new game and attempted some config. They could not get either GroupCheck or GroupInitiative APIs to preserve settings and options. Seems to be a roll20 issue, have they changed any configurations lately? It may not be on my end after all......  Perhaps others here could check as well.
1680267360
timmaugh
Pro
API Scripter
I ran into a situation a few weeks back where I was unable to commit changes to the state. For me it was because my state had grown too large (it is limited in size... with enough size that in a typical game you should not bump up against it). It does seem strange that it would affect multiple GMs across multiple games... but that could point to a change on the backend that lowered the allowed size of the state... or which made it easier/quicker to hit the limit. Aaron shared some code with me that helped me pinpoint the problematic script that was bloating my storage. In your case, you might find some help from the same script -- either in the individual way each script reports its space from the state or the overall size of the state. In other words, if you and a few other GMs run this script and your overall size reports out to be the same, we might start to understand if the overall size limit has changed. Or, if you find a particular script causing bloat, we can look at why that's happening. With Aaron's permission, I rolled his code into the ScriptInfo script (it's there in version 0.0.3). That script is currently in my repo and in the pipeline to be merged into the one-click next week. Once you have version 0.0.3 of the script, you can run: !stateinfo ...and get a report of your state object: At the bottom you will see a TOTAL output: Share what you find and we might be able to zero-in on the cause.
Morning Mr. Tim! In an attempt to troubleshoot I created a new sandbox and added only Combat Master & GroupInitiative. I am still unable to save the config for either API in the new sandbox. Here are the Scriptinfo results on the new sandbox:
1680268740

Edited 1680268776
And here are the results in the game I was origianlly having issues in: It's very strange that it's happening across multiple games and multiple users; I'm beginning to think it may not be a me issue. 
1680271201
timmaugh
Pro
API Scripter
Yeah, those sizes don't look too out-of-norm. I think (but don't know for sure -- maybe someone else knows better) that the state is limited to somewhere in the 2.5 - 3.0Mb range... and you're nowhere near that, relatively speaking. I would open a support ticket with the Help Center and bring the problem to their attention. And then, if you get a resolution, share it so others can test and see if their state's are working again, too.
1680272264

Edited 1680272303
timmaugh said: Yeah, those sizes don't look too out-of-norm. I think (but don't know for sure -- maybe someone else knows better) that the state is limited to somewhere in the 2.5 - 3.0Mb range... and you're nowhere near that, relatively speaking. I would open a support ticket with the Help Center and bring the problem to their attention. And then, if you get a resolution, share it so others can test and see if their state's are working again, too. I've been running the big game now a while with no issues; very strange that it happened no changes no errors and it persistent across the board.  Just out of curiosity are your changes to the state being saved? In any/all of your games? I'm even more confused as to how two other players have this issue, I watched one via Discord,  yet its not being flagged as a larger issue.  I submitted a ticket last night, unsure what the response time may be. Must admit I'm a bit heartbroken at being unable to configure a new sandbox to run scripts; if I can't even configure them to the character sheets I use then I'm truly SOL. 
keithcurtis said: Hi Merit! Have you added any new scripts recently? Or updated browser/OS or antivirus extensions? Hey Mr Keith perhaps you could help with ny curiosity too; are your api changes saving properly upon restart? I'm about half convinced everyone is having this issue at the moment. 
1680276160
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Merit said: keithcurtis said: Hi Merit! Have you added any new scripts recently? Or updated browser/OS or antivirus extensions? Hey Mr Keith perhaps you could help with ny curiosity too; are your api changes saving properly upon restart? I'm about half convinced everyone is having this issue at the moment.  Sure thing!  Just ran a quick test by adding Supernotes to a brand new game. Supernotes will ask you to set a favored sheet for roll templates and store it in the state object. Upon first run, the config box came up and I selected a sheet. Then I reloaded the game. It did not ask me to do the config step again, and the choice was indeed saved to state. I repeated this test in the same game with group-initiative. It also successfully saved the config across a restart. So it's functioning as normal over here. But it's obvious that you are running into an issue. It's especially intriguing since it appears to be happening for you even in brand new games. I wouldn't think this was a case of a thing like a VPN or ad blocker, or you would likely be seeing some other issues. Are you using any browser extensions that modify the behavior of Roll20, such as Beyond20 or VTTES?  In any case, I would suggest writing up detailed repro steps, performing them and capturing a  Console Log ( Chrome , Firefox ), then using that to file a  Help Center Request . This might require a dev to investigate properly.
1680280696
timmaugh
Pro
API Scripter
Merit said: Just out of curiosity are your changes to the state being saved? In any/all of your games? I'm even more confused as to how two other players have this issue, I watched one via Discord,  yet its not being flagged as a larger issue.  My changes are being saved. I followed a similar path to what Keith described. I already had Supernotes installed, so I removed it, deleted my Supernotes state key, and then reinstalled Supernotes and chose a new template. The setting *is* being preserved.
Just wanted to chime in that I am having a similar issue with Group Check. I am selecting my preferred sheet check list from the menu (5E-OGL) and a few minutes later the preference is forgotten and I have a new message in the chat prompting me to make a selection again.
timmaugh said: Yeah, those sizes don't look too out-of-norm. I think (but don't know for sure -- maybe someone else knows better) that the state is limited to somewhere in the 2.5 - 3.0Mb range... and you're nowhere near that, relatively speaking. If the state is stored in firebase (like most everything else) as a document or field, then the maximums for firebase would apply: 1,048,487 bytes <a href="https://firebase.google.com/docs/firestore/quotas" rel="nofollow">https://firebase.google.com/docs/firestore/quotas</a>
Sam B. said: Just wanted to chime in that I am having a similar issue with Group Check. I am selecting my preferred sheet check list from the menu (5E-OGL) and a few minutes later the preference is forgotten and I have a new message in the chat prompting me to make a selection again. My exact issue, and the same issue 2 others were having.&nbsp;
timmaugh said: Merit said: Just out of curiosity are your changes to the state being saved? In any/all of your games? I'm even more confused as to how two other players have this issue, I watched one via Discord,&nbsp; yet its not being flagged as a larger issue.&nbsp; My changes are being saved. I followed a similar path to what Keith described. I already had Supernotes installed, so I removed it, deleted my Supernotes state key, and then reinstalled Supernotes and chose a new template. The setting *is* being preserved. I just created a new sandbox &amp; added Supernotes. I get a new configuration prompt when I hit the Restart API sandbox every time; I cannot reproduce your success.&nbsp; Will check console logs next...
So the console logs are...scary? The top is from the game page console, when I refresh or reload the page. The bottom is from the API console page. This mean anything or help in any way?
1680283940
timmaugh
Pro
API Scripter
Martijn S. said: timmaugh said: Yeah, those sizes don't look too out-of-norm. I think (but don't know for sure -- maybe someone else knows better) that the state is limited to somewhere in the 2.5 - 3.0Mb range... and you're nowhere near that, relatively speaking. If the state is stored in firebase (like most everything else) as a document or field, then the maximums for firebase would apply: 1,048,487 bytes <a href="https://firebase.google.com/docs/firestore/quotas" rel="nofollow">https://firebase.google.com/docs/firestore/quotas</a> Interesting... I found a screenshot of the size my state was reporting when it bumped into the "edge" and wasn't allowing me to save anything. It showed the total size as 2048-ish kb. I wonder if they are serializing it over two fields?
timmaugh said: Martijn S. said: timmaugh said: Yeah, those sizes don't look too out-of-norm. I think (but don't know for sure -- maybe someone else knows better) that the state is limited to somewhere in the 2.5 - 3.0Mb range... and you're nowhere near that, relatively speaking. If the state is stored in firebase (like most everything else) as a document or field, then the maximums for firebase would apply: 1,048,487 bytes <a href="https://firebase.google.com/docs/firestore/quotas" rel="nofollow">https://firebase.google.com/docs/firestore/quotas</a> Interesting... I found a screenshot of the size my state was reporting when it bumped into the "edge" and wasn't allowing me to save anything. It showed the total size as 2048-ish kb. I wonder if they are serializing it over two fields? So all I know is what I've learned from you, Keith, Aaron, Vic,&nbsp; Nick O and his videos, and the other wizards in the forums and that's no exception today... thanks again everyone.&nbsp; You guys used the term firebase - does this error mean I'm not connecting properly to where the api settings are stored?&nbsp;
Only a roll20 dev can tell us what the exact amount is, as i have not knowledge of the inner workings.
1680296405

Edited 1680296614
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
FWIW, I logged into the test game I had created, after some time had passed. Supernotes state was still good, but it did ask me to re-config GroupInit. After that, it seems to have fixed itself; I cannot further reproduce the error. I have reported to devs, but I urge anyone who can do this consistently to send a&nbsp; Console Log ( Chrome , Firefox ) to a&nbsp; Help Center Request &nbsp;to get more dev eyes on this.
keithcurtis said: FWIW, I logged into the test game I had created, after some time had passed. Supernotes state was still good, but it did ask me to re-config GroupInit. After that, it seems to have fixed itself; I cannot further reproduce the error. I have reported to devs, but I urge anyone who can do this consistently to send a&nbsp; Console Log ( Chrome , Firefox ) to a&nbsp; Help Center Request &nbsp;to get more dev eyes on this. Thank you!
1680304842
The Aaron
Roll20 Production Team
API Scripter
Martijn S. said: timmaugh said: Yeah, those sizes don't look too out-of-norm. I think (but don't know for sure -- maybe someone else knows better) that the state is limited to somewhere in the 2.5 - 3.0Mb range... and you're nowhere near that, relatively speaking. If the state is stored in firebase (like most everything else) as a document or field, then the maximums for firebase would apply: 1,048,487 bytes <a href="https://firebase.google.com/docs/firestore/quotas" rel="nofollow">https://firebase.google.com/docs/firestore/quotas</a> I think Riley told me it was 2Mb for state.&nbsp; It's stored in Postgresql.&nbsp; Storage happens periodically (I want to say once a minute, but it might be more often than that).&nbsp; The format is just JSON.stringify() on the state object.&nbsp; I think I have a script that stores bytes in state and reports the size, then does a binary search for the max size on subsequent restarts, if we're really curious... =D
The Aaron said: Martijn S. said: timmaugh said: Yeah, those sizes don't look too out-of-norm. I think (but don't know for sure -- maybe someone else knows better) that the state is limited to somewhere in the 2.5 - 3.0Mb range... and you're nowhere near that, relatively speaking. If the state is stored in firebase (like most everything else) as a document or field, then the maximums for firebase would apply: 1,048,487 bytes <a href="https://firebase.google.com/docs/firestore/quotas" rel="nofollow">https://firebase.google.com/docs/firestore/quotas</a> I think Riley told me it was 2Mb for state.&nbsp; It's stored in Postgresql.&nbsp; Storage happens periodically (I want to say once a minute, but it might be more often than that).&nbsp; The format is just JSON.stringify() on the state object.&nbsp; I think I have a script that stores bytes in state and reports the size, then does a binary search for the max size on subsequent restarts, if we're really curious... =D Is that storage across all games per user, or per game?&nbsp;
Current score is 10 players with the errors, one without. I don't like this game.&nbsp;
Hey folks, we've identified a problem with saving API state and resolved it as of Today (April 3), 12:20pm Eastern Time. Thank you very much for the reports and apologies for the interruptions to your games and prep.
Jeff L. said: Hey folks, we've identified a problem with saving API state and resolved it as of Today (April 3), 12:20pm Eastern Time. Thank you very much for the reports and apologies for the interruptions to your games and prep. It is not resloved on my end; Console logs still contain errors.
1680543744

Edited 1680543795
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Merit said: Jeff L. said: Hey folks, we've identified a problem with saving API state and resolved it as of Today (April 3), 12:20pm Eastern Time. Thank you very much for the reports and apologies for the interruptions to your games and prep. It is not resloved on my end; Console logs still contain errors. You might need to delete cookies and cache. Also, are the configs still not sticking, or are you just seeing console log errors? NVM, I read your response in a different thread.
1680550959
The Aaron
Roll20 Production Team
API Scripter
Merit said: Is that storage across all games per user, or per game?&nbsp; That's the state object per game.
1680559473

Edited 1680559666
Just now created a new game, added the GroupCheck API script, launched the game and setup the script.&nbsp; Rolled random dice for more than 2 minutes. Exited the game, then restarted the API Sandbox.&nbsp; The saved GroupCheck state was _NOT_ restored.&nbsp; Note the API Console even states as much: "Roll20 Environment: Web" Restarting sandbox by user request... detected currently running sandbox... restarting "Loading character sheet data..." "Starting webworker script..." "Loading 1094 translation strings to worker..." "Starting webworker script..." "Loading 1094 translation strings to worker..." "Starting webworker script..." "Loading 1094 translation strings to worker..." "-=&gt; GroupCheck initialized with default settings!&lt;=-" "-=&gt; GroupCheck v1.12 &lt;=-" "%cRoll20 Kingmaker Module log| kScaffold Loaded" "Roll20 Environment: Web" So why is it still initializing GroupCheck with default settings if this api thing has been fixed?&nbsp; Doesn't look fixed on my end, either. Yes, I launched the game again and GroupCheck asked me to yet again to set it up.
i just saw this post, it's happening to me as well. I thought it was calendar but now I am seeing multiple api breaking and resetting.
Was this ever fixed? Im having the same issue.
in the bug forum, 14 hours ago, they claimed it was fix. however it is not.&nbsp;
I just checked in one of my games and the state is not saved Test: change a setting that should be saved in the state, wait 5 minutes, restart. Old settings are in the menu.
bumping - still an ongoing issue
Sorry folks, we resolved an issue, but that didn't completely restore persisting and recovering state from our backend. The issue should now be fully resolved, so you should be able to save state and load it from before this issue was occurring.&nbsp; My basic tests appear to be working now, I would very much appreciate if you could report back if it's confirmed working for you.
Seems to work for me. Thanks!
1680639871

Edited 1680639880
Seems to also be working fine now with a quick check on Calendar and group initiative not resetting.&nbsp; Thanks!
Agreed, working fine on my games, too, now. Thanks for fixing!
Works for me as well. Thanks a lot for addressing this!
Jeff L. said: Sorry folks, we resolved an issue, but that didn't completely restore persisting and recovering state from our backend. The issue should now be fully resolved, so you should be able to save state and load it from before this issue was occurring.&nbsp; My basic tests appear to be working now, I would very much appreciate if you could report back if it's confirmed working for you. I'm having great results! Looks like the issue has been resolved; thank you greatly for addressing this.&nbsp; Thanks Jeff!