leancodepl / patrol

Flutter-first UI testing framework. Ready for action!
https://patrol.leancode.co
Apache License 2.0
872 stars 128 forks source link

`patrol develop` throws an exception when app under test is in background and user is trying to hot restart #2069

Open jBorkowska opened 8 months ago

jBorkowska commented 8 months ago
hot restart failed to complete: _flutter.runInView: (-32000) Could not run configuration in engine.
        #0      new _OutstandingRequest (package:vm_service/src/vm_service.dart:1930:45)
        #1      VmService._call (package:vm_service/src/vm_service.dart:2499:21)
        #2      VmService.callServiceExtension (package:vm_service/src/vm_service.dart:2470:14)
        #3      VmService.callMethod (package:vm_service/src/vm_service.dart:2452:12)
        #4      FlutterVmService.callMethodWrapper (package:flutter_tools/src/vmservice.dart:501:28)
        #5      FlutterVmService.runInView (package:flutter_tools/src/vmservice.dart:580:11)
        <asynchronous suspension>
        #6      Future.wait.<anonymous closure> (dart:async/future.dart:523:21)
        <asynchronous suspension>
        #7      HotRunner._launchInView (package:flutter_tools/src/run_hot.dart:570:5)
        <asynchronous suspension>
        #8      Future.wait.<anonymous closure> (dart:async/future.dart:523:21)
        <asynchronous suspension>
        #9      HotRunner._launchFromDevFS (package:flutter_tools/src/run_hot.dart:590:5)
        <asynchronous suspension>
        #10     HotRunner._restartFromSources (package:flutter_tools/src/run_hot.dart:691:5)
        <asynchronous suspension>
        #11     HotRunner._fullRestartHelper (package:flutter_tools/src/run_hot.dart:812:16)
        <asynchronous suspension>
        #12     HotRunner.restart (package:flutter_tools/src/run_hot.dart:752:38)
        <asynchronous suspension>
        #13     TerminalHandler._commonTerminalInputHandler (package:flutter_tools/src/resident_runner.dart:1790:40)
        <asynchronous suspension>
        #14     TerminalHandler.processTerminalInput (package:flutter_tools/src/resident_runner.dart:1830:7)
        <asynchronous suspension>

        Error connecting to the service protocol: Exception: connection to device ended too early
piotruela commented 8 months ago

@jBorkowska Can you please write some more information about it? I tried to reproduce this on iOS but for me it works fine (it starts the test from the beginning).