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

[Plex] Error getting state (status code 1): TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["X-Plex-Token"] #9

Closed
noben78 opened this issue Feb 5, 2018 · 6 comments

Comments

@noben78
Copy link

noben78 commented Feb 5, 2018

Hi
can't get homebridge-plex to work. Everything looks OK in config file. Harmony remote Hub works fine in Homebridge.

Log:
[Plex] Getting current state...
[Plex] Error getting state (status code 1): TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["X-Plex-Token"]

I'm pretty sure I have the right Token

@mpbzh
Copy link
Owner

mpbzh commented Feb 5, 2018

Please try the steps described here to debug the token.

Do you get a valid output?

@noben78
Copy link
Author

noben78 commented Feb 5, 2018

Token works great, testing with:
http://192.168.0.1:32400/status/sessions?X-Plex-Token= TOKEN (replacing TOKEN with my Plex)
Tested tree different token, all OK.
Tested on lokalhost. Running bridge och PMS on the same machine.

@noben78
Copy link
Author

noben78 commented Feb 5, 2018

Tested with and without host and port in my config...same error message...

"accessories": [{
"accessory": "Plex",
"name": "Plex",
"plex_token": "​MYTOKEN",
"host": "192.168.167.100",
"port": 32400,
"filter": [{
"user": "MYUSER",
"player": "MYPLAYER"
}]
}],

@mpbzh
Copy link
Owner

mpbzh commented Feb 5, 2018

There is a good chance that there is an issue with how the token is encoded to be sent to the server.

What would help is posting the token here, however for you to securely do so you probably want to generate a new one for your server. You can read up about this here: https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/ (Getting a New Token)

This will require you to log in again on all your devices.

@noben78
Copy link
Author

noben78 commented Feb 5, 2018

Thanks!
I was trying out Atom for Mac. Deleted my config.json file and did it the old way in vi and now everything is up and running..
Big thanks!
btw, Plex for homebridge is logging every try in log file. Is it possible to turn off?

@mpbzh
Copy link
Owner

mpbzh commented Feb 5, 2018

Glad to hear.

Regarding the log output: Check issue #6

@mpbzh mpbzh closed this as completed Feb 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants