IllegalStateException Error Causing Failed GoLang Upload #134
Description
Jenkins and plugins versions report
Environment
Jenkins: 2.319.3
OS: Linux - 5.4.0-1057-aws
ace-editor:1.1
allure-jenkins-plugin:2.30.2
amazon-ecr:1.7
anchore-container-scanner:1.0.23
ansicolor:1.0.1
ant:1.13
antisamy-markup-formatter:2.7
apache-httpcomponents-client-4-api:4.5.13-1.0
authentication-tokens:1.4
authorize-project:1.4.0
aws-credentials:189.v3551d5642995
aws-java-sdk:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-cloudformation:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-codebuild:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-core:1.12.69
aws-java-sdk-ec2:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-ecr:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-ecs:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-elasticbeanstalk:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-iam:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-jmespath:1.12.69
aws-java-sdk-kms:1.12.69
aws-java-sdk-logs:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-minimal:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-s3:1.12.69
aws-java-sdk-ssm:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-sts:1.12.69
azure-commons:1.1.3
badge:1.9.1
blueocean:1.25.3
blueocean-autofavorite:1.2.5
blueocean-bitbucket-pipeline:1.25.3
blueocean-commons:1.25.3
blueocean-config:1.25.3
blueocean-core-js:1.25.3
blueocean-dashboard:1.25.3
blueocean-display-url:2.4.1
blueocean-events:1.25.3
blueocean-git-pipeline:1.25.3
blueocean-github-pipeline:1.25.3
blueocean-i18n:1.25.3
blueocean-jwt:1.25.3
blueocean-personalization:1.25.3
blueocean-pipeline-api-impl:1.25.3
blueocean-pipeline-editor:1.25.3
blueocean-pipeline-scm-api:1.25.3
blueocean-rest:1.25.3
blueocean-rest-impl:1.25.3
blueocean-web:1.25.3
bootstrap4-api:4.6.0-3
bootstrap5-api:5.1.3-6
bouncycastle-api:2.25
branch-api:2.7.0
build-blocker-plugin:1.7.8
build-monitor-plugin:1.13+build.202203020040
build-with-parameters:1.6
caffeine-api:2.9.2-29.v717aac953ff3
checks-api:1.7.2
cloudbees-bitbucket-branch-source:757.vddedc5f2589a_
cloudbees-disk-usage-simple:0.10
cloudbees-folder:6.708.ve61636eb_65a_5
command-launcher:1.6
configuration-as-code:1414.v878271fc496f
copyartifact:1.43
credentials:1074.v60e6c29b_b_44b_
credentials-binding:1.27.1
cvs:2.19
datadog:3.5.0
disable-failed-job:1.15
display-url-api:2.3.5
docker-commons:1.19
docker-workflow:1.28
durable-task:493.v195aefbb0ff2
ec2:1.67
echarts-api:5.3.0-2
email-ext:2.87
extended-choice-parameter:346.vd87693c5a_86c
extended-read-permission:3.2
external-monitor-job:191.v363d0d1efdf8
favorite:2.4.0
folder-properties:1.2.1
font-awesome-api:6.0.0-1
fortify-on-demand-uploader:7.0.1
git:4.10.3
git-client:3.11.0
git-parameter:0.9.15
git-server:1.10
github:1.34.2
github-api:1.301-378.v9807bd746da5
github-branch-source:2.11.4
groovy-postbuild:2.5
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-1.0
htmlpublisher:1.29
jackson2-api:2.13.1-246.va8a9f3eaf46a
jacoco:3.3.1
javadoc:217.v905b_86277a_2a_
javax-activation-api:1.2.0-2
javax-mail-api:1.6.2-5
jaxb:2.3.0.1
jdk-tool:1.5
jenkins-design-language:1.25.3
jjwt-api:0.11.2-9.c8b45b8bb173
jnr-posix-api:3.1.7-2
job-dsl:1.77
jobConfigHistory:1119.v509e1017356b_
jquery:1.12.4-1
jquery-detached:1.2.1
jquery3-api:3.6.0-2
jsch:0.1.55.2
junit:1.54
junit-attachments:1.7
junit-realtime-test-reporter:82.vc2a_3f0f7a_291
kubernetes:3538.v6b_005a_ddced1
kubernetes-cd:2.3.1
kubernetes-client-api:5.11.2-182.v0f1cf4c5904e
kubernetes-credentials:0.9.0
ldap:2.8
lockable-resources:2.14
mailer:408.vd726a_1130320
matrix-auth:2.6.8
matrix-project:1.20
metrics:4.1.6.1
momentjs:1.1.1
multiple-scms:0.8
node-iterator-api:1.5.1
okhttp-api:4.9.3-105.vb96869f8ac3a
pam-auth:1.7
parameterized-scheduler:1.0
pegdown-formatter:1.3
pipeline-aws:1.43
pipeline-build-step:2.16
pipeline-githubnotify-step:1.0.5
pipeline-graph-analysis:188.v3a01e7973f2c
pipeline-input-step:446.vf27b_0b_83500e
pipeline-milestone-step:100.v60a_03cd446e1
pipeline-model-api:1.9.3
pipeline-model-declarative-agent:1.1.1
pipeline-model-definition:1.9.3
pipeline-model-extensions:1.9.3
pipeline-rest-api:2.23
pipeline-stage-step:291.vf0a8a7aeeb50
pipeline-stage-tags-metadata:1.9.3
pipeline-stage-view:2.23
pipeline-utility-steps:2.12.0
plain-credentials:1.8
plugin-util-api:2.14.0
pollscm:1.3.1
popper-api:1.16.1-2
popper2-api:2.11.2-1
prometheus:2.0.10
publish-over:0.22
publish-over-ssh:1.24
pubsub-light:1.16
purge-job-history:1.6
rapid7-insightvm-container-assessment:1.0.18
rebuild:1.33
resource-disposer:0.17
robot:3.0.1
role-strategy:3.2.0
saml:2.1.1-275.va_5718591a_999
scm-api:595.vd5a_df5eb_0e39
script-security:1138.v8e727069a_025
show-build-parameters:1.0
slack:602.v0da_f7458945d
snakeyaml-api:1.29.1
sse-gateway:1.25
ssh-agent:1.24.1
ssh-credentials:1.19
ssh-slaves:1.30.2
sshd:3.1.0
structs:308.v852b473a2b8c
token-macro:280.v97a_82642793c
trilead-api:1.0.13
variant:1.4
view-cloner:1.1
windows-slaves:1.8
workflow-aggregator:2.6
workflow-api:1138.v619fd5201b_2f
workflow-basic-steps:2.24
workflow-cps:2659.v52d3de6044d0
workflow-cps-global-lib:564.ve62a_4eb_b_e039
workflow-durable-task-step:1121.va_65b_d2701486
workflow-job:1145.v7f2433caa07f
workflow-multibranch:711.vdfef37cda_816
workflow-scm-step:2.13
workflow-step-api:622.vb_8e7c15b_c95a_
workflow-support:813.vb_d7c3d2984a_0
ws-cleanup:0.40
What Operating System are you using (both controller, and any agents involved in the problem)?
Debian linux
Reproduction steps
- Successfully build the GoLang repository.
- Use jenkins FoD uploader plugin to upload package to be scanned.
- Observe the upload failed with the below shown error output.
Expected Results
The built package to upload successfully.
Actual Results
The package failed to upload and errored. I have been able to upload this built repository before, so it's not a first time problem for this repository. See below for the output logs for the stack trace.
Anything else?
Output logs:
Fortify recommends using ScanCentral Client to package code for comprehensive scan results.
Begin Create Zip.
Source file directory: /home/jenkins/agent/workspace/agent-fortify-pipeline
Temporary file created at: /tmp/fodupload14653615163032026873.zip
End Create Zip.
Getting Assessment
TOTAL FILE SIZE = 63449568
CHUNK_SIZE = 1048576
2022-06-21 14:02:37.768 Uploading fragment 1
2022-06-21 14:03:40.447 Uploading fragment 2
2022-06-21 14:03:40.609 Uploading fragment 3
2022-06-21 14:03:40.833 Uploading fragment 4
2022-06-21 14:03:40.957 Uploading fragment 5
2022-06-21 14:03:41.122 Upload Status - Fragment No: 5, Bytes sent: 5242880 (Response: 202)
2022-06-21 14:03:41.123 Uploading fragment 6
2022-06-21 14:03:41.308 Uploading fragment 7
2022-06-21 14:03:41.485 Uploading fragment 8
2022-06-21 14:03:41.633 Uploading fragment 9
2022-06-21 14:03:41.818 Uploading fragment 10
2022-06-21 14:03:41.993 Upload Status - Fragment No: 10, Bytes sent: 10485760 (Response: 202)
2022-06-21 14:03:41.994 Uploading fragment 11
2022-06-21 14:03:42.110 Uploading fragment 12
2022-06-21 14:03:42.302 Uploading fragment 13
2022-06-21 14:03:42.497 Uploading fragment 14
2022-06-21 14:03:42.745 Uploading fragment 15
2022-06-21 14:03:42.876 Upload Status - Fragment No: 15, Bytes sent: 15728640 (Response: 202)
2022-06-21 14:03:42.877 Uploading fragment 16
2022-06-21 14:03:43.030 Uploading fragment 17
2022-06-21 14:03:43.295 Uploading fragment 18
2022-06-21 14:03:43.405 Uploading fragment 19
2022-06-21 14:03:43.538 Uploading fragment 20
2022-06-21 14:03:43.835 Upload Status - Fragment No: 20, Bytes sent: 20971520 (Response: 202)
2022-06-21 14:03:43.835 Uploading fragment 21
2022-06-21 14:03:43.983 Uploading fragment 22
2022-06-21 14:03:44.177 Uploading fragment 23
2022-06-21 14:03:44.507 Uploading fragment 24
2022-06-21 14:03:44.683 Uploading fragment 25
2022-06-21 14:03:44.796 Upload Status - Fragment No: 25, Bytes sent: 26214400 (Response: 202)
2022-06-21 14:03:44.797 Uploading fragment 26
2022-06-21 14:03:44.929 Uploading fragment 27
2022-06-21 14:03:45.045 Uploading fragment 28
2022-06-21 14:03:45.227 Uploading fragment 29
2022-06-21 14:03:45.323 Uploading fragment 30
2022-06-21 14:03:45.435 Upload Status - Fragment No: 30, Bytes sent: 31457280 (Response: 202)
2022-06-21 14:03:45.436 Uploading fragment 31
2022-06-21 14:03:45.568 Uploading fragment 32
2022-06-21 14:03:45.776 Uploading fragment 33
2022-06-21 14:03:45.885 Uploading fragment 34
2022-06-21 14:03:46.225 Uploading fragment 35
2022-06-21 14:03:46.347 Upload Status - Fragment No: 35, Bytes sent: 36700160 (Response: 202)
2022-06-21 14:03:46.348 Uploading fragment 36
2022-06-21 14:03:46.639 Uploading fragment 37
2022-06-21 14:03:46.796 Uploading fragment 38
2022-06-21 14:03:46.982 Uploading fragment 39
2022-06-21 14:03:47.252 Uploading fragment 40
2022-06-21 14:03:47.384 Upload Status - Fragment No: 40, Bytes sent: 41943040 (Response: 202)
2022-06-21 14:03:47.384 Uploading fragment 41
2022-06-21 14:03:47.513 Uploading fragment 42
2022-06-21 14:03:47.702 Uploading fragment 43
2022-06-21 14:03:47.832 Uploading fragment 44
2022-06-21 14:03:47.951 Uploading fragment 45
2022-06-21 14:03:48.082 Upload Status - Fragment No: 45, Bytes sent: 47185920 (Response: 202)
2022-06-21 14:03:48.082 Uploading fragment 46
2022-06-21 14:03:48.352 Uploading fragment 47
2022-06-21 14:03:48.472 Uploading fragment 48
2022-06-21 14:03:48.719 Uploading fragment 49
2022-06-21 14:03:48.822 Uploading fragment 50
2022-06-21 14:03:48.930 Upload Status - Fragment No: 50, Bytes sent: 52428800 (Response: 202)
2022-06-21 14:03:48.930 Uploading fragment 51
2022-06-21 14:03:49.246 Uploading fragment 52
2022-06-21 14:03:49.393 Uploading fragment 53
2022-06-21 14:03:49.495 Uploading fragment 54
2022-06-21 14:03:49.600 Uploading fragment 55
2022-06-21 14:03:49.974 Upload Status - Fragment No: 55, Bytes sent: 57671680 (Response: 202)
2022-06-21 14:03:49.975 Uploading fragment 56
2022-06-21 14:03:50.156 Uploading fragment 57
2022-06-21 14:03:50.284 Uploading fragment 58
2022-06-21 14:03:50.384 Uploading fragment 59
2022-06-21 14:03:50.744 Uploading fragment 60
2022-06-21 14:03:50.855 Upload Status - Fragment No: 60, Bytes sent: 62914560 (Response: 202)
2022-06-21 14:03:50.855 Uploading fragment 0
2022-06-21 14:08:50.859 Upload Status - Fragment No: 0, Bytes sent: 63449568 (Response: 504)
2022-06-21 14:08:50.859 An error occurred during the upload.
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224)
at com.google.gson.Gson.fromJson(Gson.java:887)
at com.google.gson.Gson.fromJson(Gson.java:852)
at com.google.gson.Gson.fromJson(Gson.java:801)
at com.google.gson.Gson.fromJson(Gson.java:773)
at org.jenkinsci.plugins.fodupload.controllers.StaticScanController.startStaticScan(StaticScanController.java:174)
at org.jenkinsci.plugins.fodupload.SharedUploadBuildStep.perform(SharedUploadBuildStep.java:531)
at org.jenkinsci.plugins.fodupload.steps.FortifyStaticAssessment.perform(FortifyStaticAssessment.java:562)
at org.jenkinsci.plugins.fodupload.steps.FortifyStaticAssessment$Execution.run(FortifyStaticAssessment.java:924)
at org.jenkinsci.plugins.fodupload.steps.FortifyStaticAssessment$Execution.run(FortifyStaticAssessment.java:912)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:213)
... 15 more
Activity