Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException on Color Coordinator #11

Open
diablodale opened this issue Dec 1, 2016 · 1 comment
Open

java.lang.NullPointerException on Color Coordinator #11

diablodale opened this issue Dec 1, 2016 · 1 comment

Comments

@diablodale
Copy link

java.lang.NullPointerException: Cannot get property 'id' on null object @ line 36

Repro:
Never have installed or run Color coordinator.
Choose it from the mobile app for smart apps.

Result:
red error at the top of the mobile app: You are not authorized to perform the requested operation
using the graph.smartthings website and live logging, you can see the actual error is:
java.lang.NullPointerException: Cannot get property 'id' on null object @ line 36

Expected:
No error and to see the config UI for Color Coordinator.

This appears to be related to the recent commit
3835dcc#diff-d876d2aa4e1acf5dfb8f5f07f2e7c120R36

The line is:
def masterInList = slaves.id.find{it==master.id}

If this is the very first time the smartapp is installed/run, then there is no slaves object. The object is null/undefined. Therefore, it is not possible to get the id property on it. And therefore, the java exception occurs.

@coreyarb
Copy link

coreyarb commented Dec 2, 2016

Michael, can you lend any help/suggestions for that color coordinator? Thank you!

https://community.smartthings.com/t/cant-choose-color-coordinator-smartapp-in-ide/41311

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants