axel-op / dart-package-analyzer

GitHub Action that uses the Dart Package Analyzer to compute the Pub score of Dart/Flutter packages
MIT License
52 stars 9 forks source link

Can't load Kernel binary: Invalid SDK hash. #18

Closed creativecreatorormaybenot closed 3 years ago

creativecreatorormaybenot commented 3 years ago

First of, so much love maintaining this action @axel-op ❤️


Using v3, the action fails immediately with:

Running pana
  Can't load Kernel binary: Invalid SDK hash.
  No active package pana.
Error: Pana exited with code 65

See https://github.com/creativecreatorormaybenot/wakelock/pull/137/checks?check_run_id=3564162097 for example.

davejlin commented 3 years ago

I have been getting the same error using v3. It started happening to our runs on August 18, 2021.
But v2 still works fine.

Screen Shot 2021-09-10 at 9 04 39 AM
axel-op commented 3 years ago

Hello,

Thanks for reporting this! This issue is similar to #14 and #12 but I've improved the way these errors are detected so they shouldn't pass the tests anymore before the container image is updated. I've also restored a version of the image that shouldn't break your workflow anymore.

Please check if your workflows now complete, and close the issue if you think it's resolved.

I have been getting the same error using v3. It started happening to our runs on August 18, 2021.

@davejlin Are you sure about that? I can't see any occurrence of this error before a few days ago. Could you check if the error still occurs on your side and, if so, provide by any chance a link to your failing workflow?

First of, so much love maintaining this action @axel-op ❤️

Thanks @creativecreatorormaybenot :)

davejlin commented 3 years ago

I have been getting the same error using v3. It started happening to our runs on August 18, 2021.

@davejlin Are you sure about that? I can't see any occurrence of this error before a few days ago. Could you check if the error still occurs on your side and, if so, provide by any chance a link to your failing workflow?

Hi @axel-op,

Yes, pana started breaking our runs on August 18, 2021, so we disabled it at that time out of expediency, and revisited the issue yesterday to see if it had been resolved. As it was still broken, I assumed it was due to the same cause, but now looking back in the logs, you're right that the initial error on August 18 was not the same as the one reported in this issue.

Here are the relevant entries from August 18, 2021:

2021-08-18T16:14:19.5318757Z ##[group]Running pana
2021-08-18T16:14:19.7804007Z {"logName":"pana","level":"INFO","message":"Running `/flutter/bin/cache/dart-sdk/bin/dart --version`..."}
2021-08-18T16:14:19.8195646Z {"logName":"pana","level":"INFO","message":"Running `flutter --no-version-check --version --machine`..."}
2021-08-18T16:14:20.3475475Z {"logName":"pana","level":"INFO","message":"Running `git rev-parse --show-toplevel`..."}
2021-08-18T16:14:20.3639052Z {"level":"SHOUT","message":"Problem analyzing /github/workspace/flutter/app","error":"FileSystemException: Directory listing failed, path = '/github/workspace\n/' (OS Error: No such file or directory, errno = 2)","stackTrace":""}
2021-08-18T16:14:20.3978329Z ##[endgroup]
2021-08-18T16:14:20.3984128Z ##[error]Pana exited with code 1
2021-08-18T16:14:35.8258184Z Post job cleanup.
2021-08-18T16:14:35.9356193Z [command]/usr/bin/git version
2021-08-18T16:14:35.9402068Z git version 2.32.0
2021-08-18T16:14:35.9452703Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2021-08-18T16:14:35.9491342Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
2021-08-18T16:14:35.9730619Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2021-08-18T16:14:35.9753092Z http.https://github.com/.extraheader
2021-08-18T16:14:35.9763519Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
2021-08-18T16:14:35.9798696Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
2021-08-18T16:14:36.0142704Z Cleaning up orphan processes
pana error 081821

Compare to September 10, 2021 failure:

2021-09-10T13:40:40.1267607Z ##[group]Running pana
2021-09-10T13:40:40.1935659Z Can't load Kernel binary: Invalid SDK hash.
2021-09-10T13:40:40.3446268Z No active package pana.
2021-09-10T13:40:41.4036712Z ##[endgroup]
2021-09-10T13:40:41.4041934Z ##[error]Pana exited with code 65
2021-09-10T13:40:56.8930452Z Post job cleanup.
2021-09-10T13:40:56.9889181Z [command]/usr/bin/git version
2021-09-10T13:40:56.9929065Z git version 2.33.0
2021-09-10T13:40:56.9963448Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2021-09-10T13:40:56.9995304Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
2021-09-10T13:40:57.0218523Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2021-09-10T13:40:57.0240809Z http.https://github.com/.extraheader
2021-09-10T13:40:57.0250532Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
2021-09-10T13:40:57.0281012Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
2021-09-10T13:40:57.0550050Z Cleaning up orphan processes
Screen Shot 2021-09-11 at 12 02 42 PM

