Skip to content

better error message when WebDriver/Selenium not available #50146

Closed

Description

@zanderso

From crash logging for the flutter drive -d chrome command on master/1.14.7-pre.101 First seen in master/1.14.7-pre.27.

@jonahwilliams @angjieli

SocketException: Connection failed (OS Error: No connection could be made because the target machine actively refused it., errno = 10061), address = localhost, port = 4444
  | at _NativeSynchronousSocket.connectSync.connectNext | (sync_socket_patch.dart:91 )
  | at _NativeSynchronousSocket.connectSync.connectNext | (sync_socket_patch.dart:102 )
  | at _NativeSynchronousSocket.connectSync.connectNext | (sync_socket_patch.dart:102 )
  | at _NativeSynchronousSocket.connectSync | (sync_socket_patch.dart:118 )
  | at _RawSynchronousSocket.connectSync | (sync_socket_patch.dart:25 )
  | at RawSynchronousSocket.connectSync | (sync_socket_patch.dart:13 )
  | at new SyncHttpClientRequest._ | (sync_http.dart:67 )
  | at SyncHttpClient.postUrl | (sync_http.dart:20 )
  | at SyncHttpRequestClient.sendRaw | (sync_http_request_client.dart:20 )
  | at SyncRequestClient.send | (request_client.dart:46 )
  | at createDriver | (sync_core.dart:63 )
  | at createDriver | (sync_io.dart:35 )
  | at _createDriver | (drive.dart:441 )
  | at DriveCommand.runCommand | (drive.dart:182 )
  | at <asynchronous gap> | (async )
  | at FlutterCommand.verifyThenRunCommand | (flutter_command.dart:639 )
  | at <asynchronous gap> | (async )
  | at FlutterCommand.run.<anonymous closure> | (flutter_command.dart:537 )
  | at <asynchronous gap> | (async )
  | at AppContext.run.<anonymous closure> | (context.dart:150 )
  | at _rootRun | (zone.dart:1126 )
  | at _CustomZone.run | (zone.dart:1023 )
  | at _runZoned | (zone.dart:1518 )
  | at runZoned | (zone.dart:1465 )
  | at AppContext.run | (context.dart:149 )
  | at FlutterCommand.run | (flutter_command.dart:527 )
  | at CommandRunner.runCommand | (command_runner.dart:197 )
  | at FlutterCommandRunner.runCommand.<anonymous closure> | (flutter_command_runner.dart:338 )
  | at <asynchronous gap> | (async )
  | at AppContext.run.<anonymous closure> | (context.dart:150 )
  | at _rootRun | (zone.dart:1126 )
  | at _CustomZone.run | (zone.dart:1023 )
  | at _runZoned | (zone.dart:1518 )
  | at runZoned | (zone.dart:1465 )
  | at AppContext.run | (context.dart:149 )
  | at FlutterCommandRunner.runCommand | (flutter_command_runner.dart:288 )
  | at CommandRunner.run.<anonymous closure> | (command_runner.dart:112 )
  | at new Future.sync | (future.dart:224 )
  | at CommandRunner.run | (command_runner.dart:112 )
  | at FlutterCommandRunner.run | (flutter_command_runner.dart:231 )
  | at run.<anonymous closure>.<anonymous closure> | (runner.dart:64 )
  | at _rootRun | (zone.dart:1126 )
  | at _CustomZone.run | (zone.dart:1023 )
  | at _runZoned | (zone.dart:1518 )
  | at runZoned | (zone.dart:1502 )
  | at run.<anonymous closure> | (runner.dart:62 )
  | at <asynchronous gap> | (async )
  | at AppContext.run.<anonymous closure> | (context.dart:150 )
  | at _rootRun | (zone.dart:1126 )
  | at _CustomZone.run | (zone.dart:1023 )
  | at _runZoned | (zone.dart:1518 )
  | at runZoned | (zone.dart:1465 )
  | at AppContext.run | (context.dart:149 )
  | at runInContext | (context_runner.dart:64 )
  | at run | (runner.dart:51 )
  | at main | (executable.dart:65 )
  | at main | (flutter_tools.dart:8 )
  | at _startIsolate.<anonymous closure> | (isolate_patch.dart:299 )
  | at _RawReceivePortImpl._handleMessage | (isolate_patch.dart:168 )

Activity

  1. added
    c: crashStack traces logged to the console
    toolAffects the "flutter" command-line tool. See also t: labels.
    platform-webWeb applications specifically
    on Feb 4, 2020
  2. angjieli commented on Feb 6, 2020

    @angjieli
    Contributor

    Currently, Flutter Drive command not support running test like this. In addition, it requires WebDriver binary to be launched beforehand.
    As for now, I will add some safeguard to prevent crash from happening.

  3. changed the title [-]flutter drive webdriver connection refused crash[/-] [+]better error message when WebDriver/Selenium not available[/+] on Feb 6, 2020
  4. added this to the milestone on Feb 6, 2020
  5. nturgut commented on Feb 11, 2020

    @nturgut
    Contributor

    The steps to run a drive test with the web:

    • install the browser driver for the particular browser in use. (ex chrome)
    • install java
    • install selenium server standalone.
    • run selenium server.
    • flutter run -d chrome/web-server (for the application to be tested with driver. any mode is fine so one can add --profile or --release)
    • flutter drive --target=the_driver_test.dart -v --use-existing-app=address_of_application

    I definitely agree, we should make it simpler or give better errors. I am noting them here so if anybody wants to use flutter driver with web.

  6. ferhatb commented on Mar 31, 2020

    @ferhatb
    Contributor

    @angjieli , thank you for contribution. Can we close issue ?

  7. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Mar 31, 2020
  8. angjieli commented on Mar 31, 2020

    @angjieli
    Contributor

    Sure. Closing.

  9. lock commented on Apr 15, 2020

    @lock

    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 -v and a minimal reproduction of the issue.

  10. locked and limited conversation to collaborators on Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: crashStack traces logged to the consoleplatform-webWeb applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions