Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
DanTup opened this issue Jun 7, 2023 · 1 comment · Fixed by #2134
Closed

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

DanTup opened this issue Jun 7, 2023 · 1 comment · Fixed by #2134

Comments

@DanTup
Copy link
Contributor

DanTup commented Jun 7, 2023

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.

@elliette
Copy link
Contributor

elliette commented Jun 7, 2023

Some notes:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants