Skip to content

[JENKINS-73161] File parameters are not retained across Jenkins restarts #16437

Closed

Description

@jenkins-infra-bot

Steps to reproduce

  1. Create a freestyle job
  2. Configure it to have a file parameter
  3. Go to /job/…/build?delay=100sec (add to delay), specify a file and click Build Now
  4. Wait a few seconds to persist the queue (just in case)
  5. Restart Jenkins
  6. Wait until the build is started

Expected results

The build starts and successfully picks up the file parameter, behaving as if there was no restart while the build was queued

Actual results

The build fails with:

Running as SYSTEM
Building in workspace /var/jenkins_home/workspace/fs
FATAL: Cannot invoke "org.apache.commons.fileupload.FileItem.getName()" because "this.this$0.file" is null
java.lang.NullPointerException: Cannot invoke "org.apache.commons.fileupload.FileItem.getName()" because "this.this$0.file" is null
	at hudson.model.FileParameterValue$1.setUp(FileParameterValue.java:159)
	at hudson.model.Build$BuildExecution.doRun(Build.java:158)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526)
	at hudson.model.Run.execute(Run.java:1894)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
	at hudson.model.ResourceController.execute(ResourceController.java:101)
	at hudson.model.Executor.run(Executor.java:442)
Finished: FAILURE 

Notes

May be a regression in 1.494 due to 4dde24e according to #9260 (comment)


Originally reported by danielbeck, imported from: File parameters are not retained across Jenkins restarts
  • assignee: mawinter69
  • status: Closed
  • priority: Minor
  • component(s): core
  • resolution: Fixed
  • resolved: 2025-09-30T21:28:07+00:00
  • votes: 0
  • watchers: 3
  • imported: 2025-11-24
Raw content of original issue

Steps to reproduce

  1. Create a freestyle job
  2. Configure it to have a file parameter
  3. Go to /job/…/build?delay=100sec (add to delay), specify a file and click Build Now
  4. Wait a few seconds to persist the queue (just in case)
  5. Restart Jenkins
  6. Wait until the build is started

Expected results

The build starts and successfully picks up the file parameter, behaving as if there was no restart while the build was queued

Actual results

The build fails with:

Running as SYSTEM
Building in workspace /var/jenkins_home/workspace/fs
FATAL: Cannot invoke "org.apache.commons.fileupload.FileItem.getName()" because "this.this$0.file" is null
java.lang.NullPointerException: Cannot invoke "org.apache.commons.fileupload.FileItem.getName()" because "this.this$0.file" is null
	at hudson.model.FileParameterValue$1.setUp(FileParameterValue.java:159)
	at hudson.model.Build$BuildExecution.doRun(Build.java:158)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526)
	at hudson.model.Run.execute(Run.java:1894)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
	at hudson.model.ResourceController.execute(ResourceController.java:101)
	at hudson.model.Executor.run(Executor.java:442)
Finished: FAILURE 

Notes

May be a regression in 1.494 due to 4dde24e according to #9260 (comment)

Activity

  1. jenkins-infra-bot commented on May 13, 2024

    @jenkins-infra-bot
    Author
    • Remote link associated with this issue:

  2. jenkins-infra-bot commented on May 13, 2024

    @jenkins-infra-bot
    Author
  3. jenkins-infra-bot commented on Sep 14, 2025

    @jenkins-infra-bot
    Author
    mawinter69:
    • Original comment link
    • Raw content of original comment:

      Just noting that a stashedFile parameter from file-parameter plugin also doesn't survive a Jenkins restart while it is in the queue

    Just noting that a stashedFile parameter from file-parameter plugin also doesn't survive a Jenkins restart while it is in the queue

  4. jenkins-infra-bot commented on Sep 15, 2025

    @jenkins-infra-bot
    Author
    jglick:
    • Original comment link
    • Raw content of original comment:

      mawinter69 better report that in the plugin (currently there is a test for the Base64 version of this scenario only).

    mawinter69 better report that in the plugin (currently there is a test for the Base64 version of this scenario only).

  5. removed
    bugFor changelog: Minor bug. Will be listed after features
    on Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions