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

Wait till keyFile is loaded before connect #62

Merged
merged 1 commit into from Dec 13, 2019

Conversation

merdok
Copy link
Contributor

@merdok merdok commented Dec 12, 2019

Hi,

just tried your plugin and it is great! I just had one issue with it. My TV was always asking me to accept the connection. I did some debugging and found the issue:

You are correctly writing the key to a file, but when you read the file at startup you do not wait for the file to finish reading. This leads to an issue where the connection starts before the key can be retrieved from the file. By moving theconnect()function to the fs.readFile callback, you ensure that the connection starts after the file is retrieved(or not, depends on if this is the first run).

@instalator
Copy link
Contributor

Good!

@SebastianSchultz SebastianSchultz merged commit 916fd95 into iobroker-community-adapters:master Dec 13, 2019
@jpawlowski
Copy link
Contributor

jpawlowski commented Jan 13, 2020

@merdok @SebastianSchultz seems the issue still persists :-(
Will you be releaseing a new version on NPM?

@SebastianSchultz
Copy link
Collaborator

Hmm, for my Installation it's working. Can you check the file permissions for the keyfile?

@jpawlowski
Copy link
Contributor

@SebastianSchultz Keyfile permissions is not a problem.
Manually changing the file as shwon in this PR will resolve the issue.

However, the fact that I need to change it manually directed me to https://www.npmjs.com/package/iobroker.lgtv where I see that version is still 1.1.2 and 1.1.3 is not available from it. Therefore, people like me still miss the latest bugfix release for installation.

@SebastianSchultz
Copy link
Collaborator

Thanks for the Information.
Will publish the 1.1.3

@jpawlowski
Copy link
Contributor

Splendid 😁

@SebastianSchultz
Copy link
Collaborator

Published 1.1.3 on npm

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

Successfully merging this pull request may close these issues.

None yet

4 participants