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

setcontext throws error when available contexts are only NATIVE_APP and CHROMIUM #143

Closed
rkavalap opened this issue May 11, 2016 · 3 comments

Comments

@rkavalap
Copy link

rkavalap commented May 11, 2016

Hybrid app based app using crosswalk web driver. Testing on real devices.
Works with appium 1.3.5 with crosswalk web driver.

Latest version 1.5.2 throws error.
Based on investigation
Latest version throws NoSuchContextError()

If the available contexts are only NATIVE_APP, CHROMIUM, I would expect the defaults to be chosen from one of them instead of WEBVIEW_{apppackage}.

v1.3.5 was exiting gracefully
return cb(null, {
status: status.codes.NoSuchContext.code
, value: "Context '" + name + "' does not exist"
});

code paths where it's called

this.defaultWebviewName called from initautowebview (lib/driver.js) - line no 202
The above line is based on appium server flags autowebview (true, false)

this.defaultWebviewName called from setcontext (lib/commands/context.js) - line no 39
function itself is present in context.js at line no 89

@rkavalap rkavalap changed the title defaultWebviewName uses pattern WEBVIEW_{apppackage}, when available contexts are only NATIVE_APP and Chromium setcontext throws error when available contexts are only NATIVE_APP and CHROMIUM May 13, 2016
@imurchie
Copy link
Contributor

Can you provide the full server logs? We don't have enough information to go on at the moment.

@rkavalap
Copy link
Author

@imurchie
appium v1.5.2 log
I added a logging statement before android driver shutdown.
https://gist.github.com/rkavalap/57e6592b466dc1e9d92bbb03cc17090b

@rkavalap
Copy link
Author

rkavalap commented Dec 2, 2016

This bug is related to and should get fixed with
appium/appium#4597

@rkavalap rkavalap closed this as completed Dec 2, 2016
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

2 participants