jacoco-report icon indicating copy to clipboard operation
jacoco-report copied to clipboard

Cannot read properties of null (reading 'packages')

Open jimohabdol opened this issue 2 years ago • 2 comments

I encountered an error while working on my project. The error message I'm receiving is "TypeError: Cannot read properties of null (reading 'packages'). Not sure which properties are returning null." I'm seeking assistance in understanding and resolving this issue.

Background: I'm using the madrapps/jacoco-report GitHub Action in my workflow to comment Jacoco code coverage report on PR. The workflow is triggered by a pull event. However, when the workflow runs, I'm faced with the aforementioned error message.

Error Details: Error Message: "TypeError: Cannot read properties of null (reading 'packages')"

Code:

  • name: Add coverage to PR id: jacoco uses: madrapps/[email protected] with: paths: ${{ github.workspace }}/code-coverage/target/site/jacoco-aggregate/jacoco.xml token: ${{ secrets.GITHUB_TOKEN }} min-coverage-overall: 65 min-coverage-changed-files: 65

Troubleshooting Steps Taken:

I've reviewed my GitHub Actions workflow configuration to ensure that I'm providing the correct inputs and following the expected syntax for the madrapps/jacoco-report action. I've checked the event that triggers the workflow to ensure that it contains the required information for the Jacoco Report Action to function correctly. I've examined the workflow run logs for additional error messages or stack traces that could provide more context about the issue. Request for Assistance: I kindly request assistance from the community or maintainers in understanding the root cause of this error and finding a resolution. If there are any known issues related to the madrapps/jacoco-report action, or if there have been any updates that might affect its behavior, please let me know. Any insights, suggestions, or guidance would be greatly appreciated.

jimohabdol avatar Aug 15 '23 19:08 jimohabdol

Could you run the action in debug mode and see what gets printed in the logs?

thsaravana avatar Aug 22 '23 15:08 thsaravana

##[debug]Evaluating condition for step: 'Add coverage to PR' ##[debug]Evaluating: success() ##[debug]Evaluating success: ##[debug]=> true ##[debug]Result: true ##[debug]Starting: Add coverage to PR ##[debug]Loading inputs ##[debug]Evaluating: format('{0}/code-coverage/target/site/jacoco-aggregate/jacoco.xml', github.workspace) ##[debug]Evaluating format: ##[debug]..Evaluating String: ##[debug]..=> '{0}/code-coverage/target/site/jacoco-aggregate/jacoco.xml' ##[debug]..Evaluating Index: ##[debug]....Evaluating github: ##[debug]....=> Object ##[debug]....Evaluating String: ##[debug]....=> 'workspace' ##[debug]..=> '/home/runner/work/customer-service/customer-service' ##[debug]=> '/home/runner/work/customer-service/customer-service/code-coverage/target/site/jacoco-aggregate/jacoco.xml' ##[debug]Result: '/home/runner/work/customer-service/customer-service/code-coverage/target/site/jacoco-aggregate/jacoco.xml' ##[debug]Evaluating: secrets.GITHUB_TOKEN ##[debug]Evaluating Index: ##[debug]..Evaluating secrets: ##[debug]..=> Object ##[debug]..Evaluating String: ##[debug]..=> 'GITHUB_TOKEN' ##[debug]=> '' ##[debug]Result: '' ##[debug]Loading env Run madrapps/[email protected] Event is pull_request base sha: **** head sha: **** ##[debug]followSymbolicLinks 'true' ##[debug]implicitDescendants 'true' ##[debug]matchDirectories 'true' ##[debug]omitBrokenSymbolicLinks 'true' ##[debug]Search path '/home/runner/work/customer-service/customer-service/code-coverage/target/site/jacoco-aggregate/jacoco.xml' Error: TypeError: Cannot read properties of null (reading 'packages') ##[debug]Node Action run completed with exit code 0 ##[debug]Finishing: Add coverage to PR

jimohabdol avatar Aug 23 '23 23:08 jimohabdol