advanced-security / maven-dependency-submission-action

GitHub Action for submitting Maven dependencies
MIT License
48 stars 24 forks source link

HttpError: invalid json response body #45

Closed Jbranadev closed 1 year ago

Jbranadev commented 1 year ago

Creates the Json of the dependencies to send, however the response is a 500 internal server error.

I using

`

Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive

- name: Update dependency graph
  uses: advanced-security/maven-dependency-submission-action@c5ad0fd6b977364190852883b46728f25a9617c3

`

In logs see:

depgraph-maven-plugin:reactor /usr/bin/mvn -B com.github.ferstl:depgraph-maven-plugin:4.0.2:reactor -DgraphFormat=json -DoutputFileName=reactor.json [INFO] Scanning for projects... [INFO] Inspecting build with total of 1 modules... [INFO] Installing Nexus Staging features: [INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin [INFO] [INFO] ----------------< io.github.josecarlosbran:jbsqlutils >----------------- [INFO] Building io.github.josecarlosbran:jbsqlutils 1.1.9 [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- depgraph-maven-plugin:4.0.2:reactor (default-cli) @ jbsqlutils --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.435 s [INFO] Finished at: 2023-09-10T00:33:05Z [INFO] ------------------------------------------------------------------------ [INFO] Scanning for projects... [INFO] Inspecting build with total of 1 modules... [INFO] Installing Nexus Staging features: [INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin [INFO] [INFO] ----------------< io.github.josecarlosbran:jbsqlutils >----------------- [INFO] Building io.github.josecarlosbran:jbsqlutils 1.1.9 [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- depgraph-maven-plugin:4.0.2:reactor (default-cli) @ jbsqlutils --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.435 s [INFO] Finished at: 2023-09-10T00:33:05Z [INFO] ------------------------------------------------------------------------

depgraph-maven-plugin:aggregate Dependency Snapshot Submitting Snapshot... Notice: Submitting snapshot... Notice: { "detector": { "name": "maven-dependency-tree-action", "url": "https://github.com/advanced-security/maven-dependency-tree-action", "version": "3.0.2" }, "version": 0, "job": { "correlator": "build", "id": "6133999010" }, "sha": "ed3492449777194e0adb600c9c97ae274471825d", "ref": "refs/heads/Jbran_Integración_docker", "scanned": "2023-09-10T00:33:08.102Z", "manifests": { "jbsqlutils": { "resolved": { "pkg:maven/org.testng/testng@7.8.0?type=jar": { "package_url": "pkg:maven/org.testng/testng@7.8.0?type=jar", "relationship": "direct", "scope": "development", "dependencies": [ "pkg:maven/org.slf4j/slf4j-api@1.7.36?type=jar", "pkg:maven/com.beust/jcommander@1.82?type=jar", "pkg:maven/org.webjars/jquery@3.6.1?type=jar" ] }, "pkg:maven/org.slf4j/slf4j-api@1.7.36?type=jar": { "package_url": "pkg:maven/org.slf4j/slf4j-api@1.7.36?type=jar", "relationship": "indirect", "scope": "runtime", "dependencies": [] }, "pkg:maven/com.beust/jcommander@1.82?type=jar": { "package_url": "pkg:maven/com.beust/jcommander@1.82?type=jar", "relationship": "indirect", "scope": "development", "dependencies": [] }, "pkg:maven/org.webjars/jquery@3.6.1?type=jar": { "package_url": "pkg:maven/org.webjars/jquery@3.6.1?type=jar", "relationship": "indirect", "scope": "development", "dependencies": [] }, "pkg:maven/com.github.sdrss/reportng@2.7.0?type=jar": { "package_url": "pkg:maven/com.github.sdrss/reportng@2.7.0?type=jar", "relationship": "direct", "scope": "development", "dependencies": [ "pkg:maven/velocity/velocity@1.5?type=jar", "pkg:maven/commons-io/commons-io@2.7?type=jar", "pkg:maven/com.fasterxml.jackson.core/jackson-core@2.10.1?type=jar", "pkg:maven/com.fasterxml.jackson.core/jackson-databind@2.12.7.1?type=jar", "pkg:maven/com.fasterxml.jackson.core/jackson-annotations@2.10.1?type=jar", "pkg:maven/com.google.inject/guice@4.2.2?type=jar" ] }, "pkg:maven/velocity/velocity@1.5?type=jar": { "package_url": "pkg:maven/velocity/velocity@1.5?type=jar", "relationship": "indirect", "scope": "development", "dependencies": [ "pkg:maven/commons-collections/commons-collections@3.1?type=jar", "pkg:maven/commons-lang/commons-lang@2.1?type=jar", "pkg:maven/oro/oro@2.0.8?type=jar" ] }, "pkg:maven/commons-collections/commons-collections@3.1?type=jar": { "package_url": "pkg:maven/commons-collections/commons-collections@3.1?type=jar", "relationship": "indirect", "scope": "development", "dependencies": [] }, "pkg:maven/commons-lang/commons-lang@2.1?type=jar": { "package_url": "pkg:maven/commons-lang/commons-lang@2.1?type=jar", "relationship": "indirect", "scope": "development", "dependencies": [] }, "pkg:maven/oro/oro@2.0.8?type=jar": { "package_url": "pkg:maven/oro/oro@2.0.8?type=jar", "relationship" Error: HTTP Status 500 for request POST https://api.github.com/repos/Jbranadev/JBSqlUtils/dependency-graph/snapshots Error: invalid json response body at https://api.github.com/repos/Jbranadev/JBSqlUtils/dependency-graph/snapshots reason: Unexpected end of JSON input Error: HttpError: invalid json response body at https://api.github.com/repos/Jbranadev/JBSqlUtils/dependency-graph/snapshots reason: Unexpected end of JSON input at /home/runner/work/_actions/advanced-security/maven-dependency-submission-action/c5ad0fd6b977364190852883b46728f25a9617c3/webpack:/maven-dependency-tree-submission/node_modules/@github/dependency-submission-toolkit/dist/index.js:4798:1 at processTicksAndRejections (node:internal/process/task_queues:96:5)

/home/runner/work/_actions/advanced-security/maven-dependency-submission-action/c5ad0fd6b977364190852883b46728f25a9617c3/webpack:/maven-dependency-tree-submission/node_modules/@github/dependency-submission-toolkit/dist/index.js:396 function rejected(value) { try { step(generator"throw"); } catch (e) { reject(e); } } ^ Error: Failed to submit snapshot: HttpError: invalid json response body at https://api.github.com/repos/Jbranadev/JBSqlUtils/dependency-graph/snapshots reason: Unexpected end of JSON input at /home/runner/work/_actions/advanced-security/maven-dependency-submission-action/c5ad0fd6b977364190852883b46728f25a9617c3/webpack:/maven-dependency-tree-submission/node_modules/@github/dependency-submission-toolkit/dist/index.js:520:1 at Generator.throw () at rejected (/home/runner/work/_actions/advanced-security/maven-dependency-submission-action/c5ad0fd6b977364190852883b46728f25a9617c3/webpack:/maven-dependency-tree-submission/node_modules/@github/dependency-submission-toolkit/dist/index.js:396:1) at processTicksAndRejections (node:internal/process/task_queues:96:5)

Jbranadev commented 1 year ago

Sorry, the execution failed, because the branch where the workflow was running was not among the branches considered in the workflow. When I ran the flow in the master branch through the Pull Request, it worked correctly.