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

"Invalid argument(s): Provided content does not align with expectations" #15

Closed
dkrutskikh opened this issue Mar 23, 2021 · 9 comments
Closed

Comments

@dkrutskikh
Copy link

Last five days dart-package-analyzer crashes on every run.

https://github.com/dart-code-checker/dart-code-metrics/runs/2168640802

2021-03-22T17:54:25.2056965Z ##[group]Running pana
2021-03-22T17:54:25.5128260Z {"logName":"pana","level":"INFO","message":"Running /flutter/bin/cache/dart-sdk/bin/dart --version..."}
2021-03-22T17:54:25.5715632Z {"logName":"pana","level":"INFO","message":"Running flutter --no-version-check --version --machine..."}
2021-03-22T17:54:26.3455792Z {"logName":"pana","level":"INFO","message":"Running /flutter/bin/cache/dart-sdk/bin/pub upgrade --verbosity io --no-precompile..."}
2021-03-22T17:54:29.9193345Z {"logName":"pana","level":"INFO","message":"Analyzing package..."}
2021-03-22T17:54:29.9696760Z {"logName":"pana","level":"INFO","message":"Running /flutter/bin/cache/dart-sdk/bin/dartanalyzer --options /github/workspace/pana_analysis_options_1616435669958881.g.yaml --format machine bin lib..."}
2021-03-22T17:54:42.7434141Z {"level":"SHOUT","message":"Problem analyzing /github/workspace","error":"Invalid argument(s): Provided content does not align with expectations.\nNo dart files found at: /github/workspace/lib","stackTrace":"#0 parseCodeProblem (package:pana/src/code_problem.dart:52:5)\n#1 PackageContext.staticAnalysis. (package:pana/src/package_context.dart:121:23)\n#2 MappedIterator.moveNext (dart:_internal/iterable.dart:390:20)\n#3 WhereIterator.moveNext (dart:_internal/iterable.dart:436:22)\n#4 SetMixin.addAll (dart:collection/set.dart:57:23)\n#5 new LinkedHashSet.of (dart:collection/linked_hash_set.dart:111:27)\n#6 Iterable.toSet (dart:core/iterable.dart:376:21)\n#7 PackageContext.staticAnalysis (package:pana/src/package_context.dart:123:12)\n\n#8 PackageAnalyzer._inspect (package:pana/src/package_analyzer.dart:147:27)\n\n#9 main (file:///root/.pub-cache/hosted/pub.dartlang.org/pana-0.15.4/bin/pana.dart:163:19)\n\n"}
2021-03-22T17:54:42.8798897Z ##[endgroup]
2021-03-22T17:54:42.8803460Z ##[error]Pana exited with code 1

@axel-op axel-op changed the title dart-package-analyzer doesn't work for me "Invalid argument(s): Provided content does not align with expectations" Mar 23, 2021
@shamblett
Copy link

I'm seeing this also, was OK for me yesterday though.

@axel-op
Copy link
Owner

axel-op commented Mar 26, 2021

After doing some research, I think that this is due to a bug of the dartanalyzer command in the latest versions of the Dart SDK (this issue only occurs with the beta/dev versions of the SDK) . I opened an issue in dart-lang/sdk: dart-lang/sdk#45488.

@dkrutskikh
Copy link
Author

dkrutskikh commented Mar 26, 2021

@axel-op Thank you for your research. Do you have a plan downgrade to stable version of SDK?

@axel-op
Copy link
Owner

axel-op commented Mar 26, 2021

@axel-op Thank you for your research. Do you have a plan downgrade to stable version of SDK?

No, because of #11.

However, see #5 to customize the version of Flutter for your repo.

@dkrutskikh
Copy link
Author

dkrutskikh commented Mar 26, 2021

As I understand, it was necessary to switch to the beta version when null-safety was on the beta version. Now pub analyse package on stable SDK version (like this Analysed with Pana 0.15.4, Flutter 2.0.3, Dart 2.12.2.)

@axel-op
Copy link
Owner

axel-op commented Mar 26, 2021

As I understand, switch on beta need to be only while null-safety will be on beta. Now pub analyse package on stable SDK version (like this Analysed with Pana 0.15.4, Flutter 2.0.3, Dart 2.12.2.)

Oh that's right! I guess I can switch to the stable channel again then. Thank you 😊

@axel-op
Copy link
Owner

axel-op commented Mar 26, 2021

@dkrutskikh I've pushed ed94c03. Can you run your last failing jobs again, and close this issue if it is solved?

@dkrutskikh
Copy link
Author

@axel-op Thank you. Your fix works well for me. I close this issue.

@shamblett
Copy link

Yep thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants