Skip to content
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

analyzer SERVER_ERROR for allowed_experiments.json: Cannot open file #50681

Open
Hixie opened this issue Dec 11, 2022 · 3 comments
Open

analyzer SERVER_ERROR for allowed_experiments.json: Cannot open file #50681

Hixie opened this issue Dec 11, 2022 · 3 comments
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@Hixie
Copy link
Contributor

Hixie commented Dec 11, 2022

I saw the following, probably when switching branches or upgrading Flutter while the analyzer was running:

Error response from the server: SERVER_ERROR
FileSystemException(path=/home/ianh/dev/flutter/bin/cache/dart-sdk/lib/_internal/allowed_experiments.json; message=Cannot open file)
#0      _PhysicalFile.readAsStringSync (package:analyzer/file_system/physical_file_system.dart:158:7)
#1      _OverlayFile.readAsStringSync (package:analyzer/file_system/overlay_file_system.dart:196:18)
#2      FolderBasedDartSdk.allowedExperimentsJson (package:analyzer/src/dart/sdk/sdk.dart:412:10)
#3      FeatureSetProvider._experimentsForSdk (package:analyzer/src/dart/analysis/feature_set_provider.dart:150:34)
#4      FeatureSetProvider.build (package:analyzer/src/dart/analysis/feature_set_provider.dart:137:30)
#5      AnalysisDriver._createFileTracker (package:analyzer/src/dart/analysis/driver.dart:1469:45)
#6      new AnalysisDriver (package:analyzer/src/dart/analysis/driver.dart:291:5)
#7      ContextBuilderImpl.createContext (package:analyzer/src/dart/analysis/context_builder.dart:130:18)
#8      new AnalysisContextCollectionImpl (package:analyzer/src/dart/analysis/analysis_context_collection.dart:93:36)
#9      ContextManagerImpl._createAnalysisContexts.performContextRebuildGuarded.performContextRebuild
(package:analysis_server/src/context_manager.dart:463:40)
<asynchronous suspension>
#10     ContextManagerImpl._createAnalysisContexts.performContextRebuildGuarded (package:analysis_server/src/context_manager.dart:606:11)
<asynchronous suspension>
@lrhn lrhn added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Dec 12, 2022
@bwilkerson bwilkerson added P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Dec 13, 2022
@bwilkerson
Copy link
Member

@scheglov

@Hixie
Copy link
Contributor Author

Hixie commented Jan 31, 2023

Got a more serious one today (unfortunately I accidentally blew away the console before I could copy the stack) where it actually crashed the analyzer entirely. Looks like the analyzer in general is very sensitive to sudden filesystem changes of the kind you see when switching git branches.

@Hixie
Copy link
Contributor Author

Hixie commented Feb 9, 2023

Steps to reproduce are something like this:

  1. Run ulimit -Sn unlimited.
  2. Check out flutter's master branch.
  3. In the flutter repo, run flutter update-packages; flutter analyze --watch --write /tmp/analysis --flutter-repo
  4. Change to a branch with a different version of the engine, e.g. flutter channel stable or the equivalent with git.
  5. Run flutter doctor -v or flutter upgrade or flutter test or similar to cause it to download the different Dart.

The analyzer suddenly throws the exception above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants