Repository navigation
[path_provider] Frequent flake in macos_platform_tests #187563
Copy link
Copy link
Closed
flutter/packages
#11841Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listp: path_providerPlugin that provides resolved paths to some platform directoriesPlugin that provides resolved paths to some platform directoriespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-macosBuilding on or for macOS specificallyBuilding on or for macOS specifically
Description
We're suddenly getting very persistent flake in the integration tests for path_provider on macOS:
00:00 +0: getTemporaryDirectory
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following PathNotFoundException was thrown running a test:
Cannot open file, path =
'/Users/chrome-bot/Library/Caches/dev.flutter.plugins.pathProviderExample/temporaryDirectory' (OS
Error: No such file or directory, errno = 2)
When the exception was thrown, this was the stack:
#0 _File.throwIfError (dart:io/file_impl.dart:779:7)
#1 _File.openSync (dart:io/file_impl.dart:572:5)
#2 _File.writeAsBytesSync (dart:io/file_impl.dart:744:31)
#3 _File.writeAsStringSync (dart:io/file_impl.dart:772:5)
#4 _verifySampleFile (file:///Volumes/Work/s/w/ir/x/w/packages/packages/path_provider/path_provider/example/integration_test/path_provider_test.dart:124:8)
#5 main.<anonymous closure> (file:///Volumes/Work/s/w/ir/x/w/packages/packages/path_provider/path_provider/example/integration_test/path_provider_test.dart:15:5)
<asynchronous suspension>
#6 testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:192:15)
<asynchronous suspension>
#7 TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1953:5)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)
The test description was:
getTemporaryDirectory
════════════════════════════════════════════════════════════════════════════════════════════════════
00:00 +0 -1: getTemporaryDirectory [E]
Test failed. See exception logs above.
The test description was: getTemporaryDirectory
I don't think anything changed on our side, so it may be a change on the bots (e.g., a macOS update with different behavior). It looks like this may be a latent issue in the test, as it seems to be assuming the directory will already exist even though we don't guarantee that. What's odd though is that it looks like path_provider_darwin has the same structure still, and isn't failing.
Still, we should make the test create the directory if necessary, and see if that resolves it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listp: path_providerPlugin that provides resolved paths to some platform directoriesPlugin that provides resolved paths to some platform directoriespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-macosBuilding on or for macOS specificallyBuilding on or for macOS specifically
Activity
[path_provider] Create temp dir in tests if needed (#11841)
[path_provider] Create temp dir in tests if needed (flutter#11841)
github-actions commentedon Jul 14, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.