Skip to content

[flutter_tools] PathNotFoundException: Cannot open file, path = '.../core_device_list.json' (OS Error: No such file or directory, errno = 2) #141892

@jmagman

Description

@jmagman

This is happening both in the wild and on CI.

A crash report in beta/3.19.0-0.2.pre:

PathNotFoundException: Cannot open file, path = '/var/folders/kl/hdgxgrc93gs870zyrkz0dc_m0000gn/T/flutter_tools.iWDQmn/core_devices.RElIQa/core_device_list.json' (OS Error: No such file or directory, errno = 2)
at _File.throwIfError(file_impl.dart:675)
at _File.openSync(file_impl.dart:490)
at _File.readAsBytesSync(file_impl.dart:574)
at _File.readAsStringSync(file_impl.dart:624)
at ForwardingFile.readAsStringSync(forwarding_file.dart:99)
at IOSCoreDeviceControl._listCoreDevices(core_devices.dart:83)
at <asynchronous gap>(async)
at IOSCoreDeviceControl.getCoreDevices(core_devices.dart:114)
at <asynchronous gap>(async)
at XCDevice.getAvailableIOSDevices(xcdevice.dart:487)
at <asynchronous gap>(async)
at IOSDevices.startPolling(devices.dart:108)
at <asynchronous gap>(async)

The CI overall_experience_test.dart flake:

 10:21 +54 -1: test/integration.shard/overall_experience_test.dart: flutter run handle SIGUSR1/2 [E]                                                                                                    
   Expected: [
               'Performing hot reload...                                        ',
               <a string starting with 'Reloaded 0 libraries in '>,
               'Performing hot restart...                                       ',
               <a string starting with 'Restarted application in '>,
               '',
               'Application finished.',
               'ready'
             ]
     Actual: WhereIterable<String>:[
               'Performing hot reload...                                        ',
               'Reloaded 0 libraries in 45ms (compile: 4 ms, reload: 0 ms, reassemble: 31 ms).',
               'Performing hot restart...                                       ',
               'Restarted application in 247ms.',
               '',
               'Application finished.',
               '',
               'Oops; flutter has exited unexpectedly: "PathNotFoundException: Cannot open file, path = \'/Volumes/Work/s/w/ir/x/t/flutter_tools.OnrQMu/core_devices.VRAibL/core_device_list.json\' (OS Error: No such file or directory, errno = 2)".',
               'ready'
             ]
      Which: at location [6] is '' instead of 'ready'
   
   package:matcher                                            expect
   test/integration.shard/overall_experience_test.dart 111:7  main.<fn>

Seen in presubmit
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8758444597475340193/+/u/run_test.dart_for_tool_integration_tests_shard_and_subshard_4_4/test_stdout

cc @vashworth

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: flakeTests that sometimes, but not always, incorrectly passteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions