Closed nskcashHH closed 5 months ago
@nskcashHH Is this resolved ?
@nskcashHH Is this resolved ?
yes, the problem was that I started an appium session and connected locally. That is, an incorrect link was formed http://127.0.0.1:4723/device-farm/#/androidStream?port=4723&platform=android&host=192.168.88.44&udid=R58T31CCMQD&width=1080&height=2400 192.168.88.44 - it is not possible to connect to your address, if you connect via 192.168.88.44:4723 from another computer, the image appears. The home or back buttons work, but for some reason touches and swipes don't work, but this is another problem, I'm studying it. But in general, you can open this topic so as not to create a new one. Here is an example of logs where I started the device and try to make a click on the or swipe.
WebSocket message received: { action: 'click', args: { actions: [ [Object] ] } }
Performing action on the screen {
actions: [
{
type: 'pointer',
id: 'finger1',
parameters: [Object],
actions: [Array]
}
]
} {
userBlocked: true,
offline: false,
adbPort: 5037,
systemPort: 60798,
sdk: '13',
realDevice: true,
name: 'a52qnsxx',
busy: true,
state: 'device',
udid: 'R58T31CCMQD',
platform: 'android',
deviceType: 'real',
host: 'http://192.168.88.44:4723',
totalUtilizationTimeMilliSec: 2238364,
sessionStartTime: 1718029612177,
width: '1080',
height: '2400',
liveStreaming: false,
tags: [],
nodeId: 'd6e2e294-18c7-4890-8e87-1e98de940ed8',
meta: {
revision: 12,
created: 1718028896864,
version: 0,
updated: 1718029612178
},
'$loki': 2,
newCommandTimeout: 120,
session_id: '305bdc8c-c9a8-4b53-a1a1-dcaf6f301da0',
lastCmdExecutedAt: 1718029612177
}
[HTTP] --> GET /device-farm/api/device
[HTTP] {}
[device-farm-main] Received non-webdriver request with url /device-farm/api/device. So, not proxying it to downstream.
[HTTP] <-- GET /device-farm/api/device 304 1 ms - -
[HTTP]
[HTTP] --> GET /device-farm/api/queue/length
[HTTP] {}
[device-farm-main] Received non-webdriver request with url /device-farm/api/queue/length. So, not proxying it to downstream.
[HTTP] <-- GET /device-farm/api/queue/length 304 0 ms - -
[HTTP]
[device-farm-main] Found 0 device candidates to be released
[device-farm-main] Cleaning pending sessions...
[device-farm-main] No pending sessions to clean
[HTTP] --> GET /device-farm/api/device
[HTTP] {}
[device-farm-main] Received non-webdriver request with url /device-farm/api/device. So, not proxying it to downstream.
[HTTP] <-- GET /device-farm/api/device 304 5 ms - -
[HTTP]
[HTTP] --> GET /device-farm/api/queue/length
[HTTP] {}
[device-farm-main] Received non-webdriver request with url /device-farm/api/queue/length. So, not proxying it to downstream.
[HTTP] <-- GET /device-farm/api/queue/length 304 0 ms - -
[HTTP]
[device-farm-main] ****** UnhandledRejection ******
[device-farm-main] Reason:
AxiosError: connect ETIMEDOUT 192.168.88.44:4723
at Function.AxiosError.from (/Users/alekseybulygin/.appium/node_modules/appium-device-farm/node_modules/axios/lib/core/AxiosError.js:89:14)
at RedirectableRequest.handleRequestError (/Users/alekseybulygin/.appium/node_modules/appium-device-farm/node_modules/axios/lib/adapters/http.js:610:25)
at RedirectableRequest.emit (node:events:532:35)
at ClientRequest.eventHandlers.<computed> (/Users/alekseybulygin/.appium/node_modules/appium-device-farm/node_modules/follow-redirects/index.js:38:24)
at ClientRequest.emit (node:events:520:28)
at Socket.socketErrorListener (node:_http_client:502:9)
at Socket.emit (node:events:520:28)
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
at Axios.request (/Users/alekseybulygin/.appium/node_modules/appium-device-farm/node_modules/axios/lib/core/Axios.js:45:41)
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
port: 4723,
address: '192.168.88.44',
syscall: 'connect',
code: 'ETIMEDOUT',
errno: -60,
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [ 'xhr', 'http', 'fetch' ],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 60000,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: { FormData: [Function], Blob: [class Blob] },
validateStatus: [Function: validateStatus],
headers: Object [AxiosHeaders] {
Accept: 'application/json, text/plain, */*',
'Content-Type': 'application/json',
'User-Agent': 'axios/1.7.2',
'Content-Length': '318',
'Accept-Encoding': 'gzip, compress, deflate, br'
},
method: 'post',
url: 'http://192.168.88.44:4723/wd/hub/session/305bdc8c-c9a8-4b53-a1a1-dcaf6f301da0/actions',
data: '{"actions":[{"type":"pointer","id":"finger1","parameters":{"pointerType":"touch"},"actions":[{"type":"pointerMove","duration":0,"x":967,"y":817},{"type":"pointerDown","button":0},{"type":"pause","duration":0},{"type":"pointerMove","duration":100,"origin":"viewport","x":570,"y":797},{"type":"pointerUp","button":0}]}]}'
},
request: <ref *1> Writable {
_events: {
close: undefined,
error: [Function: handleRequestError],
prefinish: undefined,
finish: undefined,
drain: undefined,
response: [Function: handleResponse],
socket: [Array],
timeout: undefined,
abort: undefined
},
_writableState: WritableState {
highWaterMark: 65536,
length: 0,
corked: 0,
onwrite: [Function: bound onwrite],
writelen: 0,
bufferedIndex: 0,
pendingcb: 0,
[Symbol(kState)]: 17580812,
[Symbol(kBufferedValue)]: null
},
_maxListeners: undefined,
_options: {
maxRedirects: 21,
maxBodyLength: Infinity,
protocol: 'http:',
path: '/wd/hub/session/305bdc8c-c9a8-4b53-a1a1-dcaf6f301da0/actions',
method: 'POST',
headers: [Object: null prototype],
agents: [Object],
auth: undefined,
family: undefined,
beforeRedirect: [Function: dispatchBeforeRedirect],
beforeRedirects: [Object],
hostname: '192.168.88.44',
port: '4723',
agent: undefined,
nativeProtocols: [Object],
pathname: '/wd/hub/session/305bdc8c-c9a8-4b53-a1a1-dcaf6f301da0/actions'
},
_ended: false,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 318,
_requestBodyBuffers: [ [Object] ],
_eventsCount: 3,
_onNativeResponse: [Function (anonymous)],
_currentRequest: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: '318',
_hasBody: true,
_trailer: '',
finished: false,
_headerSent: true,
_closed: false,
_header: 'POST /wd/hub/session/305bdc8c-c9a8-4b53-a1a1-dcaf6f301da0/actions HTTP/1.1\r\n' +
'Accept: application/json, text/plain, */*\r\n' +
'Content-Type: application/json\r\n' +
'User-Agent: axios/1.7.2\r\n' +
'Content-Length: 318\r\n' +
'Accept-Encoding: gzip, compress, deflate, br\r\n' +
'Host: 192.168.88.44:4723\r\n' +
'Connection: keep-alive\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: '/wd/hub/session/305bdc8c-c9a8-4b53-a1a1-dcaf6f301da0/actions',
_ended: false,
res: null,
aborted: false,
timeoutCb: [Function: emitRequestTimeout],
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: '192.168.88.44',
protocol: 'http:',
_redirectable: [Circular *1],
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kChunkedBuffer)]: [],
[Symbol(kChunkedLength)]: 0,
[Symbol(kSocket)]: [Socket],
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 65536,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null
},
_currentUrl: 'http://192.168.88.44:4723/wd/hub/session/305bdc8c-c9a8-4b53-a1a1-dcaf6f301da0/actions',
_timeout: null,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false
},
cause: Error: connect ETIMEDOUT 192.168.88.44:4723
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '192.168.88.44',
port: 4723
}
}
[device-farm-main] Error: connect ETIMEDOUT 192.168.88.44:4723
[device-farm-main] at Function.AxiosError.from (/Users/alekseybulygin/.appium/node_modules/appium-device-farm/node_modules/axios/lib/core/AxiosError.js:89:14)
[device-farm-main] at RedirectableRequest.handleRequestError (/Users/alekseybulygin/.appium/node_modules/appium-device-farm/node_modules/axios/lib/adapters/http.js:610:25)
[device-farm-main] at RedirectableRequest.emit (node:events:532:35)
[device-farm-main] at ClientRequest.eventHandlers.<computed> (/Users/alekseybulygin/.appium/node_modules/appium-device-farm/node_modules/follow-redirects/index.js:38:24)
[device-farm-main] at ClientRequest.emit (node:events:520:28)
[device-farm-main] at Socket.socketErrorListener (node:_http_client:502:9)
[device-farm-main] at Socket.emit (node:events:520:28)
[device-farm-main] at emitErrorNT (node:internal/streams/destroy:170:8)
[device-farm-main] at emitErrorCloseNT (node:internal/streams/destroy:129:3)
[device-farm-main] at processTicksAndRejections (node:internal/process/task_queues:82:21)
[device-farm-main] at Axios.request (/Users/alekseybulygin/.appium/node_modules/appium-device-farm/node_modules/axios/lib/core/Axios.js:45:41)
[device-farm-main] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[device-farm-main] Promise:
[device-farm-main] [object Promise]
[device-farm-main] ****** UnhandledRejection ******
@saikrishna321 I have this behavior on iOS too, I try it on the simulator, it doesn't start on the iPhone due to a bug #1155
@nskcashHH Check with latest rc version for ios fix.
@saikrishna321 The connection to the iPhone is now successful, but the device control does not work, I only see its stream. 8.4.7-rc.38
WebSocket message received: { action: 'click', args: { actions: [ [Object] ] } }
Performing action on the ios screen {
actions: [
{
type: 'pointer',
id: 'finger1',
parameters: [Object],
actions: [Array]
}
]
} {
userBlocked: true,
offline: false,
wdaLocalPort: 55805,
mjpegServerPort: 55806,
udid: '00008101-000A0D5C34C3003A',
sdk: '17.4.1',
name: 'iPhone-12 AQA Black',
busy: true,
realDevice: true,
deviceType: 'real',
platform: 'ios',
host: 'http://192.168.88.44:4723',
wdaBundleId: '',
productModel: 'iPhone13,2',
totalUtilizationTimeMilliSec: 143262,
sessionStartTime: 1718090584729,
width: '390',
height: '844',
tags: [],
nodeId: '71fab9b9-abdc-417f-a62d-c8d89ac88b0a',
meta: {
revision: 16,
created: 1718089180167,
version: 0,
updated: 1718090584729
},
'$loki': 1,
proxyUrl: 'http://127.0.0.1:55805',
proxySessionId: '471C43EB-BB02-4970-90A6-917284181C4E',
newCommandTimeout: 120,
session_id: '24488d4f-42ee-45f6-9071-d10fb32e30bf',
lastCmdExecutedAt: 1718090584729
}
[HTTP] --> GET /device-farm/api/device
[HTTP] {}
[device-farm-main] Received non-webdriver request with url /device-farm/api/device. So, not proxying it to downstream.
[HTTP] <-- GET /device-farm/api/device 304 1 ms - -
[HTTP]
[HTTP] --> GET /device-farm/api/queue/length
[HTTP] {}
[device-farm-main] Received non-webdriver request with url /device-farm/api/queue/length. So, not proxying it to downstream.
[HTTP] <-- GET /device-farm/api/queue/length 304 1 ms - -
[HTTP]
[device-farm-main] ****** UnhandledRejection ******
[device-farm-main] Reason:
AxiosError: timeout of 5000ms exceeded
at RedirectableRequest.handleRequestTimeout (/Users/alekseybulygin/.appium/node_modules/appium-device-farm/node_modules/axios/lib/adapters/http.js:647:16)
at RedirectableRequest.emit (node:events:520:28)
at Timeout.<anonymous> (/Users/alekseybulygin/.appium/node_modules/appium-device-farm/node_modules/follow-redirects/index.js:210:12)
at listOnTimeout (node:internal/timers:573:17)
at processTimers (node:internal/timers:514:7)
at Axios.request (/Users/alekseybulygin/.appium/node_modules/appium-device-farm/node_modules/axios/lib/core/Axios.js:45:41)
at runNextTicks (node:internal/process/task_queues:60:5)
at listOnTimeout (node:internal/timers:540:9)
at processTimers (node:internal/timers:514:7) {
code: 'ECONNABORTED',
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [ 'xhr', 'http', 'fetch' ],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 5000,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: { FormData: [Function], Blob: [class Blob] },
validateStatus: [Function: validateStatus],
headers: Object [AxiosHeaders] {
Accept: 'application/json, text/plain, */*',
'Content-Type': 'application/json',
'User-Agent': 'axios/1.7.2',
'Content-Length': '246',
'Accept-Encoding': 'gzip, compress, deflate, br'
},
method: 'post',
url: 'http://192.168.88.44:4723/wd/hub/session/24488d4f-42ee-45f6-9071-d10fb32e30bf/actions',
data: '{"actions":[{"type":"pointer","id":"finger1","parameters":{"pointerType":"touch"},"actions":[{"type":"pointerMove","duration":0,"x":305,"y":254},{"type":"pointerDown","button":0},{"type":"pause","duration":100},{"type":"pointerUp","button":0}]}]}'
},
request: <ref *1> Writable {
_events: {
close: undefined,
error: [Function: handleRequestError],
prefinish: undefined,
finish: undefined,
drain: undefined,
response: [Function: handleResponse],
socket: [Array],
timeout: undefined,
abort: undefined
},
_writableState: WritableState {
highWaterMark: 65536,
length: 0,
corked: 0,
onwrite: [Function: bound onwrite],
writelen: 0,
bufferedIndex: 0,
pendingcb: 0,
[Symbol(kState)]: 17580812,
[Symbol(kBufferedValue)]: null
},
_maxListeners: undefined,
_options: {
maxRedirects: 21,
maxBodyLength: Infinity,
protocol: 'http:',
path: '/wd/hub/session/24488d4f-42ee-45f6-9071-d10fb32e30bf/actions',
method: 'POST',
headers: [Object: null prototype],
agents: [Object],
auth: undefined,
family: undefined,
beforeRedirect: [Function: dispatchBeforeRedirect],
beforeRedirects: [Object],
hostname: '192.168.88.44',
port: '4723',
agent: undefined,
nativeProtocols: [Object],
pathname: '/wd/hub/session/24488d4f-42ee-45f6-9071-d10fb32e30bf/actions'
},
_ended: false,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 246,
_requestBodyBuffers: [ [Object] ],
_eventsCount: 3,
_onNativeResponse: [Function (anonymous)],
_currentRequest: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: '246',
_hasBody: true,
_trailer: '',
finished: false,
_headerSent: true,
_closed: false,
_header: 'POST /wd/hub/session/24488d4f-42ee-45f6-9071-d10fb32e30bf/actions HTTP/1.1\r\n' +
'Accept: application/json, text/plain, */*\r\n' +
'Content-Type: application/json\r\n' +
'User-Agent: axios/1.7.2\r\n' +
'Content-Length: 246\r\n' +
'Accept-Encoding: gzip, compress, deflate, br\r\n' +
'Host: 192.168.88.44:4723\r\n' +
'Connection: keep-alive\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: '/wd/hub/session/24488d4f-42ee-45f6-9071-d10fb32e30bf/actions',
_ended: false,
res: null,
aborted: false,
timeoutCb: [Function: emitRequestTimeout],
upgradeOrConnect: false,
parser: [HTTPParser],
maxHeadersCount: null,
reusedSocket: false,
host: '192.168.88.44',
protocol: 'http:',
_redirectable: [Circular *1],
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kChunkedBuffer)]: [],
[Symbol(kChunkedLength)]: 0,
[Symbol(kSocket)]: [Socket],
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 65536,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null
},
_currentUrl: 'http://192.168.88.44:4723/wd/hub/session/24488d4f-42ee-45f6-9071-d10fb32e30bf/actions',
_timeout: null,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false
}
}
[device-farm-main] AxiosError: timeout of 5000ms exceeded
[device-farm-main] at RedirectableRequest.handleRequestTimeout (/Users/alekseybulygin/.appium/node_modules/appium-device-farm/node_modules/axios/lib/adapters/http.js:647:16)
[device-farm-main] at RedirectableRequest.emit (node:events:520:28)
[device-farm-main] at Timeout.<anonymous> (/Users/alekseybulygin/.appium/node_modules/appium-device-farm/node_modules/follow-redirects/index.js:210:12)
[device-farm-main] at listOnTimeout (node:internal/timers:573:17)
[device-farm-main] at processTimers (node:internal/timers:514:7)
[device-farm-main] at Axios.request (/Users/alekseybulygin/.appium/node_modules/appium-device-farm/node_modules/axios/lib/core/Axios.js:45:41)
[device-farm-main] at runNextTicks (node:internal/process/task_queues:60:5)
[device-farm-main] at listOnTimeout (node:internal/timers:540:9)
[device-farm-main] at processTimers (node:internal/timers:514:7)
[device-farm-main] Promise:
[device-farm-main] [object Promise]
@nskcashHH Can you try with latest version 8.4.7-rc.39
@saikrishna321 I launched version 8.4.7-rc.39 and it got much better. On Android, device management works without much delay. But on iOS, the control happens, but the picture is not automatically updated in the browser, they come after each action to refresh the browser page so that the current screen is displayed. I'm trying it on the iPhone and on the simulator. There is a delay of more than 30 seconds on the stimulator, and the image does not update automatically on the iPhone. I repeat that on android the delay is only a few seconds, not smoothly, but the frames are updated and this can generally be used.
maybe I had some problems on the local network, it's working well now.
Hi! I run remote control through the farm, a window opens with an endless download, and the session closes after a timeout. I haven't been able to figure out what's wrong for a long time? I try both on stimulants and on real devices. The startup process and all actions are attached below.
Appium 2.5.4 Farm 8.4.7-rc.37 MAC OS 14.4.1 M1 Pro