-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Can't switch context to webview " A new session could not be created" #16010
Comments
|
|
For some reason, pastebin deleted my previous paste, here it is: https://gist.github.com/lucaswxp/2316c8bede02cb575184958b80ce5362 |
The error message itself was by chromebrowser.
Did you see relevant logs in the locgat? |
Hey @KazuCocoa All I'm doing is calling setContext:
Should I somehow instruct This is more or less how I start the Kiwi Browser on the client side:
Then I try to switch context:
|
|
Hello, I inserted the
This had no effect, I still get:
|
Are you able to debug that web view using the native Chrome remote debugger? |
Also please make sure you use the most recent server version |
@mykola-mokhnach How can I debug the web view using the native Chrome remote debugger? I have some more verbose logging after enabled
|
This looks better. I'll try to do some changes based on this info, which might help to resolve this issue. |
For #16010 (comment) I thought https://github.com/appium/appium-android-driver/blob/4ec9994570bdf163b47b7318002a2d0b3687f128/lib/webview-helpers.js#L481-L484 set
but I guess |
Please attach the log from the most recent server version. I assume this functionality should work there |
https://gist.github.com/lucaswxp/0affcf867b11faada4fe2c5cb757271b On latest appium. The error message changed.
How can I configure the app for debugging? |
I don't know if it's relevant, but kiwi has a section about remote debugging: https://github.com/kiwibrowser/src/#remote-debugging |
You don't want to try to inspect from the device, rather you want to try and inspect the device from your desktop browser to see if it's accessible from the outside. |
The recent error most likely means that chromedriver won't be able to debug the webview and I don't think there's more we could do about it in Appium. |
The next step would be to try to automate it with Chromedriver directly, no Appium involved. If that is possible, then it can definitely work with Appium and it's just a matter of getting things hooked up correctly. If that's not possible, then it's also likely not possible with Appium (since Appium uses Chromedriver). Typically, if you can inspect via Chrome it's possible for Chromedriver to work, but as this is a new browser I've never heard of, I'm not sure. |
Logs with |
I have made a simple shell script that will reproduce the issue:
This is the Kiwi APK: https://drive.google.com/file/d/1pyBW6ZeQpS8rTHpeodtSxbJMPr8bwGYr/view?usp=sharing
@KazuCocoa Here is the full logs with |
@jlipps Do you have any resources on how to use chromedriver directly? Can I do this exclusively in the command line? In the official website there isn't much info. |
I'm gonna explain my use case, just in case you guys can share some insight... The only reason I need Kiwi is because the browser supports extensions/plugins, while Chrome doesn't. Extensions are just a list of extension files encoded as base64 and added to the chrome options inside the capabilities struct, could I somehow enable extensions on the mobile chrome app that way? |
Where did you learn this? Are you saying that Chromedriver automation of the Kiwi browser and extensions is definitely supported? But yeah you can run Chromedriver just like you run Appium. You'll need to construct different sets of capabilities but it's all the same protocol. |
@jlipps Not exactly what I meant. I meant that one can set
I'm trying to run Should I be instructing |
thanks the log,
is what appium starts the chromedriver.
is what appium sends. Some arguments works on both desktop and mobile chrome, but some are not. (We usually need to take a look at chromedriver's code or check the behavior) |
https://gist.github.com/KazuCocoa/4009aed4e22507439f0f1441484ff2aa
Then, I got
This is expected since the browser was not debuggable. I guess currently the browser is able to automate via DevTools Protocol. (but then it is not able to interact with native area) I haven't downloaded https://drive.google.com/file/d/1pyBW6ZeQpS8rTHpeodtSxbJMPr8bwGYr/view?usp=sharing , but if it was debuggable, and then also returned your attached error, I guess the browser does not support chromedriver interaction. |
I think this is the end of the line then. Thank you, you guys are awesome.
Em qui., 28 de out. de 2021 02:12, Kazuaki Matsuo ***@***.***>
escreveu:
… https://gist.github.com/KazuCocoa/4009aed4e22507439f0f1441484ff2aa
I downloaded the kiwi browser on my android device.
The capabilities were:
{
"platformName": "android",
"appium:automationName": "uiautomator2",
"appium:appPackage": "com.kiwibrowser.browser",
"appium:enableWebviewDetailsCollection": true,
"appium:appActivity": "com.google.android.apps.chrome.Main"
}
Then, I got
[WD Proxy] Got response with status 500: {"value":{"error":"unknown
error","message":"unknown error: Failed to get sockets matching:
@weblayer_devtools_remote_.*6414\n (make sure the app has its
WebView/WebLayer configured for debugging)","stacktrace":"0
chromedriver_mac64_v94.0.4606.61 0x00000001099815e9
chromedriver_mac64_v94.0.4606.61 + 2749929\n1
chromedriver_mac64_v94.0.4606.61 0x000000010a0385c3
chromedriver_mac64_v94.0.4606.61 + 9790915\n2
chromedriver_mac64_v94.0.4606.61 0x000000010970c828
chromedriver_mac64_v94.0.4606.61 + 174120\n3
chromedriver_mac64_v94.0.4606.61 0x00000001096ea166
chromedriver_mac64_v94.0.4606.61 + 33126\n4
chromedriver_mac64_v94.0.4606.61 0x00000001096f4cc4
chromedriver_mac64_v94.0.4606.61 + 76996\n5
chromedriver_mac64_v94.0.4606.61 0x00000001096f414d
chromedriver_mac64_v94.0.4606.61 + 74061\n6
chromedriver_mac64_v94.0.4606.61 0x000000010972b6e4
chromedriver_mac64_v94.0.4606.61 + 300772\n7
chromedriver_mac64_v94.0.4606.61 0x0000000109764233
chromedriver_mac64_v94.0.4606.61 + 5...
This is expected since the browser was not debuggable.
I just used a USB debuggable Android device. The view was inspectable via
chrome://inspect.
I guess currently the browser is able to automate via DevTools Protocol.
(but then it is not able to interact with native area)
I haven't downloaded
https://drive.google.com/file/d/1pyBW6ZeQpS8rTHpeodtSxbJMPr8bwGYr/view?usp=sharing
, but if it was debuggable, and then also returned your attached error, I
guess the browser does not support chromedriver interaction.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#16010 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABAB4U7UPVNLPL47EHN3ELUJDSTHANCNFSM5GWN2IKA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Yeah, sorry. Looks like there are only two possible ways forward:
|
The problem
Trying to automate "Kiwi Browser" on real device, but once the app is open, can't switch to web view context.
Environment
Details
Appium is unable to start a new session on the webview context, this what the appium server says:
Link to Appium logs
https://pastebin.com/rKsD6GyE
The text was updated successfully, but these errors were encountered: