dryark / ios_remote_provider

Other
49 stars 33 forks source link

Automatic video app start only works with english language setting #32

Open chewbacca70 opened 3 years ago

chewbacca70 commented 3 years ago

Hi,

starting the video automatically doesn't work an all devices. I tested with: iphone 6S - works iphone X - failed iphone SE 2nd gen - failed

Provider log for the SE 2nd gen says: 6 ProductType:iPhone12,8 ProductVersion:14.5.1 UniqueDeviceID:00008030-0001111414FA402E]" type=devInfo uuid="***402E" Notified control floor of 'device info'; uuid=***402E Starting bin/iosif with [tunnel -id 00008030-0001111414FA402E 8102:8100] INFO[0001] Process start - tunnel_8102->8100 binary=bin/iosif proc="tunnel_8102->8100" type=proc_start id = 00008030-0001111414FA402E port = 8105 INFO[0001] Process start - backupVideo binary=bin/iosif id=00008030-0001111414FA402E port=8105 proc=backupVideo type=proc_start INFO[0001] Process start - wda binary=/usr/local/lib/python3.9/site-packages/../../../bin/tidevice proc=wda type=proc_start INFO[0002] listening on tcp://127.0.0.1:8105 proc=backupVideo listening on tcp://127.0.0.1:8105 Error creating session: Post "http://127.0.0.1:8102/session": read tcp 127.0.0.1:52458->127.0.0.1:8102: read: connection reset by peer Retrying INFO[0003] [WDA] successfully started port=8102 proc=wda type=wda_start uuid="***402E" INFO[0003] [WDA] successfully started port=8102 type=wda_start udid="***402E" Notified control floor of 'wda start'; uuid=***402E Finding element named Broadcast Selector Posting to http://127.0.0.1:8102/session/983D9B28-F687-4894-8951-C105322467F5/element Result: { "value" : { "ELEMENT" : "04000000-0000-0000-914A-000000000000", "element-6066-11e4-a52e-4f735466cecf" : "04000000-0000-0000-914A-000000000000" }, "sessionId" : "983D9B28-F687-4894-8951-C105322467F5" } Posting to http://127.0.0.1:8102/session/983D9B28-F687-4894-8951-C105322467F5/element/04000000-0000-0000-914A-000000000000/click Result: { "value" : null, "sessionId" : "983D9B28-F687-4894-8951-C105322467F5" } Finding element named Start Broadcast Posting to http://127.0.0.1:8102/session/983D9B28-F687-4894-8951-C105322467F5/element Result: { "value" : { "error" : "no such element", "message" : "unable to find an element using 'name', value 'Start Broadcast'", "traceback" : "(\n\t0 WebDriverAgentLib 0x0000000107d70268 FBNoSuchElementErrorResponseForRequest + 312\n\t1 WebDriverAgentLib 0x0000000107d70044 +[FBFindElementCommands handleFindElement:] + 352\n\t2 WebDriverAgentLib 0x0000000107d34a7c -[FBRoute_TargetAction mountRequest:intoResponse:] + 196\n\t3 WebDriverAgentLib 0x0000000107d14910 __37-[FBWebServer registerRouteHandlers:]_block_invoke + 448\n\t4 WebDriverAgentLib 0x0000000107d56120 -[RoutingHTTPServer handleRoute:withRequest:response:] + 160\n\t5 WebDriverAgentLib 0x0000000107d56b6c __72-[RoutingHTTPServer routeMethod:withPath:parameters:request:connection:]_block_invoke + 68\n\t6 libdispatch.dylib 0x000000018ec667ec FFC93E7E-8360-32A0-9EB5-FE3761B8C90A + 18412\n\t7 libdispatch.dylib 0x000000018ec759bc FFC93E7E-8360-32A0-9EB5-FE3761B8C90A + 80316\n\t8 libdispatch.dylib 0x000000018ec667ec FFC93E7E-8360-32A0-9EB5-FE3761B8C90A + 18412\n\t9 libdispatch.dylib 0x000000018ec74c40 _dispatch_main_queue_callback_4CF + 884\n\t10 CoreFoundation 0x000000018eff31f8 58500388-BF36-397C-84CF-17315A3445B6 + 668152\n\t11 CoreFoundation 0x000000018efed0d0 58500388-BF36-397C-84CF-17315A3445B6 + 643280\n\t12 CoreFoundation 0x000000018efec1c0 CFRunLoopRunSpecific + 600\n\t13 Foundation 0x00000001902ccfac 63D26DEE-A1FB-34B0-9ADA-CC52E7F1D60C + 32684\n\t14 WebDriverAgentLib 0x0000000107d13610 -[FBWebServer startServing] + 368\n\t15 WebDriverAgentRunner 0x000000010797bb44 -[UITestingUITests testRunner] + 92\n\t16 CoreFoundation 0x000000018f07e874 58500388-BF36-397C-84CF-17315A3445B6 + 1239156\n\t17 CoreFoundation 0x000000018ef51ba4 58500388-BF36-397C-84CF-17315A3445B6 + 7076\n\t18 XCTest 0x0000000104cba808 __24-[XCTestCase invokeTest]_block_invoke_3 + 56\n\t19 XCTest 0x0000000104cba7b4 __24-[XCTestCase invokeTest]_block_invoke_2 + 344\n\t20 XCTest 0x0000000104d3a16c -[XCTMemoryChecker _assertInvalidObjectsDeallocatedAfterScope:] + 88\n\t21 XCTest 0x0000000104cc4e08 -[XCTestCase assertInvalidObjectsDeallocatedAfterScope:] + 72\n\t22 XCTest 0x0000000104cba610 __24-[XCTestCase invokeTest]_block_invoke.291 + 216\n\t23 XCTest 0x0000000104d19eac -[XCTestCase(XCTIssueHandling) _caughtUnhandledDeveloperExceptionPermittingControlFlowInterruptions:caughtInterruptionException:whileExecutingBlock:] + 180\n\t24 XCTest 0x0000000104cba0a8 -[XCTestCase invokeTest] + 1052\n\t25 XCTest 0x0000000104cbbea8 __26-[XCTestCase performTest:]_block_invoke_2 + 48\n\t26 XCTest 0x0000000104d19eac -[XCTestCase(XCTIssueHandling) _caughtUnhandledDeveloperExceptionPermittingControlFlowInterruptions:caughtInterruptionException:whileExecutingBlock:] + 180\n\t27 XCTest 0x0000000104cbbddc __26-[XCTestCase performTest:]_block_invoke.438 + 124\n\t28 XCTest 0x0000000104d2fda8 +[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 228\n\t29 XCTest 0x0000000104cbb618 -[XCTestCase performTest:] + 740\n\t30 XCTest 0x0000000104d022ac -[XCTest runTest] + 64\n\t31 XCTest 0x0000000104cb2f94 -[XCTestSuite runTestBasedOnRerunPolicy:testRun:] + 180\n\t32 XCTest 0x0000000104cb2de8 __27-[XCTestSuite performTest:]_block_invoke + 216\n\t33 XCTest 0x0000000104cb26c0 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 48\n\t34 XCTest 0x0000000104d2fda8 +[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 228\n\t35 XCTest 0x0000000104cb265c -[XCTestSuite _performProtectedSectionForTest:testSection:] + 192\n\t36 XCTest 0x0000000104cb29d0 -[XCTestSuite performTest:] + 292\n\t37 XCTest 0x0000000104d022ac -[XCTest runTest] + 64\n\t38 XCTest 0x0000000104cb2f94 -[XCTestSuite runTestBasedOnRerunPolicy:testRun:] + 180\n\t39 XCTest 0x0000000104cb2de8 __27-[XCTestSuite performTest:]_block_invoke + 216\n\t40 XCTest 0x0000000104cb26c0 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 48\n\t41 XCTest 0x0000000104d2fda8 +[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 228\n\t42 XCTest 0x0000000104cb265c -[XCTestSuite _performProtectedSectionForTest:testSection:] + 192\n\t43 XCTest 0x0000000104cb29d0 -[XCTestSuite performTest:] + 292\n\t44 XCTest 0x0000000104d022ac -[XCTest runTest] + 64\n\t45 XCTest 0x0000000104cb2f94 -[XCTestSuite runTestBasedOnRerunPolicy:testRun:] + 180\n\t46 XCTest 0x0000000104cb2de8 __27-[XCTestSuite performTest:]_block_invoke + 216\n\t47 XCTest 0x0000000104cb26c0 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 48\n\t48 XCTest 0x0000000104d2fda8 +[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 228\n\t49 XCTest 0x0000000104cb265c -[XCTestSuite _performProtectedSectionForTest:testSection:] + 192\n\t50 XCTest 0x0000000104cb29d0 -[XCTestSuite performTest:] + 292\n\t51 XCTest 0x0000000104d022ac -[XCTest runTest] + 64\n\t52 XCTest 0x0000000104d47924 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke_2 + 160\n\t53 XCTest 0x0000000104d2fda8 +[XCTContext runInContextForTestCase:markAsReportingBase:block:] + 228\n\t54 XCTest 0x0000000104d47874 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke + 148\n\t55 XCTest 0x0000000104d47a38 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke.104 + 116\n\t56 XCTest 0x0000000104cd0cec -[XCTestObservationCenter _observeTestExecutionForBlock:] + 340\n\t57 XCTest 0x0000000104d475c4 -[XCTTestRunSession runTestsAndReturnError:] + 504\n\t58 XCTest 0x0000000104c9676c -[XCTestDriver _runTests] + 464\n\t59 XCTest 0x0000000104d2a4b0 _XCTestMain + 100\n\t60 WebDriverAgentRunner-Runner 0x000000010483d5ac -[_XCTRunnerAppDelegate application:didFinishLaunchingWithOptions:] + 0\n\t61 WebDriverAgentRunner-Runner 0x000000010483d590 _XCTRunnerRunTests + 0\n\t62 CoreFoundation 0x000000018eff3578 58500388-BF36-397C-84CF-17315A3445B6 + 669048\n\t63 CoreFoundation 0x000000018eff27cc 58500388-BF36-397C-84CF-17315A3445B6 + 665548\n\t64 CoreFoundation 0x000000018efeca3c 58500388-BF36-397C-84CF-17315A3445B6 + 641596\n\t65 CoreFoundation 0x000000018efec1c0 CFRunLoopRunSpecific + 600\n\t66 GraphicsServices 0x00000001a65d4734 GSEventRunModal + 164\n\t67 UIKitCore 0x0000000191a5a7e4 186C18FD-1082-3811-A761-88E8376C7E69 + 12363748\n\t68 UIKitCore 0x0000000191a60054 UIApplicationMain + 168\n\t69 WebDriverAgentRunner-Runner 0x000000010483d7c0 main + 192\n\t70 libdyld.dylib 0x000000018eca8cf8 B08AB7C2-64E8-3937-9487-C33D0175FD34 + 7416\n)" }, "sessionId" : "983D9B28-F687-4894-8951-C105322467F5" } Posting to http://127.0.0.1:8102/session/983D9B28-F687-4894-8951-C105322467F5/element//click Result: { "value" : { "error" : "unknown command", "message" : "Unhandled endpoint: \/session\/983D9B28-F687-4894-8951-C105322467F5\/element\/\/click -- http:\/\/127.0.0.1:8102\/ with parameters {\n wildcards = (\n \"session\/983D9B28-F687-4894-8951-C105322467F5\/element\/\/click\"\n );\n}", "traceback" : "" }, "sessionId" : "983D9B28-F687-4894-8951-C105322467F5" } id = 00008030-0001111414FA402E Starting bin/iosif with [tunnel -id 00008030-0001111414FA402E 8103:8352 8104:8351] INFO[0018] Process start - syslogMonitor binary=bin/iosif id=00008030-0001111414FA402E proc=syslogMonitor type=proc_start INFO[0018] Process start - tunnel_8103->8352_8104->8351 binary=bin/iosif proc="tunnel_8103->8352_8104->8351" type=proc_start INFO[0019] Socket dial error err="read tcp 127.0.0.1:52463->127.0.0.1:8104: read: connection reset by peer" spec="tcp://127.0.0.1:8104" type=err_socket_dial Failed to connect video app control 5 times. Giving up.

