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

TypeError: Cannot read property 'toLowerCase' of undefined #5

Closed
eschava opened this issue Dec 29, 2018 · 5 comments
Closed

TypeError: Cannot read property 'toLowerCase' of undefined #5

eschava opened this issue Dec 29, 2018 · 5 comments

Comments

@eschava
Copy link

eschava commented Dec 29, 2018

The message like below I get in logs every minute (I think when a message from sensor is received)

29 Dec 10:05:54 - [error] [gate:c1a75881.315b98] TypeError: Cannot read property 'toLowerCase' of undefined

@drmibell
Copy link
Owner

Please post your flow or something similar that gives the error so that I can reproduce it. Thanks.

@drmibell
Copy link
Owner

My best guess is that you are passing a message to the gate node with msg.topic set to the Control Topic and msg.payload undefined. Please check and see whether this is the case. In any event, this error produces the message you are seeing, so I will revise the code to give a more informative message.

@drmibell
Copy link
Owner

I have pushed a new version (0.2.1) to npm. It should give the message 'Command must be a string' instead of 'TypeError'. Please let me know whether you continue to get the "TypeError: Cannot read property 'toLowerCase' of undefined" message. Without a copy of your flow, or at least the messages you are passing to the gate node, I cannot help you find the underlying source of the problem.

@eschava
Copy link
Author

eschava commented Dec 30, 2018

Thanks, will update and check

@eschava
Copy link
Author

eschava commented Jan 3, 2019

Gotcha!
3 Jan 11:40:36 - [error] [gate:c1a75881.315b98] Command must be a string
Thanks a lot!

@eschava eschava closed this as completed Jan 3, 2019
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