question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

authenticationToken is not recognized

See original GitHub issue

I have the issue that mý authToken is not being recognized…

Tried several different methodes, checked the code but somewhere the linking between the plugin and the config seems to fail.

Here is the Failure message:

Load homebridge-eWeLink.eWeLink
[2017-12-26 05:58:12] [homebridge-eWeLink.eWeLink] Intialising eWeLink
/usr/local/lib/node_modules/homebridge-ewelink/index.js:42
    this.authenticationToken = config['authenticationToken'];
                                     ^

TypeError: Cannot read property 'authenticationToken' of null
    at new eWeLink (/usr/local/lib/node_modules/homebridge-ewelink/index.js:42:3             8)
    at Server._loadDynamicPlatforms (/usr/local/lib/node_modules/homebridge/lib/             server.js:325:30)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:87:8)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge             :17:22)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

and here is my config:

	"platforms": [{
			
		"platform": "eWeLink",
		"name": "eWeLink",
		"autheticationToken": "authToken is in here!",
		"apiHost": "eu-api.coolkit.cc:8080/api/group?apikey=apikeygoeshere&appid=xyz&nonce=eto149q7&ts=1514263532&version=6",
		"webSocketApi": "eu-api.coolkit.cc:8080/api/group?apikey=apikeygoeshere&appid=xyz&ts=1514263532&version=6"
		},
			]
}

greetings from Germany

Kevin

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
MrBrodicommented, Nov 19, 2018

2 Minutes later i have found the issue. 💃

Just copied config.json from /homebridge to /.homebridge Now its working

Command: cp config.json /root/.homebridge

0reactions
MrBrodicommented, Nov 19, 2018

Same Problem here. TypeError: Cannot read property ‘authenticationToken’ of null …

my config.json:

{
“bridge”: {
“name”: “Homebridge”,
“username”: “:::::”,
“port”: 51826,
“pin”: “031-45-154”
},

"description": "This is an example configuration file. You can use this as a template for creating your own configur
                                                                                                                    
"accessories": [                                                                                                    
],                                                                                                                  
                                                                                                                    
"platforms": [                                                                                                      
    {                                                                                                               
    "platform" : "eWeLink",                                                                                         
    "name" : "eWeLink",                                                                                             
    "authenticationToken" : "8f******************************************",                                             
    "apiHost" : "eu-api.coolkit.cc:8080",                                                                           
    "webSocketApi" : "eu-pconnect3.coolkit.cc"                                                                      
    }                                                                                                               
]                                                                                                                   

}

Is the problem fixed in the meantime?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Authentication Token is not working in NodeJS. Saying ...
When the Authentication token Function is called, The Auth.Header is empty. I guess there's logical error somewhere in this.
Read more >
Unable to get authentication token while connecting to ...
In order to do that I am trying to fetch authentication token using below script, but it does not seem to work.
Read more >
Not able to get the authentication token using curl command ...
While trying to get the session token by using curl command, getting below error. {"error":{"message":"Invalid username or password"}}.
Read more >
Terraform Cloud authentication token variable not working
Getting an error which suggests to me that the environment variable TFE_TOKEN doesn't work. Steps to Reproduce. export TFE_TOKEN=xyz; terraform ...
Read more >
Error: 'Invalid authentication token or client is not registered ...
N-sight RMM Troubleshooting. > Error: 'Invalid authentication token or client is not registered' when launching the Backup Manager.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found