advanced-security / maven-dependency-submission-action

GitHub Action for submitting Maven dependencies
MIT License
46 stars 27 forks source link

Snapshot is generated, but its submission fails #42

Open sadovnikov opened 1 year ago

sadovnikov commented 1 year ago

We are trying to use advanced-security/maven-dependency-submission-action@v3 with GitHub Enterprise Server 3.8.5 56a917b. So far, on two out of two different repositories, the action fails to submit the generated snapshot. Please, see the screenshots and logs below.

Anything we can do on our side to resolve this problem?

    - name: Maven Dependency Snapshot
      uses: advanced-security/maven-dependency-submission-action@v3
      if: inputs.build-tool == 'mvn' && steps.setup.outputs.build-config
      with:
        directory: ${{ github.workspace }}

image ... image

            "name": "docker-playground",
            "file": {
                "source_location": "pom.xml"
            }
        }
    }
}
2023-07-07T09:10:25.8804368Z ##[error]Cannot read properties of null (reading 'toString')
2023-07-07T09:10:25.9290668Z ##[error]TypeError: Cannot read properties of null (reading 'toString')
    at /runner/_work/_actions/advanced-security/maven-dependency-submission-action/v3/webpack:/maven-dependency-tree-submission/node_modules/@github/dependency-submission-toolkit/dist/index.js:506:1
    at Generator.next (<anonymous>)
    at fulfilled (/runner/_work/_actions/advanced-security/maven-dependency-submission-action/v3/webpack:/maven-dependency-tree-submission/node_modules/@github/dependency-submission-toolkit/dist/index.js:395:1)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-07-07T09:10:25.9313110Z 
2023-07-07T09:10:25.9314090Z /runner/_work/_actions/advanced-security/maven-dependency-submission-action/v3/webpack:/maven-dependency-tree-submission/node_modules/@github/dependency-submission-toolkit/dist/index.js:395
2023-07-07T09:10:25.9314308Z         function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
2023-07-07T09:10:25.9314407Z ^
2023-07-07T09:10:25.9314761Z Error: Failed to submit snapshot: TypeError: Cannot read properties of null (reading 'toString')
2023-07-07T09:10:25.9315357Z     at /runner/_work/_actions/advanced-security/maven-dependency-submission-action/v3/webpack:/maven-dependency-tree-submission/node_modules/@github/dependency-submission-toolkit/dist/index.js:520:1
2023-07-07T09:10:25.9315488Z     at Generator.next (<anonymous>)
2023-07-07T09:10:25.9316120Z     at fulfilled (/runner/_work/_actions/advanced-security/maven-dependency-submission-action/v3/webpack:/maven-dependency-tree-submission/node_modules/@github/dependency-submission-toolkit/dist/index.js:395:1)
2023-07-07T09:10:25.9316657Z     at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-07-07T09:10:25.9499359Z Post job cleanup.
Gby56 commented 1 year ago

Also similar problem on our end, I think forgetting to put the permission for contents: write is failing silently the submission, but this might be a better suggestion for https://github.com/github/dependency-submission-toolkit

peter-murray commented 11 months ago

@sadovnikov Can you possibly share the workflow file that you have that is able to generate this and whether or not you have set any limited actions permissions on the organizations or repositories?