Trying again today (September 11, 2021), I still see pana is failing, but apparently for a different reason now:

2021-09-11T16:55:06.6112206Z ##[group]Running pana
2021-09-11T16:55:06.6800755Z Can't load Kernel binary: Invalid kernel binary format version.
2021-09-11T16:55:06.7827440Z No active package pana.
2021-09-11T16:55:06.8201635Z ##[endgroup]
2021-09-11T16:55:06.8206438Z ##[error]Pana exited with code 65
2021-09-11T16:55:22.2864860Z Post job cleanup.
2021-09-11T16:55:22.3804443Z [command]/usr/bin/git version
2021-09-11T16:55:22.3843398Z git version 2.33.0
2021-09-11T16:55:22.3874455Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2021-09-11T16:55:22.3904687Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
2021-09-11T16:55:22.4129659Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2021-09-11T16:55:22.4144963Z http.https://github.com/.extraheader
2021-09-11T16:55:22.4158636Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
2021-09-11T16:55:22.4181427Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
2021-09-11T16:55:22.4438267Z Cleaning up orphan processes
Screen Shot 2021-09-11 at 12 01 19 PM

Here is the relevant section of my GitHub Actions script.

...
jobs:
  package-analysis:
    name: Code Analysis
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: axel-op/dart-package-analyzer@v3
      with:
        githubToken: ${{ secrets.GITHUB_TOKEN }}
        relativePath: flutter/app/
...

Please advise if there is something else I need to be doing.
Thanks much!

axel-op commented 3 years ago

Thank you for all these reports 🧐 This commit fixes the issue: 39c2a2782f1881b8e954e0b1a49a6e19f31fc2dc. Can your confirm?

davejlin commented 3 years ago

Thank you for all these reports 🧐 This commit fixes the issue: 39c2a27. Can your confirm?

Hi @axel-op,

Your latest successfully gets past the previous type of early errors, but now it fails due to a later exception:

2021-09-12T18:57:56.0493314Z ##[group]Publishing report
2021-09-12T18:57:56.7436276Z ##[endgroup]
2021-09-12T18:57:57.0860304Z Unhandled exception:
2021-09-12T18:57:57.0860742Z GitHub Error: 
2021-09-12T18:57:57.0861138Z   Message: Invalid request.
2021-09-12T18:57:57.0861424Z 
2021-09-12T18:57:57.0861859Z Only 65535 characters are allowed; 1635569 were supplied.
2021-09-12T18:57:57.0862213Z 
2021-09-12T18:57:57.0862776Z #0      GitHub.handleStatusCode (package:github/src/common/github.dart:429)
2021-09-12T18:57:57.0864492Z #1      GitHub.request (package:github/src/common/github.dart:372)
2021-09-12T18:57:57.0865156Z #2      _RootZone.runUnary (dart:async/zone.dart:1439)
2021-09-12T18:57:57.0866266Z #3      _FutureListener.handleValue (dart:async/future_impl.dart:141)
2021-09-12T18:57:57.0867763Z #4      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682)
2021-09-12T18:57:57.0868840Z #5      Future._propagateToListeners (dart:async/future_impl.dart:711)
2021-09-12T18:57:57.0869611Z #6      Future._completeWithValue (dart:async/future_impl.dart:526)
2021-09-12T18:57:57.0871094Z #7      _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36)
2021-09-12T18:57:57.0872166Z #8      _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298)
2021-09-12T18:57:57.0873001Z #9      Response.fromStream (package:http/src/response.dart:0)
2021-09-12T18:57:57.0873692Z #10     _RootZone.runUnary (dart:async/zone.dart:1439)
2021-09-12T18:57:57.0874628Z #11     _FutureListener.handleValue (dart:async/future_impl.dart:141)
2021-09-12T18:57:57.0876225Z #12     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682)
2021-09-12T18:57:57.0877879Z #13     Future._propagateToListeners (dart:async/future_impl.dart:711)
2021-09-12T18:57:57.0878853Z #14     Future._completeWithValue (dart:async/future_impl.dart:526)
2021-09-12T18:57:57.0879640Z #15     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:556)
2021-09-12T18:57:57.0881733Z #16     _microtaskLoop (dart:async/schedule_microtask.dart:43)
2021-09-12T18:57:57.0882714Z #17     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52)
2021-09-12T18:57:57.0884305Z #18     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118)
2021-09-12T18:57:57.0885412Z #19     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:441)
2021-09-12T18:57:57.0887276Z #20     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429)
2021-09-12T18:57:57.0888713Z #21     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168)
2021-09-12T18:57:57.3791866Z Post job cleanup.
2021-09-12T18:57:57.4934348Z [command]/usr/bin/git version
2021-09-12T18:57:57.4984341Z git version 2.33.0
2021-09-12T18:57:57.5032210Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2021-09-12T18:57:57.5068387Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
2021-09-12T18:57:57.5325848Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2021-09-12T18:57:57.5353904Z http.https://github.com/.extraheader
2021-09-12T18:57:57.5369129Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
2021-09-12T18:57:57.5405758Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
2021-09-12T18:57:57.5843446Z Cleaning up orphan processes
pana error 091221

