Skip to content

[tool_crash] Unhandled RPCError (-32603) in DevFS.create when target VM fails to create temporary directory #196118

Closed

Description

@bkonyi

During flutter run, DevFS.create calls FlutterVmService.createDevFS and only handles RPCError codes for service disconnection or 1001 (kFileSystemAlreadyExists), rethrowing all other RPC errors.

When the target Dart VM fails to create the DevFS temporary directory in Directory.systemTemp.createTemp (most commonly on Windows when %LOCALAPPDATA%\Temp or %TEMP% fails with PathAccessException: Creation of temporary directory failed (OS Error: Access is denied, errno = 5), or on iOS Simulator with errno = 28 No space left on device), the VM service returns JSON-RPC -32603 (Internal error). Because HotRunner._updateDevFS only catches DevFSException, the raw RPCError escapes RunCommand.runCommand and reports an unhandled tool crash (RPCError at new _OutstandingRequest at package:vm_service/src/vm_service.dart-58fe5aaf).

Target VM error (rpcError.details):

_createDevFS: (-32603) Internal error
_createDevFS: Unexpected exception:PathAccessException: Creation of temporary directory failed, path = 'C:\Users\<user>\AppData\Local\Temp' (OS Error: Access is denied, errno = 5)

Tool stack trace:

#0      new _OutstandingRequest (package:vm_service/src/vm_service.dart:278:32)
#1      VmService._call.<anonymous closure> (package:vm_service/src/vm_service.dart:1960:25)
#2      VmService._call (package:vm_service/src/vm_service.dart:1972:8)
#3      VmService.callServiceExtension (package:vm_service/src/vm_service.dart:1911:14)
#4      FlutterVmService.createDevFS (package:flutter_tools/src/vmservice.dart:954:18)
#5      DevFS.create (package:flutter_tools/src/devfs.dart:523:39)
#6      FlutterDevice.setupDevFS (package:flutter_tools/src/resident_runner.dart:345:23)
#7      HotRunner._initDevFS (package:flutter_tools/src/run_hot.dart:479:25)
#8      HotRunner._attach (package:flutter_tools/src/run_hot.dart:288:27)
#10     RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:961:27)

DevFS.create should surface _createDevFS filesystem failures as a DevFSException or ToolExit with the underlying rpcError.details message so users can fix their TEMP/TMP directory permissions or disk space without crashing flutter_tools.

Related Issues & PRs

Activity

  1. added
    c: crash
    tool
    platform-windows
    P1
    team-tool
    triaged-tool
    found in release: 3.47
    t: top-crasher
    on Nov 6, 2026
  2. marked [tool_crash] RPCError #196187 as a duplicate of this issue on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1c: crashfound in release: 3.47platform-windowst: top-crasherteam-tooltooltriaged-tool

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions