Repository navigation
[flutter_tools] RPCError: resume: (-32000) Bad state: The client closed with pending request "resume". #139181
Description
Activity
- addedteam-toolOwned by Flutter Tool teamOwned by Flutter Tool team
on Nov 28, 2023 Recently, I've started to experience issues with hot reloading and restarting. It more often than not doesn't work. It freezes and I have to stop running my app in VS code and start running again. I'm getting the same error although my stack trace is different. It is super frustrating and slows my work down. I tried uninstalling Xcode and installing it again. I tried different Xcode versions but to no avail. I haven't tried uninstalling VS code or Flutter yet...
christopherfujino commented
on Dec 12, 2023 ContributorAuthorMore actions@DanTup WDYT about this one?
- addedP2Important issues not at the top of the work listImportant issues not at the top of the work listtriaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
on Dec 12, 2023 Hmm, this is odd... in the stack trace is
_withErrorHandlingand it seems like it intends to swallow exactly this kind of error:It's not yet clear to me how we could throw this error that is an RPCError with the code -32000 🤔
It happens even more often when I have breakpoints set.
@matthewfx do you have any steps to repro? Can you provide a screenshot of where this error shows up?
@DanTup Unfortunately, there are no steps to reproduce the issue, as it occurs quite randomly. At times, I can perform hot reloads or restarts multiple times before the issue arises, while at other times it happens on the very first attempt after building a project. The problem seems to occur more frequently when I'm debugging and the app pauses at breakpoints. It also happens across different projects. However, I haven't yet had the time to reinstall Visual Studio Code. I'm hoping that might resolve the issue. Once I find the time to do so, I will inform you if this solution proves effective.
christopherfujino commented
on Jan 3, 2024 ContributorAuthorMore actionsso our beta
3.18.0-0.2.prehas a crash rate almost 3x over our acceptable threshold, and most of the crashes are some form of this. For example:1
RPCError: resume: (-32000) Bad state: The client closed with pending request "resume". at new _OutstandingRequest(vm_service.dart:265) at VmService._call.<anonymous closure>(vm_service.dart:1771) at VmService._call(vm_service.dart:1783) at VmService.resume(vm_service.dart:1484) at IsolateManager._resume(isolate_manager.dart:347) at IsolateManager.resumeThread(isolate_manager.dart:281) at IsolateManager._handlePause(isolate_manager.dart:581) at <asynchronous gap>(async) at IsolateManager.handleEvent(isolate_manager.dart:203) at <asynchronous gap>(async) at DartDebugAdapter.handleDebugEvent(dart.dart:2282) at <asynchronous gap>(async) at DartDebugAdapter._withErrorHandling(dart.dart:2631) at <asynchronous gap>(async)2
RPCError: resume: (-32000) Bad state: The client closed with pending request "resume". at new _OutstandingRequest(vm_service.dart:265) at VmService._call.<anonymous closure>(vm_service.dart:1771) at VmService._call(vm_service.dart:1783) at VmService.resume(vm_service.dart:1484) at IsolateManager._resume(isolate_manager.dart:347) at IsolateManager.resumeThread(isolate_manager.dart:281) at DartDebugAdapter.continueRequest(dart.dart:809) at BaseDebugAdapter.handle(base_debug_adapter.dart:141) at BaseDebugAdapter.handleIncomingRequest(base_debug_adapter.dart:390) at BaseDebugAdapter._handleIncomingMessage(base_debug_adapter.dart:301) at ByteStreamServerChannel._readMessage(protocol_stream.dart:82) at ByteStreamServerChannel.listen.<anonymous closure>(protocol_stream.dart:53) at _rootRunUnary(zone.dart:1407) at _CustomZone.runUnary(zone.dart:1308) at _CustomZone.runUnaryGuarded(zone.dart:1217) at _BufferingStreamSubscription._sendData(stream_impl.dart:339) at _DelayedData.perform(stream_impl.dart:515) at _PendingEvents.handleNext(stream_impl.dart:620) at _PendingEvents.schedule.<anonymous closure>(stream_impl.dart:591) at _rootRun(zone.dart:1391) at _CustomZone.run(zone.dart:1301) at _CustomZone.runGuarded(zone.dart:1209) at _CustomZone.bindCallbackGuarded.<anonymous closure>(zone.dart:1249) at _rootRun(zone.dart:1399) at _CustomZone.run(zone.dart:1301) at _CustomZone.runGuarded(zone.dart:1209) at _CustomZone.bindCallbackGuarded.<anonymous closure>(zone.dart:1249) at _microtaskLoop(schedule_microtask.dart:40) at _startMicrotaskLoop(schedule_microtask.dart:49) at _runPendingImmediateCallback(isolate_patch.dart:118) at _RawReceivePort._handleMessage(isolate_patch.dart:185)3
RPCError: resume: (-32000) Bad state: The client closed with pending request "resume". at new _OutstandingRequest(vm_service.dart:265) at VmService._call.<anonymous closure>(vm_service.dart:1771) at VmService._call(vm_service.dart:1783) at VmService.resume(vm_service.dart:1484) at IsolateManager._resume(isolate_manager.dart:347) at IsolateManager.resumeThread(isolate_manager.dart:281) at IsolateManager._handlePause(isolate_manager.dart:591) at IsolateManager.handleEvent(isolate_manager.dart:203) at <asynchronous gap>(async) at DartDebugAdapter._configureExistingIsolates.<anonymous closure>(dart.dart:786) at <asynchronous gap>(async) at Future.wait.<anonymous closure>(future.dart:518) at <asynchronous gap>(async) at DartDebugAdapter._configureExistingIsolates(dart.dart:771) at <asynchronous gap>(async) at DartDebugAdapter._withErrorHandling(dart.dart:2631) at <asynchronous gap>(async) at DartDebugAdapter.connectDebugger(dart.dart:704) at <asynchronous gap>(async) at FlutterDebugAdapter._connectDebugger(flutter_adapter.dart:381) at <asynchronous gap>(async) at FlutterDebugAdapter._handleDebugPort(flutter_adapter.dart:462) at <asynchronous gap>(async)christopherfujino commented
on Jan 3, 2024 ContributorAuthorMore actions@christopherfujino oof, good catch. Looks like this probably happened in dart-lang/sdk@35b560e. I'll get a fix open.
christopherfujino commented
on Jan 3, 2024 ContributorAuthorMore actions@christopherfujino oof, good catch. Looks like this probably happened in dart-lang/sdk@35b560e. I'll get a fix open.
should we enable this in DDS? https://dart.dev/tools/linter-rules/unawaited_futures cc @bkonyi
- added a commit that references this issue
on Jan 3, 2024 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.- locked as resolved and limited conversation to collaborators
on Jan 18, 2024
Version:
beta/3.17.0-0.0.preCommand:
flutter debug_adapter