Skip to content

[Widget Preview] Unhandled exception during shutdown with active requests to the analysis server #185299

Description

@bkonyi

If we're in the middle of requesting the set of widget previews from the analysis server while the tool shuts down, the request will throw an RPC error:

Thread 0 main threadRpcException: JSON-RPC error -32000: Bad state: The client closed with pending request "Lsp.dart/workspace/getFlutterWidgetPreviews".
 at Client.sendRequest (client.dart:134)
 at Peer.sendRequest (peer.dart:116)
 at DartToolingDaemon.call (dart_tooling_daemon.dart:218)
 at WidgetPreviewDtdServices.getFlutterWidgetPreviews (dtd_services.dart:176)
 at <asynchronous gap> (async)
 at WidgetPreviewStartCommand.runCommand (widget_preview.dart:418)
 at <asynchronous gap> (async)
 at FlutterCommand.run.<fn> (flutter_command.dart:1630)
 at <asynchronous gap> (async)
 at AppContext.run.<fn> (context.dart:154)
 at <asynchronous gap> (async)
 at CommandRunner.runCommand (command_runner.dart:212)
 at <asynchronous gap> (async)
 at FlutterCommandRunner.runCommand.<fn> (flutter_command_runner.dart:496)
 at <asynchronous gap> (async)
 at AppContext.run.<fn> (context.dart:154)
 at <asynchronous gap> (async)
 at FlutterCommandRunner.runCommand (flutter_command_runner.dart:431)
 at <asynchronous gap> (async)
 at FlutterCommandRunner.run.<fn> (flutter_command_runner.dart:307)
 at <asynchronous gap> (async)
 at run.<fn>.<fn> (runner.dart:104)
 at <asynchronous gap> (async)
 at AppContext.run.<fn> (context.dart:154)
 at <asynchronous gap> (async)
 at main (executable.dart:103)

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: widget previewsIssues related to the Widget Previewer toolingteam-toolOwned by Flutter Tool teamtriaged-toolTriaged by Flutter Tool team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions