Madrapps / jacoco-report

Github action that publishes the JaCoCo report as a comment in the Pull Request
https://github.com/marketplace/actions/jacoco-report
MIT License
144 stars 63 forks source link

Cannot read properties of null (reading 'packages') #65

Open jimohabdol opened 1 year ago

jimohabdol commented 1 year ago

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:

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.

thsaravana commented 1 year ago

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

jimohabdol commented 1 year ago

[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/jacoco-report@v1.6.1 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