WebCore Cannot View/PAUSE Piston: State cannot be greater than 100000.0 characters


#1

I have a piston that when I click on it, the WebCore logo below just spins and spins. I have logged off, logged back on, used a different browser, and rebuilt the data cache on the mobile client. Nothing else works, anyone else having this issue or have a solution?


#2

Working here


#3

@ady624 Now I get this WebCore piston error message? I cannot VIEW or PAUSE it either… seems to be broke and no way to delete, edit start over… who do I contact to resolve?


#4

Check your logs at ide.smartthings.com please; something is not loading properly and that may show a helpful error message each time you try to access this piston. This is the first report I can recall of a single piston causing problems, there is an update coming today that fixes a dashboard loading issue that affected a few people, but it probably would not address this.


#6

Actually I do remember a case like this. The piston had a list variable that was accidentally filled with a few thousand entries and it overflowed the storage allowed for a piston. In that case, the ST error logs showed physicalgraph.exception.StateCharacterLimitExceededException: State cannot be greater than 100000.0 characters. If that does turn out to be the problem, it was an easy fix once we determined the name of the runaway variable.


#7

@ipaterson Thank you. That is EXACTLY the case. I have a runaway FOR NEXT statement that sets a PISTON STATE title and it has exceeded 100,000 characters. Here is the error line in the webCoRe that showed up in the IDE. Please advise as to steps to fix for the future.

For now, I have forcefully uninstalled this piston in the Installed SmartApps view and I can hopefully recreate it.

> 2490ad82-3758-474b-ba57-fbf8888840bc 7:59:36 PM: error physicalgraph.exception.StateCharacterLimitExceededException: State cannot be greater than 100000.0 characters @line 1057 (api_intf_dashboard_piston_get)


#8

Thanks @jkp for the response. I tried to duplicate this piston as you suggested, but because it causes WebCoRe smartApp to crash when it tries to get the data for variables, the resultant created piston is blank. :cry:


#9

Can you try making a copy with “Create piston using a backup code” rather than “Create duplicate piston” if you have a copy of the private backup bin code? PM me if this was a complex piston and you need to retrieve that code.

For anyone else with this issue, it looks like it would require some coding to delete the state since the state is not something that can be set from the web browser. Clearing logs and other variables might be enough to get back under the state limit, though.


#10

Thanks @ipaterson for the response. :cry: Unfortunately, I do not have the backup code for this piston, but it is not so overly complex that I cannot recreate manually.

I wish that I could recreate this piston from the “WebCore backup pistons” function since I routinely do this. But WebCore seems to not have the function to restore these full piston backups as of currently. Keeping track of all the backup codes is something that I need to be better at just in case I experience this error again.

I’m guessing that the WebCore SmartApp cannot employ a try{}catch{} trap on this specific statement @line 1057 so that when it encounters this 100,000 character limitation, it would skip that variable’s data or all variables so that the affected piston can be VIEWED or PAUSED.

Again thanks for your response, it helped me identify the issue and I force deleted the piston from the “Installed SmartApps View” in the IDE.


#11

For future reference the private backup bin code is available on that Installed Smart Apps page at ide.smartthings.com > My Locations > smartapps. Each piston where backup is enabled will show a “bin” value at the top of the settings popup.

Good suggestion, I’ll take a look at whether it is possible to fail more gracefully in this case, hopefully a portion of the data can still be retrieved.


#12

I have a (now deprecated) piston that does this too. But it doesn’t have the state length problem. I just can’t delete or view it.


#13

if you looking for enhancements for helping the WebCoRe community when they need to restore a damaged or deleted piston, I would love to have access to a tabular view of the all the pistons and their respective backup bin codes. One could screen shot it, or download the view to an XLS/CSV format and have these available in an emergency!


#14

I would log off, close down your browser, clear cache, and re-try. This might be something browser related. But as a last resort in my situation, I had to use the Installed SmartApps View in the ST IDE (My Locations Tab) to force a deletion of the damaged piston. Your Installed SmartApps list would be the highlighted link on the far right side of the page that is displayed.

