facebookarchive / WebDriverAgent

A WebDriver server for iOS that runs inside the Simulator.
Other
4.15k stars 1.38k forks source link

Matched JSONWP error code 13 to UnknownError #1080

Open aureliendelrue opened 5 years ago

aureliendelrue commented 5 years ago

The problem

For some test cases, we have the following error Matched JSONWP error code 13 to UnknownError when interacting with an element. We don't understand why it's not working and we need help please. Test cases are working fine on Android devices.

Example : [WD Proxy][39m Got an unexpected response: {"value":"Error Domain=com.facebook.WebDriverAgent Code=1 \"Unsupported origin type '{\n ELEMENT = 5000;\n \"element-6066-11e4-a52e-4f735466cecf\" = 5000;\n}' is set for '{\n duration = 100;\n origin = {\n ELEMENT = 5000;\n \"element-6066-11e4-a52e-4f735466cecf\" = 5... [debug][35m[MJSONWP][39m Matched JSONWP error code 13 to UnknownError [debug][35m[XCUITest][39m Connection to WDA timed out [debug][35m[iProxy][39m recv failed: Operation not permitted [debug][W3C (2088b021)][39m Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: Error Domain=com.facebook.WebDriverAgent Code=1 "Unsupported origin type '{ [debug] [W3C (2088b021)][39m ELEMENT = 5000; [debug] [W3C (2088b021)][39m "element-6066-11e4-a52e-4f735466cecf" = 5000; [debug] [W3C (2088b021)][39m }' is set for '{ [debug] [W3C (2088b021)][39m duration = 100; [debug] [W3C (2088b021)][39m origin = { [debug] [W3C (2088b021)][39m ELEMENT = 5000; [debug] [W3C (2088b021)][39m "element-6066-11e4-a52e-4f735466cecf" = 5000; [debug] [W3C (2088b021)][39m }; [debug] [W3C (2088b021)][39m type = pointerMove; [debug] [W3C (2088b021)][39m x = 0; [debug] [W3C (2088b021)][39m y = 0; [debug] [W3C (2088b021)][39m }' action item. Supported origin types: ( [debug] [W3C (2088b021)][39m pointer, [debug] [W3C (2088b021)][39m viewport [debug] [W3C (2088b021)][39m ) or an element instance" UserInfo={NSLocalizedDescription=Unsupported origin type '{ [debug] [W3C (2088b021)][39m ELEMENT = 5000; [debug][W3C (2088b021)][39m "element-6066-11e4-a52e-4f735466cecf" = 5000; [debug][W3C (2088b021)] }' is set for '{ [debug][W3C (2088b021)] duration = 100; [debug][W3C (2088b021)] origin = { [debug][W3C (2088b021)] ELEMENT = 5000; [debug][W3C (2088b021)] "element-6066-11e4-a52e-4f735466cecf" = 5000; [debug][W3C (2088b021)] }; [debug][W3C (2088b021)] type = pointerMove; [debug][35m[W3C (2088b021)] x = 0; [debug][W3C (2088b021)] y = 0; [debug][W3C (2088b021)] }' action item. Supported origin types: ( [debug][35m[W3C (2088b021)] pointer, [debug][35m[W3C (2088b021)] viewport [debug][W3C (2088b021)] ) or an element instance} [debug][W3C (2088b021)] at errorFromMJSONWPStatusCode (/Users/teamqualite/Documents/mobile-platform/iOS/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:789:10) [debug] [W3C (2088b021)] at ProxyRequestError.getActualError (/Users/teamqualite/Documents/mobile-platform/iOS/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:683:14) [debug] [W3C (2088b021)] at JWProxy.command (/Users/teamqualite/Documents/mobile-platform/iOS/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:234:19) [debug] [W3C (2088b021)] at <anonymous>

Environment

Details

Log Appium : GIST

mykola-mokhnach commented 5 years ago

It does not work, because W3C Actions are only supported in native context and you're trying to perform them on elements from the web context.

aureliendelrue commented 5 years ago

Hi @mykola-mokhnach, you mean Appium sends wrong command to WDA for a web context ?

mykola-mokhnach commented 5 years ago

No I mean Actions API is not supported by mobile Safari at all

aureliendelrue commented 5 years ago

@mykola-mokhnach I understand, so how can we test on safari mobile ? Maybe I forgot a capability in Appium to specify i'm testing on safari mobile...

Ganpal commented 5 years ago

I am seeing this issue on appium v.1.11 for Mac v10.13.6 on iOS Simulator v12.1

aureliendelrue commented 5 years ago

@Ganpal this issue and Appium issue are in standby... we should compare our capabilities, maybe we are missing something...

paulinedess commented 5 years ago

Hi, I got similar issue. Is there a way to test on safari @mykola-mokhnach ?