Oh sorry, I’ll fix that, the indentation is throwing me off a bit. I tried removing the pistons on my own dashboard but skipped testing out all of this. No rush, I’ll just edit the post above.
Dashboard and dev just spinning?
seeems it’s this:
] + (sendDevices ? [contacts: listAvailableContacts(false, updateCache), devices: listAvailableDevices(false, updateCache)] : [:]),
I add that line back in and
type “java.lang.NullPointerException”
So the culprit is this line…now to figure out why
- (sendDevices ? [contacts: listAvailableContacts(false, updateCache), devices: listAvailableDevices(false, updateCache)] : [:]),
I edited my contacts and made sure both had email and phone and removed/readded in smatapp and now I can load.
Amazing - I am back! Thanks for all the help - learned a lot about how to debug dashboard issues
Awesome! I learned a lot as well…
So did you have a contact without an email or a phone, that’s what caused this? I’ll try to reproduce it on my end then push out an update. This thread will also move over to Bug reports in case anyone else needs to find it.
You nailed it - crazy two weeks at work - being pulled in all directions, tomorrow’s my last day!!!
@JJsLegacy, I can make a contact without a name or email from the ST Dev dashboard and I’m guessing that’s what you did because the ST app requires a first and last name. Once I do that I get the 500 error and spinner of death.
This was a very easy fix, I’ll push out a new version tomorrow so that it doesn’t bite anyone else. The exception was happening here: contact.contact.firstName
where when the contact does not have a name specified contact.contact
is null
. The fix is simply to switch use contact.contact?.firstName
instead.
Intereeting. Can’t imagine that’s how mine was but maybe something behind the scenes got messed up.
Thanks again everyone. That was the scariest 36 hours of my life!
Well it magically broke again. I commented out the contact part and it worked so something is going with my contacts.
I tried to add your fix and same problem existed so that doesn’t seem to be it unless there is more to the fix.
*edit - also new problem I can’t see a new device I added after I updated the smartapp to add it
The fix was in both the webCoRE and more importantly the webCoRE Storage smart apps. I’ll have time to help in a few minutes.
So I just updated contact.contact.firstName to contact.contact?.firstName
in both?
That seems to have made no change. I am back to this:
{“error”:true,“type”:“java.lang.NullPointerException”,“message”:“An unexpected error occurred.”}
scratch that…
713686f8-6e0b-4230-af47-8d5401a376a3 9:05:11 PM: error java.lang.NullPointerException
713686f8-6e0b-4230-af47-8d5401a376a3 9:04:40 PM: debug Dashboard: Initializing security tokens
it just hates my contacts.
if I select nothing in contacts in the smartapp. Same problem. Only way around it is to comment that out. Makes no sense
Maybe it’s a device rather than a contact. Try changing the base result to only include contacts by removing , devices: listAvailableDevices(false, updateCache)
The device loading is pretty complex, if it turns out the problem is there I’ll have to take a closer look tomorrow.
It’s definitely the contacts because if I remove that it works and my missing device shows up. '
I have now tried to remove contacts from ST and from the stapp so it shows contact book is not enabled.
Problem now is I keep getting:
Dashboard: Authentication failed due to an invalid token
How do I clear that all out?
Try that localforage.clear() in the console again. Sorry for the terse replies, on mobile now
No worries.
I am in now sort of - not all computers working but some are. Will worry about that later. The ST app says my contact book is not enabled but something is still wonky.
I can’t edit any pistons with that code not commented out - gets the java issue. No idea why it’s trying to do anything with contacts when I have none selected