We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4d8ad2 commit 04bd948Copy full SHA for 04bd948
lib/src/chrome.dart
@@ -146,7 +146,16 @@ class Chrome {
146
chromeConnection.close();
147
_process?.kill(ProcessSignal.sigkill);
148
await _process?.exitCode;
149
- await _dataDir?.delete(recursive: true);
+ try {
150
+ // Chrome starts another process as soon as it dies that modifies the
151
+ // profile information. Give it some time before attempting to delete
152
+ // the directory.
153
+ await Future.delayed(Duration(milliseconds: 500));
154
+ await _dataDir?.delete(recursive: true);
155
+ } catch (_) {
156
+ // Silently fail if we can't clean up the profile information.
157
+ // It is a system tmp directory so it should get cleaned up eventually.
158
+ }
159
}
160
161
0 commit comments