Repository navigation
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consolef: integration_testThe flutter/packages/integration_test pluginThe flutter/packages/integration_test pluginplatform-webWeb applications specificallyWeb applications specificallyr: solvedIssue is closed as solvedIssue is closed as solvedteam-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform teamTriaged by Web platform team
Description
Command
flutter drive --driver=integration_test/test_driver/integration_test.dart --target=integration_test/login_test.dart -d web-server --browser-name chrome --headless
Steps to Reproduce
- When using selenium/chrome-standalone image as chrome test instance
Logs
UnknownException
#0 parseW3cResponse (package:webdriver/src/handler/w3c/utils.dart:99:9)
#1 W3cSessionHandler.parseCreateResponse (package:webdriver/src/handler/w3c/session.dart:19:21)
#2 InferSessionHandler.parseCreateResponse (package:webdriver/src/handler/infer_handler.dart:103:34)
#3 AsyncRequestClient.send (package:webdriver/src/common/request_client.dart:96:32)
<asynchronous suspension>
#4 createDriver (package:webdriver/async_core.dart:64:19)
<asynchronous suspension>
#5 WebDriverService.startTest (package:flutter_tools/src/drive/web_driver_service.dart:141:19)
<asynchronous suspension>
#6 DriveCommand.runCommand (package:flutter_tools/src/commands/drive.dart:274:30)
<asynchronous suspension>
#7 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1183:27)
<asynchronous suspension>
#8 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#9 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#10 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
<asynchronous suspension>
#11 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#12 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
<asynchronous suspension>
#13 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
[✓] Flutter (Channel unknown, 3.0.1, on macOS 13.0.1 22A400 darwin-arm, locale pl-PL)
• Flutter version 3.0.1 at /opt/homebrew/Caskroom/flutter/3.7.0/flutter
• Upstream repository unknown
• Framework revision fb57da5f94 (10 months ago), 2022-05-19 15:50:29 -0700
• Engine revision caaafc5604
• Dart version 2.17.1
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/arkadiuszkwiatkowski/Library/Android/sdk
• Platform android-33, build-tools 31.0.0
• ANDROID_HOME = /Users/arkadiuszkwiatkowski/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 71.0.2
• Dart plugin version 212.5744
[✓] Connected device (3 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.0.1 22A400 darwin-arm
• Web Server (web) • web-server • web-javascript • Flutter Tools
• Chrome (web) • chrome • web-javascript • Google Chrome 111.0.5563
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consolef: integration_testThe flutter/packages/integration_test pluginThe flutter/packages/integration_test pluginplatform-webWeb applications specificallyWeb applications specificallyr: solvedIssue is closed as solvedIssue is closed as solvedteam-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform teamTriaged by Web platform team
Activity
darshankawar commentedon Mar 29, 2023
@kwiatek91
Can you upgrade to latest stable or master and run your scenario again to see if the crash still occurs or not ?
kwiatek91 commentedon Mar 29, 2023
Same story problem is visible only when I try to run chrome driver from selenium/chrome-standalone docker image I try to use 110 tag
When I run the same command on my local machine with chrome installed, there is no issue
Maybe I should try to pass chrome options but IDK if flutter supports such possibility, I can't find anything about this in docs
Command
Logs
UnknownException
darshankawar commentedon Mar 29, 2023
Thanks for the update. Keeping this issue open and labeling for team's attention.
darshankawar commentedon Mar 29, 2023
/cc @yjbanov and @christopherfujino for thoughts.
yjbanov commentedon Mar 30, 2023
The removal of jsonwire was intentional. I was told by WebDriver maintainers that it's deprecated and is going away.
#122560
For now, a solution is to not upgrade the Flutter SDK and upgrade the test browser instead. Unfortunately, I don't know how to do it with Selenium. We don't test Flutter with Selenium.
kwiatek91 commentedon Mar 31, 2023
@yjbanov
On my machine, I have local installed chrome ver 111 and flutter 3.0.1
run flutter drive command and everything looks ok
I tested this also with flutter 3.7.8 a chrome ver 111
Everything was also ok, there's no problem
My goal is: prepare run test on GitLabCi, this is why I use image with preinstalled chrome and chromedriver: selenium/standalone-chrome/111.0
To test the solution I shut down my local chromedrvier and then run on my local machine a new docker container (standalone-chrome) and when I try to run the same flutter drive command then I always got w3c error
Logs from container:
docker standalone chrome logs.txt
yjbanov commentedon Apr 2, 2023
Setting to P4, but honestly I don't know enough about Selenium to be confident that I can fix this. Moreover, we don't test with Selenium, so it has worked by accident. According to https://www.lambdatest.com/blog/selenium4-w3c-webdriver-protocol/ Selenium supports W3C mode, so I'm not sure what the problem is.
From the logs, Selenium is trying to parse chromedriver options and chokes on
goog:chromeOptionssetting.Right now it seems like a bug in Selenium. It should accept that key and pass it to Chrome. We need those options to be able to run tests. Also, apparently is supported it in jsonwire mode. So maybe they just forgot to implement it in their W3C?
kwiatek91 commentedon Apr 4, 2023
If I find any solution to this problem, I will post details here.
kwiatek91 commentedon Apr 19, 2023
Currently I resign from using docker image and I created a shell gitlabci runner with linux and installed GUI that solution works for me. ;)
But still it bothering me
I didnt find any solution for docker runner (why flutter drive freez after start flutter drive command).
I create my own dockerfile but still didnt help
then in script I install chrome browser, starting chromedrvier and then flutter drive command
like this:
then it freez on run
part of logs:
HugoLeapFinancial commentedon Aug 1, 2023
HI
I am using
[✓] Flutter (Channel stable, 3.10.6, on macOS 13.4.1 22F770820d darwin-x64, locale en-AR)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.80.2)
[✓] Connected device (3 available)
[✓] Network resources
And I have the same problem with ChromeDriver()
The error => Oops; flutter has exited unexpectedly: "UnknownException (500): unknown error: cannot find Chrome binary".
kwiatek91 commentedon Aug 2, 2023
@HugoLeapFinancial
SeleniumHQ/selenium#12381 -> i think this was your issue
kwiatek91 commentedon Aug 2, 2023
We can close this issue.
We resolved problem how to run integration test (web chrome) on docker environment
Chrome cannot be used as root user if you create docker image, you must remember this and everything will work as on native solution
github-actions commentedon Aug 21, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.