After the list of your Installed SmartApps are displayed, select EDIT at top of page and scroll down to find the name SmartApp/Piston that you need to force delete. Warning: this action is not reversible, so be sure to select the correct SmartApp or Piston.


#15

That’s a good idea. I don’t think it should be done in webCoRE though since the times you would need it webCoRE may not be working anyway, but this would work well as a browser extension or userscript that adds the info to that Installed Smart Apps page in the ST IDE. That page loads the data for each piston on mouseover, so it would probably be possible to at least hook into that existing behavior to add the bin code beside the piston name on mouseover for screenshotting. I will not have time for this, but perhaps someone else will consider making a greasemonkey/tampermonkey user script that augments the ST IDE a bit for webCoRE.

Also to be clear, deleting a piston that way does not delete the backup code so it is still possible for me or Ady to look up the backup code for you. The data is encrypted so I can’t do anything with it or pinpoint which backup code corresponds to that piston, but with the list of codes you can figure out which belonged to that piston and your dashboard login and hub info will allow it to be restored.


#16

Thanks for that info. It doesn’t work, however. Clicking uninstall on the offending piston gives me a spinning activity symbol for less than 2 seconds and the piston remains.

Otherwise, I’ve tried everything I can with the browser. Clearing caches, different browsers, etc. Fortunately it’s not doing any harm, since it’s already paused and out of the way. Just annoying for perfectionists.


#17

Gentleman, I’m having the same problem as above (physicalgraph.exception.StateCharacterLimitExceededException: State cannot be greater than 100000.0 characters) however I think my particular issue is I’ve set too many variables and the last 10 I set were the straw the broke the camels back. The reason I believe this is the case is because when clicking the error in the log it highlights my webcore instance name instead of a particular piston. And since the global variables are not tied to a specific Piston, I cannot delete a “runaway” piston. I’ve tried the following:

  1. Clean up and rebuild data cache
  2. Disable all pistons
  3. Logging out and logging in
  4. Trying to access the Dashboard from a mobile browser.
  5. Praying to the Web-core gods
    All were unsuccessful.

Q1. Is there any way to delete variables when you do not have access to the Piston edit screen where all the variables are located?

Thank you!


#19

Thanks for you reply. I’m still able to delete pistons but there isn’t a specific Piston that’s causing the issue so hopefully someone will know how to delete Global variables when you are unable to access the piston edit screen and the webcore web interface.


#20

Strange, I have a piston with over 80 variables in it, and it has been working like a champ for over a year…
(I have another piston with a variable array of 140 data points)

I am curious, can you estimate how many globals you had in that piston, and perhaps more importantly, were you writing to global variables more than once during a single execution?


#21

None of my pistons call more than 30 variables. What I’ve set up is whenever I open my front door, walk up stairs, or come down stairs, the corresponding speaker will give me a motivation quote. I have over 100 motivational quotes (as of 2 days ago) all as global variables. In addition, there are probably 100-200 more misc variables that help me keep track of tasker variables, arrival and departure times, etc. I also have 300 devices including probably, 50 virtual switches. The problem started when I added about 10 more motivation quotes at one time. Since then, I’ve had no access to edit any piston and therefore am unable to try deleting the last 10 global variables to see if that resolves the issue.


#22

Unfortunately, I do not know the byte limit for global variables…

I realize this won’t help you now, but for future reference, what I do is:

  • Keep my globals short and sweet
  • Long strings are typically kept in local variables
  • Any piston can execute a piston with the long variables stored

For complete disclosure, I have one static global weighing in at 389 characters, but 99% of my globals are 20 characters or less.

For your project, I would consider storing your quotes in a JSON file, and then pulling today’s quote from that file. This won’t work for variables that are always changing, but it works well as a “database” for mostly-static data storage.