java.lang.InterruptedException: P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Error in client specification. Embedded special characters (*, %%, #, @) not allowed in 'C:\Program Files (x86)\Jenkins\jobs\<redacted>\workspace@script'.

Jenkins JIRA | A C | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    CpsScmFlowDefinition.create() is hard coded to append the "@script" suffix onto workspace directories (line 94 of CpsScmFlowDefinition.java). This suffix string should at least respect the hudson.slaves.WorkspaceList separator character, or provide some other way to change this suffix string, as the @ symbol is often treated as a special character by various tools. Currently, it is entirely impossible to use the workflow plugin with Perforce due to this bug, as @ is an illegal character in Perforce paths. Trying to run a hello world script using "Groovy CPS DSL from SCM" results in: ERROR: failed to start build java.lang.InterruptedException: P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Error in client specification. Embedded special characters (*, %%, #, @) not allowed in 'C:\Program Files (x86)\Jenkins\jobs\<redacted>\workspace@script'. at org.jenkinsci.plugins.p4.tasks.AbstractTask.setWorkspace(AbstractTask.java:63) at org.jenkinsci.plugins.p4.PerforceScm.checkout(PerforceScm.java:277) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:106) at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108) at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:57) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:181) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374)

    Jenkins JIRA | 2 years ago | A C
    java.lang.InterruptedException: P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Error in client specification. Embedded special characters (*, %%, #, @) not allowed in 'C:\Program Files (x86)\Jenkins\jobs\<redacted>\workspace@script'.
  2. 0

    CpsScmFlowDefinition.create() is hard coded to append the "@script" suffix onto workspace directories (line 94 of CpsScmFlowDefinition.java). This suffix string should at least respect the hudson.slaves.WorkspaceList separator character, or provide some other way to change this suffix string, as the @ symbol is often treated as a special character by various tools. Currently, it is entirely impossible to use the workflow plugin with Perforce due to this bug, as @ is an illegal character in Perforce paths. Trying to run a hello world script using "Groovy CPS DSL from SCM" results in: ERROR: failed to start build java.lang.InterruptedException: P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Error in client specification. Embedded special characters (*, %%, #, @) not allowed in 'C:\Program Files (x86)\Jenkins\jobs\<redacted>\workspace@script'. at org.jenkinsci.plugins.p4.tasks.AbstractTask.setWorkspace(AbstractTask.java:63) at org.jenkinsci.plugins.p4.PerforceScm.checkout(PerforceScm.java:277) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:106) at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108) at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:57) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:181) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374)

    Jenkins JIRA | 2 years ago | A C
    java.lang.InterruptedException: P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Error in client specification. Embedded special characters (*, %%, #, @) not allowed in 'C:\Program Files (x86)\Jenkins\jobs\<redacted>\workspace@script'.

    Root Cause Analysis

    1. java.lang.InterruptedException

      P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Error in client specification. Embedded special characters (*, %%, #, @) not allowed in 'C:\Program Files (x86)\Jenkins\jobs\<redacted>\workspace@script'.

      at org.jenkinsci.plugins.p4.tasks.AbstractTask.setWorkspace()
    2. org.jenkinsci.plugins
      WorkflowRun.run
      1. org.jenkinsci.plugins.p4.tasks.AbstractTask.setWorkspace(AbstractTask.java:63)
      2. org.jenkinsci.plugins.p4.PerforceScm.checkout(PerforceScm.java:277)
      3. org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:106)
      4. org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108)
      5. org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:57)
      6. org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:181)
      6 frames
    3. Hudson
      Executor.run
      1. hudson.model.ResourceController.execute(ResourceController.java:98)
      2. hudson.model.Executor.run(Executor.java:374)
      2 frames