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

Not able to establish remote pairing session with the TV #622

Open
msanthosh87 opened this issue Jun 10, 2024 · 3 comments
Open

Not able to establish remote pairing session with the TV #622

msanthosh87 opened this issue Jun 10, 2024 · 3 comments

Comments

@msanthosh87
Copy link

msanthosh87 commented Jun 10, 2024

When I run the remote pairing session command, I'm getting the following error:
The device might be denied in the past pairing.
Also, in the appium server logs, getting the following error --> Invalid WebSocket frame: invalid status code 1005

Checked the denied device list in the TV in the following location,
Settings -> General -> External Device Manager -> Device Connect Manager -> Device List
I don't see any devices in the denied list.

Environment:
Windows 10
Appium server: v2.5.4
Tizentv driver version: v0.11.0
Tizen OS version in TV: 5.5
Samsung tv model: UA32T4340BKXXL

Note: I have removed the ip address from the logs.

appium driver run tizentv pair-remote --host <ip_address>
The device <ip_address> might be denied in the past pairing. Please make sure that the device has no denied devices, especially named ' <ip_address>'.

C:\Users.appium\node_modules\appium-tizen-tv-driver\node_modules\got\dist\source\as-promise\index.js:118
request._beforeError(new types_1.HTTPError(response));
^
HTTPError: Response code 401 (Unauthorized)
at Request. (C:\Users.appium\node_modules\appium-tizen-tv-driver\node_modules\got\dist\source\as-promise\index.js:118:42)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
× Encountered an error when running 'pair-remote': Script "pair-remote" exited with code 1

Appium server logs:
[Appium] Attempting to find matching driver for automationName 'TizenTV' and platformName 'TizenTV'
[Appium] The 'tizentv' driver was installed and matched caps.
[Appium] Will require it at C:\Users.appium\node_modules\appium-tizen-tv-driver
[Appium] Requiring driver at C:\Users.appium\node_modules\appium-tizen-tv-driver\build\lib\index.js
[AppiumDriver@8e98] Appium v2.5.4 creating new TizenTVDriver (v0.11.0) session
[AppiumDriver@8e98] Checking BaseDriver versions for Appium and TizenTVDriver
[AppiumDriver@8e98] Appium's BaseDriver version is 9.6.0
[AppiumDriver@8e98] TizenTVDriver's BaseDriver version is 9.6.0
[TizenTVDriver@3d72] Creating session with W3C capabilities: {
[TizenTVDriver@3d72] "alwaysMatch": {
[TizenTVDriver@3d72] "platformName": "TizenTV",
[TizenTVDriver@3d72] "appium:automationName": "TizenTV",
[TizenTVDriver@3d72] "appium:deviceName": "<ip_address>:26101",
[TizenTVDriver@3d72] "appium:chromedriverExecutable": "C:/Users/Downloads/chromedriver_win32_236_samsung/chromedriver.exe",
[TizenTVDriver@3d72] "appium:rcMode": "remote",
[TizenTVDriver@3d72] "appium:newCommandTimeout": 3600,
[TizenTVDriver@3d72] "appium:connectHardwareKeyboard": true
[TizenTVDriver@3d72] },
[TizenTVDriver@3d72] "firstMatch": [
[TizenTVDriver@3d72] {}
[TizenTVDriver@3d72] ]
[TizenTVDriver@3d72] }
[TizenTVDriver@3d72] The following provided capabilities were not recognized by this driver:
[TizenTVDriver@3d72] connectHardwareKeyboard
[TizenTVDriver@3d72 (f0504755)] Session created with session id: f0504755-2651-45a7-b5d1-eb398c7b49f5
[TizenTVDriver] No udid and/or deviceAddress provided; attempting to derive from deviceName "<ip_address>:26101"
[TizenTVDriver] Setting deviceAddress to ""
[TizenTVDriver] Setting udid to "<ip_address>:26101"
[TizenTVDriver] Getting capabilities on 'undefined'
[TizenTVDriver] Attempting to verify location of the 'sdb' binary
[TizenTVDriver] Binary was found at C:\tizen-studio\tools\sdb.exe
[TizenTVDriver] Running command: C:\tizen-studio\tools\sdb.exe capability
[TizenTVDriver] The Tizen platform version is 5.5
[TizenTVDriver] Received rcKeypressCooldown of type undefined
[TizenTVDriver] Requesting new token; please wait...
uncaughtException: Invalid WebSocket frame: invalid status code 1005
RangeError: Invalid WebSocket frame: invalid status code 1005
at Receiver.controlMessage (C:\Users.appium\node_modules\appium-tizen-tv-driver\node_modules\ws\lib\receiver.js:624:30)
at Receiver.getData (C:\Users.appium\node_modules\appium-tizen-tv-driver\node_modules\ws\lib\receiver.js:477:12)
at Receiver.startLoop (C:\Users.appium\node_modules\appium-tizen-tv-driver\node_modules\ws\lib\receiver.js:167:16)
at Receiver._write (C:\Users.appium\node_modules\appium-tizen-tv-driver\node_modules\ws\lib\receiver.js:94:10)
at writeOrBuffer (node:internal/streams/writable:389:12)
at _write (node:internal/streams/writable:330:10)
at Receiver.Writable.write (node:internal/streams/writable:334:10)
at TLSSocket.socketOnData (C:\Users.appium\node_modules\appium-tizen-tv-driver\node_modules\ws\lib\websocket.js:1303:35)
at TLSSocket.emit (node:events:527:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at TLSSocket.Readable.push (node:internal/streams/readable:228:10)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)

@preeti-jaiswal-wynk
Copy link

Any solution?

@dextermapalya
Copy link

dextermapalya commented Aug 1, 2024

I am facing exact issue described by @msanthosh87 Any update , fix or solution

@KazuCocoa
Copy link
Contributor

If could have various reasons which is still unknown.
https://github.com/headspinio/appium-tizen-tv-driver/blob/9c2bcbd21514a6a0c4700cf35799c82b1515e5d4/packages/appium-tizen-tv-driver/lib/rc-pair.js is the paring script, so you could debug it to clarify the reason. It could depends on the TV environment.

Once paring completes, usually Settings -> General -> External Device Manager -> Device Connect Manager -> Device List has an item for this driver. If any items existed in the section, paring itself might not be proceeded

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

4 participants