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

Expecting empty clientID #112

Open
RSWilli opened this issue Feb 26, 2021 · 2 comments
Open

Expecting empty clientID #112

RSWilli opened this issue Feb 26, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@RSWilli
Copy link

RSWilli commented Feb 26, 2021

When I try to pair with GHome, I get the following error msg:

"Auth:isValidClient(): clientId does not match (expected "", got "<MY_CORRECT_ID>")!"

it somehow expects the client ID to be emtpy. I checked nginx access log, where

GET /oauth?response_type=code&client_id=<MY_CORRECT_ID>&...........

is logged. I also checked the code to try to understand my error a bit, where I came to the conclusion that the expected empty string has to come from the initialization in https://github.com/mikejac/node-red-contrib-google-smarthome/blob/master/lib/Auth.js#L32 , although it should get overwritten in https://github.com/mikejac/node-red-contrib-google-smarthome/blob/master/lib/SmartHome.js#L64

did I do something wrong?

@RSWilli
Copy link
Author

RSWilli commented Feb 26, 2021

it seems like the clientIdSecret function is not called after a "Deploy" in Node Red. It must have taken an old config value, which was empty. A full restart of Node Red fixed the issue.

A more permanent fix for this issue would be to call the setClientIdSecret function after a redeploy

@RSWilli
Copy link
Author

RSWilli commented Feb 26, 2021

it seems like this is the case for more places:

e.g. the light on/off node does not send a message after a redeploy, even though it updates its status

@Caprico85 Caprico85 added the bug Something isn't working label Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants