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

Crash when shutting down. #17

Open
MarcGodard opened this issue Jun 4, 2018 · 0 comments
Open

Crash when shutting down. #17

MarcGodard opened this issue Jun 4, 2018 · 0 comments

Comments

@MarcGodard
Copy link

When running:

kodi(host, 9090)
        .then(connection => {
          connection.System.Shutdown()
          console.log("Kodi Power Off Success")
        })
Kodi Power Success
events.js:165
      throw er; // Unhandled 'error' event
      ^

SyntaxError: Failed to handle response: Unexpected token � in JSON at position 0
    at JSON.parse (<anonymous>)
    at Schema.handleResponse (/Users/marcgodard/GitHub/remote-api/node_modules/jrpc-schema/lib/Schema.js:80:21)
    at WebSocket.<anonymous> (/Users/marcgodard/GitHub/remote-api/node_modules/kodi-ws/lib/Connection.js:30:18)
    at WebSocket.emit (events.js:180:13)
    at Receiver.ontext (/Users/marcgodard/GitHub/remote-api/node_modules/kodi-ws/node_modules/ws/lib/WebSocket.js:841:10)
    at /Users/marcgodard/GitHub/remote-api/node_modules/kodi-ws/node_modules/ws/lib/Receiver.js:536:18
    at Receiver.applyExtensions (/Users/marcgodard/GitHub/remote-api/node_modules/kodi-ws/node_modules/ws/lib/Receiver.js:371:5)
    at /Users/marcgodard/GitHub/remote-api/node_modules/kodi-ws/node_modules/ws/lib/Receiver.js:508:14
    at Receiver.flush (/Users/marcgodard/GitHub/remote-api/node_modules/kodi-ws/node_modules/ws/lib/Receiver.js:347:3)
    at Receiver.finish (/Users/marcgodard/GitHub/remote-api/node_modules/kodi-ws/node_modules/ws/lib/Receiver.js:541:12)
    at Receiver.expectHandler (/Users/marcgodard/GitHub/remote-api/node_modules/kodi-ws/node_modules/ws/lib/Receiver.js:499:31)
    at Receiver.add (/Users/marcgodard/GitHub/remote-api/node_modules/kodi-ws/node_modules/ws/lib/Receiver.js:103:24)
    at Socket.realHandler (/Users/marcgodard/GitHub/remote-api/node_modules/kodi-ws/node_modules/ws/lib/WebSocket.js:825:20)
    at Socket.emit (events.js:180:13)
    at addChunk (_stream_readable.js:269:12)
    at readableAddChunk (_stream_readable.js:256:11)
Emitted 'error' event at:
    at WebSocket.<anonymous> (/Users/marcgodard/GitHub/remote-api/node_modules/kodi-ws/lib/Connection.js:33:11)
    at WebSocket.emit (events.js:180:13)
    [... lines matching original stack trace ...]
    at readableAddChunk (_stream_readable.js:256:11)
    at Socket.Readable.push (_stream_readable.js:213:10)
    at TCP.onread (net.js:581:20)
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

No branches or pull requests

1 participant