Skip to content

Trying to resume an isolate that is not paused throws the wrong error code #2133

Closed
@DanTup

Description

@DanTup

In Flutter we're seeing some crash reports with this error:

RPCError: resume: (-32603) resume: WipError -32000 Can only perform operation while paused.
at new _OutstandingRequest(vm_service.dart:1865)
at VmService._call(vm_service.dart:2417)
at VmService.resume(vm_service.dart:2292)
at IsolateManager.resumeThread(isolate_manager.dart:288)
at IsolateManager._handlePause(isolate_manager.dart:502)
at IsolateManager.handleEvent(isolate_manager.dart:178)
at <asynchronous gap>(async)
at DartDebugAdapter._configureExistingIsolates.<anonymous closure>(dart.dart:759)

This happens when we try to unpause an "isolate" that's already running. I don't know the cause of this (but suspect it may be when multiple debuggers are involved, and might both be trying to resume pause isolates when they start/restart/etc.) but for the VM (where we've seen similar issues) we handle the error with code kIsolateMustBePaused.

For compatibility, I think DWDS should throw the same kind of error (perhaps by catching this one and mapping it) so that the same client handling works without needing to do string checks on the error text.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions