d8ahazard / FlexTV

Other
215 stars 32 forks source link

Error when linking Google #15

Open fiservedpi opened 5 years ago

fiservedpi commented 5 years ago

Screenshot_20190505-125001

IMPORANT, PLEASE READ FIRST:

Please read over the Notes/FAQ and networking sections before reporting an issue.

If your issue is not resolved, try to fill out the following as completely as possible. I'm not going to delete issues just because forms aren't filled out completely, but I will if you provide me no information whatsoever.

If submitting a feature request, these are not required.

1. Are you hosting your own version of Flex TV, or using the one at https://app.phlexchat.com? OWN

If hosting your own version, please answer the below questions. Otherwise, proceed to #8.

2. On what OS are you running Flex TV? UNRAID DOCKER

3. Are you using a new instance of XAMPP, or an existing webserver? NOT SURE

3b. If not XAMPP, what WebServer stack are you using? NOT SURE

4. Have you enabled the sockets module and ensured PHP has write-access to the directory containing Flex TV? NOT SURE

5. Have you followed the (networking)[Talking-To-The-Outside-World] section? YES

6. If you're having issues with a specific command, please note the timestamp in the web UI, and take a look at Flex TV and Flex TV_error.log files. Paste anything that looks related as well.

BE SURE TO CHANGE ANY LINES CONTAINING API TOKENS OR OTHER PERSONAL IDENTIFYING INFORMATION

7. What are the last six digits of your server's API Token? (Settings -> Flex TV) 92d62a

8. Please describe the issue.

After clicking the link Google button a new tab opens with the error seen above

seems like the "link Google" button is missing some functions Failed to load resource: the server phlexchat.com/api.php?apiToken=redacted&test=true:1 responded with a status of 404 (Not Found)

nervling commented 5 years ago

Getting the same error. I can access flexTV at the public address, so it seems that is setup correctly. some issue with the plexchat.com part?

fiservedpi commented 5 years ago

Not sure what's up last issue created was answered in less than 10 min this one has been few weeks think dev is busy

theCheek commented 5 years ago

Trying to get a self hosted FlexTV integrated into my Home Assistant setup, and am stuck on this issue as well. Do you think this a flexchat.com issue, code issue or just bad configuration on our side?

nervling commented 5 years ago

I'm pretty sure it's a flexchat issue (in my case anyways). I've verified the URL that it needs to access on my server is setup correctly and accessible.

fiservedpi commented 5 years ago

Yeah flex chat issue

nervling commented 5 years ago

Nice find. That worked for me as well. Unfortunately now when I tell assistant to "talk to flextv" I get "was unable to parse the response from your server at ....". Did you see that as well?

nervling commented 5 years ago

Fwiw, I don't think this is fixed. The URL needs to be fixed in FlexTV so users don't have to manually do it.

I figured out my other issue. It looks like without a valid SSL cert google assistant fails. Switching to HTTP worked, or using HTTPS through my letsencrypt docker that has a valid certificate.

garrettdowd commented 5 years ago

Thanks for posting the fix! Unfortunately, it still does not seem to link correctly for me. When I say "Talk to Flex TV" it responds with, "I was unable to look up your user account. Please re-link....." Not sure how to troubleshoot. Currently running it as a docker on Unraid with a letsencrypt reverse proxy serving http://[internal_ip}:5666 at https://sub.domain.com GUI works fine on the public IP and it seems to be perfectly connected with Plex

Update: I added another account to my google home and then link Flex TV with the new account. It appears to work in this case. Would that mean it is an issue with flextv.us?? How can I get it work again with my main account? Update 2: At least I get to work on my Cockney accent now (need Voice Match to think I am the other new account)

d8ahazard commented 5 years ago

Okay...so...changing the apitoken value to "etc" is NOT a fix.

All you're doing is breaking the linking for anybody else who's doing said fix, and redirecting requests to someone else's equipment. DO NOT DO THIS.

In the current code base, with a hosted version of the app publicly accessible, I have no issues linking.

Furthermore, if I do a grep of the code base for Flex TV, there are no instances of phlexchat.com anywhere.

With that said...I'm suspecting this is an issue with the app not being up-to-date or a browser trying to cache the main.js file - which is even set to be ignored by the service worker (aka always updated).

I will be purging the database shortly of all accounts linked to an apiToken "etc", this is for your own protection.

Please ensure your copies of FlexTV are up to date, and try a ctrl+f5 of your browser to force it to pull the latest JS files, let me know if the issue persists.

nervling commented 5 years ago

I took etc to mean "everything else that was in the URL". You removed the comment (makes sense if this is a security issue), but I believe I copy pasted everything before "etc", and replaced the first part of the URL.

fiservedpi commented 5 years ago

Thanks dev sorry for the confusion

automatt1c commented 5 years ago

So i finally got mine working. The problem was that i was still pointed to the phlextv docker(which doesn't work), which was up to date as of April, the last update. I had to delete the docker completely and re-configure from scratch using the new Flextv docker image and that worked perfectly.

I would suggest, updating the communication to delete all old (phlexTV installs) or update the docker image on the old site maybe?

fortepc commented 5 years ago

Seem like FlexTV is just dead, it's been entirely removed from Google Assistant.