Closed
Description
Salut Louis,
J'ai installé hier androidtv-remote
. J'ai réussi le pairing, par contre quand j'envoie une commande je reçois cette erreur (pour info j'ai essayé de redémarrer ma TV):
code: 'ERR_UNHANDLED_ERROR',
context: {
error: RemoteError {
value: true,
message: RemoteMessage {
remoteKeyInject: RemoteKeyInject { keyCode: 91, direction: 3 }
}
}
}
J'utilise le même exemple que toi (au passage dans le readme et example,js
tu marques RemoteKeyCode.MUTE
alors que ça devrait être RemoteKeyCode.KEYCODE_MUTE
):
androidRemote.on('ready', async function (){
androidRemote.sendKey(RemoteKeyCode.KEYCODE_MUTE, RemoteDirection.SHORT)
}.bind(this))
En debug ça donne :
Start Remote Connect
192.168.0.47 Remote secureConnect
192.168.0.47 Receive : {"remoteConfigure":{"code1":639}}
192.168.0.47 Bytes : 5,10,3,8,255,4
Create Remote {"remoteConfigure":{"code1":622,"deviceInfo":{"unknown1":1,"unknown2":"1","packageName":"androitv-remote","appVersion":"1.0.0"}}}
DEBUG payload => {
remoteConfigure: {
code1: 622,
deviceInfo: {
model: undefined,
vendor: undefined,
unknown1: 1,
unknown2: '1',
packageName: 'androitv-remote',
appVersion: '1.0.0'
}
}
}
DEBUG message => RemoteMessage {
remoteConfigure: {
code1: 622,
deviceInfo: {
model: undefined,
vendor: undefined,
unknown1: 1,
unknown2: '1',
packageName: 'androitv-remote',
appVersion: '1.0.0'
}
}
}
DEBUG array of bytes => <Buffer 24 0a 22 08 ee 04 12 1d 18 01 22 01 31 2a 0f 61 6e 64 72 6f 69 74 76 2d 72 65 6d 6f 74 65 32 05 31 2e 30 2e 30>
Sending {"remoteConfigure":{"code1":622,"deviceInfo":{"unknown1":1,"unknown2":"1","packageName":"androitv-remote","appVersion":"1.0.0"}}}
Create Remote {"remoteKeyInject":{"keyCode":91,"direction":3}}
DEBUG payload => { remoteKeyInject: { keyCode: 91, direction: 3 } }
DEBUG message => RemoteMessage { remoteKeyInject: { keyCode: 91, direction: 3 } }
DEBUG array of bytes => <Buffer 06 52 04 08 5b 10 03>
Sending {"remoteKeyInject":{"keyCode":"KEYCODE_MUTE","direction":"SHORT"}}
192.168.0.47 Receive : {"remoteError":{"value":true,"message":{"remoteKeyInject":{"keyCode":"KEYCODE_MUTE","direction":"SHORT"}}}}
192.168.0.47 Bytes : 12,26,10,8,2,18,6,82,4,8,91,16,3
J'ai vu que tu as fait une màj aujourd'hui (v1.0.6) donc j'ai mis à jour et j'ai utilisé le fichier example.js
mais maintenant j'obtiens:
Start Remote Connect
Error: error:0680009B:asn1 encoding routines::too long
at node:internal/tls/secure-context:65:13
at Array.forEach (<anonymous>)
at setCerts (node:internal/tls/secure-context:63:3)
at configSecureContext (node:internal/tls/secure-context:152:5)
at Object.createSecureContext (node:_tls_common:116:3)
at Object.connect (node:_tls_wrap:1621:48)
at D:\experiments\android_pop\js\node_modules\androidtv-remote\dist\remote\RemoteManager.js:48:37
at new Promise (<anonymous>)
at D:\experiments\android_pop\js\node_modules\androidtv-remote\dist\remote\RemoteManager.js:39:14
at Generator.next (<anonymous>) {
opensslErrorStack: [
'error:0488000D:PEM routines::ASN1 lib',
'error:0688010A:asn1 encoding routines::nested asn1 error',
'error:06800066:asn1 encoding routines::bad object header'
],
library: 'asn1 encoding routines',
reason: 'too long',
code: 'ERR_OSSL_ASN1_TOO_LONG'
}
D:\experiments\android_pop\js\node_modules\androidtv-remote\dist\remote\RemoteManager.js:148
_this2.client.destroy();
^
TypeError: Cannot read properties of undefined (reading 'destroy')
at D:\experiments\android_pop\js\node_modules\androidtv-remote\dist\remote\RemoteManager.js:148:21
at Generator.next (<anonymous>)
at asyncGeneratorStep (D:\experiments\android_pop\js\node_modules\androidtv-remote\dist\remote\RemoteManager.js:22:103)
at _next (D:\experiments\android_pop\js\node_modules\androidtv-remote\dist\remote\RemoteManager.js:24:194)
at D:\experiments\android_pop\js\node_modules\androidtv-remote\dist\remote\RemoteManager.js:24:364
at new Promise (<anonymous>)
at D:\experiments\android_pop\js\node_modules\androidtv-remote\dist\remote\RemoteManager.js:24:97
at RemoteManager.stop (D:\experiments\android_pop\js\node_modules\androidtv-remote\dist\remote\RemoteManager.js:149:7)
at AndroidRemote.stop (D:\experiments\android_pop\js\node_modules\androidtv-remote\dist\index.js:102:24)
at file:///D:/experiments/android_pop/js/example.js:106:15
Une idée du problème ?
Je continue à bidouiller pour essayer de comprendre ce qu'il se passe…
Merci
Metadata
Metadata
Assignees
Labels
No labels