It seems this call is failing and no idea why/how to fix it:
(removed the parts I thought might be sensitive)
It seems this call is failing and no idea why/how to fix it:
(removed the parts I thought might be sensitive)
Does the response to that request include any more info than the exception that you saw in the IDE logs?
No not really:
error true
type "java.lang.NullPointerException"
message “An unexpected error occurred.”
A get returns:
500 Internal Server Error
I once had a similar error trying to access the old CoRE dashboard.
I needed to re-generate the token under Oauth in the IDE… worth a shot at least?
you mean clicking “Refresh client secret (warning: this will make your current secret invalid)”
I have tried that also
Ok, dive in with me here. I get the impression that you’re at least fairly technical, so let me know if you need more info on any of the steps I gloss over below.
First thing to figure out is whether a specific piston is responsible for this. You’re already at step 4 since you showed the URL but other steps included for the benefit of others.
dashboard/load
/intf/dashboard/load?
with /intf/dashboard/piston/get?id=&
but don’t load that page yet because we need to get the id:19ac3370d57aafca115c3f7033ed973c:
, including the colonsid=
and the &
in the earlier URLangular.callbacks
If it looks like all of them will error out after trying a few that’s fine we can look for something else. Otherwise, my hope is that one but not all of these will throw an error.
Seems like I did something wrong - will check again but I get:
angular.callbacks._2({“name”:“NC \ webCoRE_1”,“error”:“ERR_INVALID_TOKEN”,“now”:1510258545656})
I also remember with old CoRE, when I reset the token I had to do something in the mobile app after… will dig into some of my old posts.
The /load shows the same error though when a token is invalid so I think it might be how you edited it. Can you paste here redacted or in a PM to me?
I keep thinking something is broken somewhere like that - some thing that hooks all this magic together I just have no idea where to find it.
The URL included /intf/dashboard/load?token=&pin=
with a value for the pin but no token. I think something got stuck halfway through signing you in to the dashboard. Open up the browser console and run the command localforage.clear();
This will reset the data cached in your browser and require you to re-authorize that browser to use webCoRE. Once you’ve done that let’s see if it loads up or if we need to keep debugging.
So I register and then next screen asks me my password. When I enter that I get stuck and I get the 500 error. Token is blank
I take it you’ve tried the dashboard button in the mobile app instead of register a browser?
Have you tried going to the smartapps tab of a device and accessing a piston from there?
Are you able to install a second instance and access that?
Ok, so I see that the token comes back from a call to /load via a request with just the pin like you have, then the frontend uses the token thereafter but can’t get the token in your case since /load doesn’t work. Let’s approach this from a different angle.
In SmartThings developer can you make the following edit to webCoRE smart app around line 934? Add two forward slashes to comment out the pistons: getChildApps()
line as shown, then save and publish:
return [
name: location.name + ' \\ ' + (app.label ?: app.name),
instance: [
account: [id: hashId(hubUID ?: app.getAccountId(), updateCache)],
// pistons: getChildApps().findAll{ it.name == name }.sort{ it.label }.collect{ [ id: hashId(it.id, updateCache), 'name': it.label, 'meta': state[hashId(it.id, updateCache)] ] },
id: hashId(app.id, updateCache),
locationId: hashId(location.id, updateCache),
name: app.label ?: app.name,
uri: state.endpoint,
Try to refresh the dashboard again. Just trying to get the dashboard to load at this point, you’ll have a big sad face since it doesn’t know about your pistons after commenting out that line.