Dashboard Loads, but Pistons Won't


#1

Tonight (adding to other recent issues), I am unable to load or edit any pistons. The dashboard loads fine, and I can click on any of my pistons, but all I get is that darn fidget spinner turning continuously in the bottom right corner of the web page.

I’ve tried the “clean up and rebuild data cache” option as well as a couple of different mobile and desktop browers all to no avail. Is anyone else having trouble?

Edit: It now appears likely that this was related to a platform outage affecting some US users as reported on https://status.smartthings.com/.


#2

I am still experiencing this issue, despite ST resolving the outage. Any ideas on what I need to do so I can load pistons again?


#3

I’m still experiencing this issue, dashboard loads but I can’t view or edit pistons. My pistons appear to be triggering but the web ui gets hung up and “spins” forever. I’ve been waiting to see if an update would be released and help resolve the issue but nothing yet. I’ve tried searching the forums, hard refreshing, logging in/out, clearing my browser cache, trying multiple browsers, SmartApp>settings>Clean Up and Rebuild Data Cache but the problem persists. I’d really like to avoid deleting/uninstalling and reinstalling webcore due to the number of pistons I would have to recreate and start from scratch on. Is anyone else experiencing this or have a solution/suggestions? It all seemed to start when ST had the massive downtown about a week ago.
Thanks for your help.


#4

I don’t have any ideas beyond what you’ve tried already as mine appeared to have been restored on it’s own. Perhaps @ady624 or one of the minions can jump in here to help?


#5

Today I intended to start working on adding some messaging around the places where this spinner pops up to give at least some clue as to what part of the dashboard data is failing to load. I do not have a solution for you yet, but will you be available this week to test the messaging that could help identify the problem?

The core challenge here is that SmartThings blocks the ability for a smart app to know exactly where in the code it threw an exception so we have no way to identify problems like this from the logs. My goal is to tighten up the exception handling so that we can at least get an approximation of where the problem is without going through dozens of layers of trial and error.

If you’re familiar with your web browser’s developer tools it would be helpful to know which network request is failing. In the past this has been related to an error in the load request where the smart app loads up all of your pistons, devices, contacts, etc.


#6

Thanks for the replies. I will be available to help help test, just let me know. I don’t know much about my browser (chrome) Dev tools but I can usually follow instructions well or Google what I need to troubleshoot.


#7

I set up some debugging code in webCoRE that should help pinpoint a line of code that is causing these requests to fail for you. Please follow the instructions below to install this debug version:

Install the debug version

If you use GitHub to keep webCoRE up-to-date:

This requires more steps than just pasting in the debug code but it is the easiest way for me to push additional changes while we debug:

  1. Go to the My Smart Apps screen on ide.smartthings.com
  2. Click Settings at the top
  3. Click Add new repository with the following info in the three fields: idpatersonwebCoredebug/exception-line-logging
  4. Click Save
  5. Click the pencil icon next to the webCoRE smart app
  6. Expand Source Code Options and change the repository to webCoRE (debug/exception-line-logging)
  7. Click Update
  8. Return to My Smart Apps
  9. Click the magnifying glass icon next to webCoRE
  10. Click Overwrite local version on the left half then Save on the right half
  11. Click webCoRE to go into the code editor
  12. Click Publish > For Me

Any further updates will come through the Update from repo button like normal.

If you copy and paste code into the IDE:

  1. Go to the My Smart Apps screen on ide.smartthings.com
  2. Click the webCoRE smart app
  3. Copy the debug code and paste into the ST editor
  4. Save and publish changes

Any further updates will have to be pasted and republished.

Testing the dashboard

  1. Go to the Live Logging tab in the IDE
  2. Click webCoRE to filter the logs (it may not show up right away)
  3. Load dashboard.webcore.co
  4. Look for a red error in the logs (be sure to get the one that shows the line number) and paste it back here

Hopefully this will help uncover the problem. Once we are done you can switch back to the normal webCoRE repo. I attempted to keep the commits in this branch very clean to avoid any concerns about using the forked code; this method of debugging is not something that we can publish to the live version of webCoRE.


#8

Thanks again for the help. I installed through git and obtained the following through live logging. Does this help or tell you anything?

853f895d-8f03-438f-b6e7-4c17b02263f5 2:00:17 PM: error java.lang.NullPointerException: Cannot get property ‘time’ on null object
853f895d-8f03-438f-b6e7-4c17b02263f5 2:00:17 PM: info smartapp_pause called by smartAppName=webCoRE, value=200, smartAppVersionId=fb77514d-7d4a-4078-ae4c-04230cda6abe
853f895d-8f03-438f-b6e7-4c17b02263f5 2:00:17 PM: error Error generating response @ line 7704 java.lang.NullPointerException: Cannot get property ‘time’ on null object


#9

Yes, it does! The referenced line of code is getting your sunrise and sunset times from the hub. I don’t see any indication in the ST docs about sunrise and sunset times not being available but would guess it doesn’t know your location.

Does your hub show geographical coordinates for your location under My Locations in the IDE? (to be clear, I don’t need to know the coords just whether there is a location associated). If not, try assigning a location in the ST app with the settings icon at the top of the More tab.


#10

I will have a fix for this in the next release that logs a warning and uses 7 AM to 7 PM as a default sunrise and sunset, provided that the above advice resolves the problem for you.


#11

You da man! That was the issue. I indeed had a location set properly in the app, and the coordinates displayed in the IDE however the timezone field in the IDE was blank. I moved my location out of my timezone in the app, saved, and then reset my location to my home and webcore was restored. Thank you for taking the time to help! I assume I can reset my smartapp webcore settings back to the master git repository.


#12

Yes please reset that piston back to ady624 master. Thanks for the detailed follow up, hopefully the warning will help others with the same issue.


#13

Geez, I realize now I had the solution all along, I just didn’t realize it. :sunglasses:

SmartThings had a time-related outage starting on January 3—the date of my original post—which was resolved the next day but quickly followed by another, more general outage on the 4th. Their original post on it said:

Before I became aware of the outage, I noticed that pistons were executing at odd times. I immediately looked at the IDE and saw the Hub was reporting UTC instead of local time and that the Sunrise and Sunset parameters were missing. The next morning, after some searching, I moved my location in and out of my timezone and my pistons started working again. I knew that fixed my piston timing, but didn’t connect that to the dashboard loading issue. :roll_eyes:

Hopefully @ipaterson’s fix will prevent others from chasing their tail like I did for a couple of days. Thanks!


#14

Thanks for the follow-up, it’s great to know more about the time zone issue.


#15

The smart apps will no longer error out if SmartThings does not provide a sunrise and sunset time as of today’s 0.2.102 update. Instead a warning is logged and a default sunrise and sunset of 7AM to 7PM are used to avoid breaking anything down the line that depends on those values.