Skip to content

FileSystemException: Getting current working directory, Dart SDK 2.5.0-dev.1.0 #37598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
benhalverson opened this issue Jul 22, 2019 · 6 comments
Labels
analyzer-crash-report Issues which have been reported due to an analysis server crash legacy-area-analyzer Use area-devexp instead.

Comments

@benhalverson
Copy link

This tracker is for issues related to:

  • Analyzer

I launched vs code this morning an got an analyzer crashed message.

Versions

  • Dart SDK 2.5.0-dev.1.0
  • Visual Studio Code 1.36.1
  • Dart Code 3.2.1
  • gLinux

Analyzer Info

The analyzer was launched using the arguments:

/usr/local/google/home/bhalverson/Downloads/dart-sdk/bin/snapshots/analysis_server.dart.snapshot
--client-id=Dart-Code.dart-code
--client-version=3.2.1

Exception

Analysis failed: /google/src/cloud/bhalverson/feature_mySystems/google3/security/authorization/sphinx/fe/client/component/my_systems/test/sphinx_my_systems_test.dart

FileSystemException: Getting current working directory failed, path = '' (OS Error: No such file or directory, errno = 2)
#0      _uriBaseClosure (dart:io-patch/directory_patch.dart:64:5)
#1      Uri.base (dart:core-patch/uri_patch.dart:21:41)
#2      current (package:path/path.dart:84:17)
#3      Context.current (package:path/src/context.dart:62:57)
#4      Context.toUri (package:path/src/context.dart:1008:43)
#5      _OverlayFile.createSource (package:analyzer/file_system/overlay_file_system.dart:222:57)
#6      FileSystemState.getFileForPath (package:analyzer/src/dart/analysis/file_state.dart:1098:36)
#7      AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1393:31)
#8      AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1228:17)
<asynchronous suspension>
#9      AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2188:24)
<asynchronous suspension>
#10     AnalysisDriverScheduler.start (package:analyzer/src/dart/analysis/driver.dart:2118:5)
#11     new AnalysisServer (package:analysis_server/src/analysis_server.dart:208:29)
#12     SocketServer.createAnalysisServer (package:analysis_server/src/socket_server.dart:86:26)
#13     StdioAnalysisServer.serveStdio (package:analysis_server/src/server/stdio_server.dart:37:18)
#14     Driver.startAnalysisServer.<anonymous closure> (package:analysis_server/src/server/driver.dart:542:21)
#15     _rootRun (dart:async/zone.dart:1124:13)
#16     _CustomZone.run (dart:async/zone.dart:1021:19)
#17     _runZoned (dart:async/zone.dart:1516:10)
#18     runZoned (dart:async/zone.dart:1463:12)
#19     Driver._captureExceptions (package:analysis_server/src/server/driver.dart:627:12)
#20     Driver.startAnalysisServer (package:analysis_server/src/server/driver.dart:540:7)
#21     Driver.start.<anonymous closure> (package:analysis_server/src/server/driver.dart:444:9)
#22     _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#23     Driver.start.<anonymous closure> (package:analysis_server/src/server/driver.dart:439:43)
#24     CompilerContext.runInContext.<anonymous closure>.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:122:46)
#25     new Future.sync (dart:async/future.dart:224:31)
#26     CompilerContext.runInContext.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:122:19)
#27     _rootRun (dart:async/zone.dart:1124:13)
#28     _CustomZone.run (dart:async/zone.dart:1021:19)
#29     _runZoned (dart:async/zone.dart:1516:10)
#30     runZoned (dart:async/zone.dart:1463:12)
#31     CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:121:12)
#32     CompilerContext.runWithDefaultOptions (package:front_end/src/fasta/compiler_context.dart:140:56)
#33     Driver.start (package:analysis_server/src/server/driver.dart:439:21)
#34     main (file:///b/s/w/ir/cache/builder/sdk/pkg/analysis_server/bin/server.dart:12:11)
#35     _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#36     main (file:///b/s/w/ir/cache/builder/sdk/pkg/analysis_server/bin/server.dart:10:10)
#37     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:303:32)
#38     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

Diagnostics requested after the error occurred are:

[
    {
        "name": "/google/src/cloud/bhalverson/feature_mySystems/google3/security/authorization/sphinx/fe",
        "explicitFileCount": 0,
        "implicitFileCount": 0,
        "workItemQueueLength": 0,
        "cacheEntryExceptions": []
    }
]
@devoncarew
Copy link
Member

I see this in the error message:

FileSystemException: Getting current working directory failed, path = '' (OS Error: No such file or directory, errno = 2)

Any sense for why tha may be happening on your system?

@devoncarew devoncarew changed the title dart analyzer crashed in vscode FileSystemException: Getting current working directory, Dart SDK 2.5.0-dev.1.0 Jul 22, 2019
@devoncarew devoncarew added legacy-area-analyzer Use area-devexp instead. analyzer-crash-report Issues which have been reported due to an analysis server crash labels Jul 22, 2019
@benhalverson
Copy link
Author

Not sure. I did prodaccess then code /location/to/my/code and saw that analytics crash message popup
I closed and reopened vscode and the message didn't come back

@devoncarew
Copy link
Member

fyi @scheglov - it looks like we can have trouble getting the cwd internally at times

also cc @DaveShuckerow

@DaveShuckerow
Copy link

@benhalverson This is a quirk of the g3 workspaces. I'll message you more information.

@haamaanaa
Copy link

I am experiencing something similar via Flutter, after MacOS Big Sur upgrade:

flutter/flutter#70940

any chance these would be related issues?

and what does "a quirk of the g3 workspaces" mean?

@srawlins
Copy link
Member

Other than the Big Sur issue (#44509), this issue has not been reported since Dart 2.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-crash-report Issues which have been reported due to an analysis server crash legacy-area-analyzer Use area-devexp instead.
Projects
None yet
Development

No branches or pull requests

5 participants