chewbacca70 commented 3 years ago

here the log from the iphone 6s where it works perfect: `2583259 ProductType:iPhone8,1 ProductVersion:14.4.2 UniqueDeviceID:dc490c9beb4c3423b1102678f57eab21d2c20fc7]" type=devInfo uuid="0fc7" Notified control floor of 'device info'; uuid=0fc7 Starting bin/iosif with [tunnel -id dc490c9beb4c3423b1102678f57eab21d2c20fc7 8102:8100] INFO[0015] Process start - tunnel_8102->8100 binary=bin/iosif proc="tunnel_8102->8100" type=proc_start port = 8105 id = dc490c9beb4c3423b1102678f57eab21d2c20fc7 INFO[0015] Process start - backupVideo binary=bin/iosif id=dc490c9beb4c3423b1102678f57eab21d2c20fc7 port=8105 proc=backupVideo type=proc_start INFO[0015] Process start - wda binary=/usr/local/lib/python3.9/site-packages/../../../bin/tidevice proc=wda type=proc_start INFO[0015] listening on tcp://127.0.0.1:8105 proc=backupVideo listening on tcp://127.0.0.1:8105 Error creating session: Post "http://127.0.0.1:8102/session": read tcp 127.0.0.1:52645->127.0.0.1:8102: read: connection reset by peer Retrying Error creating session: Post "http://127.0.0.1:8102/session": read tcp 127.0.0.1:52646->127.0.0.1:8102: read: connection reset by peer Retrying INFO[0017] [WDA] successfully started port=8102 proc=wda type=wda_start uuid="0fc7" INFO[0017] [WDA] successfully started port=8102 type=wda_start udid="0fc7" Notified control floor of 'wda start'; uuid=***0fc7 Finding element named Broadcast Selector Posting to http://127.0.0.1:8102/session/113A3F38-D7EE-4F21-9ED3-4632938B1119/element Result: { "value" : { "ELEMENT" : "04000000-0000-0000-EB09-000000000000", "element-6066-11e4-a52e-4f735466cecf" : "04000000-0000-0000-EB09-000000000000" }, "sessionId" : "113A3F38-D7EE-4F21-9ED3-4632938B1119" } Posting to http://127.0.0.1:8102/session/113A3F38-D7EE-4F21-9ED3-4632938B1119/element/04000000-0000-0000-EB09-000000000000/click Result: { "value" : null, "sessionId" : "113A3F38-D7EE-4F21-9ED3-4632938B1119" } Finding element named Start Broadcast Posting to http://127.0.0.1:8102/session/113A3F38-D7EE-4F21-9ED3-4632938B1119/element Result: { "value" : { "ELEMENT" : "EC010000-0000-0000-3900-000000000000", "element-6066-11e4-a52e-4f735466cecf" : "EC010000-0000-0000-3900-000000000000" }, "sessionId" : "113A3F38-D7EE-4F21-9ED3-4632938B1119" } Posting to http://127.0.0.1:8102/session/113A3F38-D7EE-4F21-9ED3-4632938B1119/element/EC010000-0000-0000-3900-000000000000/click Result: { "value" : null, "sessionId" : "113A3F38-D7EE-4F21-9ED3-4632938B1119" } id = dc490c9beb4c3423b1102678f57eab21d2c20fc7 Starting bin/iosif with [tunnel -id dc490c9beb4c3423b1102678f57eab21d2c20fc7 8103:8352 8104:8351] INFO[0035] Process start - syslogMonitor binary=bin/iosif id=dc490c9beb4c3423b1102678f57eab21d2c20fc7 proc=syslogMonitor type=proc_start INFO[0035] Process start - tunnel_8103->8352_8104->8351 binary=bin/iosif proc="tunnel_8103->8352_8104->8351" type=proc_start Connected to control port Attempting to connect to video Connected to video port Main loop start FIRSTFRAME{"type":"frame1","width":562,"height":1000,"uuid":"dc490c9beb4c3423b1102678f57eab21d2c20fc7"} Got incoming frame 30 Got incoming frame 60 Got incoming frame 90 Got incoming frame 120

chewbacca70 commented 3 years ago

Hi all, I figured out why it doesn't work on all of my devices. You need to make sure that the language of the device is set to "English" otherwise the Button "Start Broadcast" can't be found and the autostart of vidapp fails. Maybe this could be changed somehow to ID of the button if possible?

Cheers Chubbi

nanoscopic commented 3 years ago

Good and bad news.

Bad news: The button on that screen cannot be detected that way through WDA. It needs to have the text of the button.

Good news: I can just pull the DOM XML structure of the page instead, parse it, and figure out the needed text automatically. Will do so.