Apologies that I cannot send you the link to the full workflow logs, because the project is proprietorially owned. But if you need any other information, please let me know and I'll get it for you.

marandaneto commented 3 years ago

same error https://github.com/getsentry/sentry-dart/runs/3572116274

creativecreatorormaybenot commented 3 years ago

@axel-op works perfectly again - thanks so much ❤️

creativecreatorormaybenot commented 3 years ago

ref: https://github.com/creativecreatorormaybenot/wakelock/pull/143/checks?check_run_id=3593554995

marandaneto commented 3 years ago

thanks for the fix, it works.

axel-op commented 3 years ago

Thank you for all these reports 🧐 This commit fixes the issue: 39c2a27. Can your confirm?

Hi @axel-op,

Your latest successfully gets past the previous type of early errors, but now it fails due to a later exception:

2021-09-12T18:57:56.0493314Z ##[group]Publishing report
2021-09-12T18:57:56.7436276Z ##[endgroup]
2021-09-12T18:57:57.0860304Z Unhandled exception:
2021-09-12T18:57:57.0860742Z GitHub Error: 
2021-09-12T18:57:57.0861138Z   Message: Invalid request.
2021-09-12T18:57:57.0861424Z 
2021-09-12T18:57:57.0861859Z Only 65535 characters are allowed; 1635569 were supplied.
2021-09-12T18:57:57.0862213Z 
2021-09-12T18:57:57.0862776Z #0      GitHub.handleStatusCode (package:github/src/common/github.dart:429)
2021-09-12T18:57:57.0864492Z #1      GitHub.request (package:github/src/common/github.dart:372)
2021-09-12T18:57:57.0865156Z #2      _RootZone.runUnary (dart:async/zone.dart:1439)
2021-09-12T18:57:57.0866266Z #3      _FutureListener.handleValue (dart:async/future_impl.dart:141)
2021-09-12T18:57:57.0867763Z #4      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682)
2021-09-12T18:57:57.0868840Z #5      Future._propagateToListeners (dart:async/future_impl.dart:711)
2021-09-12T18:57:57.0869611Z #6      Future._completeWithValue (dart:async/future_impl.dart:526)
2021-09-12T18:57:57.0871094Z #7      _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36)
2021-09-12T18:57:57.0872166Z #8      _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298)
2021-09-12T18:57:57.0873001Z #9      Response.fromStream (package:http/src/response.dart:0)
2021-09-12T18:57:57.0873692Z #10     _RootZone.runUnary (dart:async/zone.dart:1439)
2021-09-12T18:57:57.0874628Z #11     _FutureListener.handleValue (dart:async/future_impl.dart:141)
2021-09-12T18:57:57.0876225Z #12     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682)
2021-09-12T18:57:57.0877879Z #13     Future._propagateToListeners (dart:async/future_impl.dart:711)
2021-09-12T18:57:57.0878853Z #14     Future._completeWithValue (dart:async/future_impl.dart:526)
2021-09-12T18:57:57.0879640Z #15     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:556)
2021-09-12T18:57:57.0881733Z #16     _microtaskLoop (dart:async/schedule_microtask.dart:43)
2021-09-12T18:57:57.0882714Z #17     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52)
2021-09-12T18:57:57.0884305Z #18     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118)
2021-09-12T18:57:57.0885412Z #19     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:441)
2021-09-12T18:57:57.0887276Z #20     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429)
2021-09-12T18:57:57.0888713Z #21     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168)
2021-09-12T18:57:57.3791866Z Post job cleanup.
2021-09-12T18:57:57.4934348Z [command]/usr/bin/git version
2021-09-12T18:57:57.4984341Z git version 2.33.0
2021-09-12T18:57:57.5032210Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2021-09-12T18:57:57.5068387Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
2021-09-12T18:57:57.5325848Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2021-09-12T18:57:57.5353904Z http.https://github.com/.extraheader
2021-09-12T18:57:57.5369129Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
2021-09-12T18:57:57.5405758Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
2021-09-12T18:57:57.5843446Z Cleaning up orphan processes
pana error 091221

Apologies that I cannot send you the link to the full workflow logs, because the project is proprietorially owned. But if you need any other information, please let me know and I'll get it for you.

@davejlin Thank you. It seems that the script sends too much data to the API in a single request. If this error occurs regularly on your side, please open a new issue and I'll investigate.

davejlin commented 3 years ago

@axel-op Thanks much ... it appears to be working fine again now. But will definitely let you know if it starts breaking again. Thanks again for all your help :-)