appium / java-client

Java language binding for writing Appium Tests, conforms to W3C WebDriver Protocol
Apache License 2.0
1.19k stars 754 forks source link

Appium 1.14.2 throwing NotImplementedError #1239

Open vsadineni1 opened 4 years ago

vsadineni1 commented 4 years ago

The problem

I am running appium version: 1.14.2 on my Mac machine (appium --port 4477) When I try to run a test against our iOS Hybrid app, after the App is launched we click on the EULA button.

In my test, the app has launched successfully & I got a session back from appium server. After that the appium server is throwing the below not implemented exception

[HTTP] --> POST /wd/hub/session/b5204b64-cf95-48bf-a18f-579d14a6802c/execute/sync [HTTP] {"args":[{"element-6066-11e4-a52e-4f735466cecf":"20000000-0000-0000-F811-010000000000"}],"script":"return (function(){return function(){var k=this;function l(a){return void 0!==a}function m(a){return\"string\"==typeof a}function aa(a,b){a=a.split(\".\");var c=k;a[0]in c||!c.execScript||c.execScript(\"var \"+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&l(b)?c[d]=b:c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}}\nfunction ba(a){var b=typeof a;if(\"object\"==b)if(a){if(a instanceof Array)return\"array\";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(\"[object Window]\"==c)return\"object\";if(\"[object Array]\"==c||\"number\"==typeof a.length&&\"undefined\"!=typeof a.splice&&\"undefined\"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(\"splice\"))return\"array\";if(\"[object Function]\"==c||\"undefined\"!=typeof a.call&&\"undefined\"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(\"call\"))return\"function\"}else return\"null\";\nelse [debug] [W3C (b5204b64)] Calling AppiumDriver.execute() with args: ["return (function(){return function(){var k=this;function l(a){return void 0!==a}function m(a){return\"string\"==typeof a}function aa(a,b){a=a.split(\".\");var c=k;a[0]in c||!c.execScript||c.execScript(\"var \"+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&l(b)?c[d]=b:c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}}\nfunction ba(a){var b=typeof a;if(\"object\"==b)if(a){if(a instanceof Array)return\"array\";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(\"[object Window]\"==c)return\"object\";if(\"[object Array]\"==c||\"number\"==typeof a.length&&\"undefined\"!=typeof a.splice&&\"undefined\"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(\"splice\"))return\"array\";if(\"[object Function]\"==c||\"undefined\"!=typeof a.call&&\"undefined\"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(\"call\"))return\"function\"}else return\"null\";\nelse if(\"function\"==b&&\"undefined\"==typeof a.call)return\"object\";return b}function ca(a,b,c){return a.call.apply(a.b... [debug] [XCUITest] Executing command 'execute' [debug] [W3C (b5204b64)] Encountered internal error running command: NotImplementedError: Method is not implemented [debug] [W3C (b5204b64)] at XCUITestDriver.execute (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/execute.js:13:11) [debug] [W3C (b5204b64)] at /usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/driver.js:305:66 [debug] [W3C (b5204b64)] at tryCatcher (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/util.js:16:23) [debug] [W3C (b5204b64)] at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/promise.js:517:31) [debug] [W3C (b5204b64)] at Promise._settlePromise (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/promise.js:574:18) [debug] [W3C (b5204b64)] at Promise._settlePromiseCtx (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/promise.js:611:10) [debug] [W3C (b5204b64)] at _drainQueueStep (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/async.js:142:12) [debug] [W3C (b5204b64)] at _drainQueue (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/async.js:131:9) [debug] [W3C (b5204b64)] at Async._drainQueues (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/async.js:147:5) [debug] [W3C (b5204b64)] at Immediate.Async.drainQueues (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/async.js:17:14) [debug] [W3C (b5204b64)] at processImmediate (internal/timers.js:439:21) [HTTP] <-- POST /wd/hub/session/b5204b64-cf95-48bf-a18f-579d14a6802c/execute/sync 405 9 ms - 1351

Environment

Details

If necessary, describe the problem you have been experiencing in more detail.

Link to Appium logs

https://gist.github.com/vsadineni1/004c4b2677db94abf15a1d16c2d6dcd5

Code To Reproduce Issue [ Good To Have ]

A similar issue is being reported by some other developer here - https://discuss.appium.io/t/method-is-not-implemented-error-for-native-ios-app/26965

mykola-mokhnach commented 4 years ago

This the problem of an outdated client

vsadineni1 commented 4 years ago

@mykola-mokhnach - do you mean my java client is out dated? Currently we are using appium java-client version: 3.2.0.

KazuCocoa commented 4 years ago

The latest one is 7.2

Akhila666 commented 4 years ago

hi

i am using latest version of java client 7.2.0

but i am facing same issue . please help me ...

p0well493 commented 4 years ago

hi

i am using latest version of java client 7.2.0

but i am facing same issue . please help me ...

Hi,

Have you solved the issue you encountered? I am also encountering the same issue - org.openqa.selenium.UnsupportedCommandException: Method is not implemented

ravireddy07 commented 2 years ago

Anyone got the solution..? I'm able to lanuch one app without any error, but not the other app.... getting This error.

org.openqa.selenium.UnsupportedCommandException: Method is not implemented

BorisPotapov commented 2 years ago

I see the same problem.

@ravireddy07 maybe you found something?

ravireddy07 commented 2 years ago

I see the same problem.

@ravireddy07 maybe you found something?

I didn't remember exactly what fixed this... but, changing the debug build worked for me...

plakha commented 2 years ago

@ravireddy07 Can you elaborate what you mean by changing the debug build? If anyone got around this, can one update?

ravireddy07 commented 2 years ago

@ravireddy07 Can you elaborate what you mean by changing the debug build? If anyone got around this, can one update?

There is something wrong with my build I guess, when I tried it on a new build, It worked for me. Don't know the exact reason, but worked for me without any change apart from the build.

rjtvalderrama commented 4 months ago

Hi everyone, was there any particular solution to this error? I'm getting the same error as well. My appium and uiautomator is already updated

mazis0 commented 3 months ago

same issue, when switch context from flutter to android (uiautomator2) and perform swipe action. any solution?

ravireddy07 commented 3 months ago

@mazis0 Confirm that the app is set to either flutter/native context while building/releasing the build only. I had the same issue while releasing the build we set to native context & it worked well.

mazis0 commented 3 months ago

@ravireddy07 1 already set to native but didn work