camunda/camunda-modeler

Additional files deployment not working after latest update

Closed this issue ยท 16 comments

Describe the bug

I'm unable to attach more than one file to a process deployment after updating to v5.29. Disabling all plugins had no effect.

Steps to reproduce

  1. Open a bpmn file
  2. Click the deployment button
  3. Select multiple additional files
  4. Only the first file is shown
  5. Click deploy
  6. If the deployment is successful, only the first selected file is deployed
  7. Regardless of whether the deployment was successful or not, subsequent attempts are not possible because the deployment button becomes unresponsive
  8. The following output is shown in DevTools after clicking the deployment button:
    image

Expected behavior

Multiple files should be attached and deployed

Environment

  • OS: Windows 11 and Windows 10
  • Camunda Modeler Version: 5.29
  • Execution Platform: Camunda 7

Additional context

No response

Thank you for reporting. I can reproduce it in 5.29.0 only. This is a regression.

This is being caused by a breaking change in Electron:
https://www.electronjs.org/docs/latest/breaking-changes#removed-filepath

barmac commented

I am looking into this issue right now. I noticed that the saved configuration is broken too, as we "serialize" the files to this:

[
  { "path": undefined }
]

I have this problem on both 5.28 and 5.29

image

barmac commented

A fix is in progress :)

Thank you @bMarc. I just ran a local build on osx (ARM) from branch 24694-make-multi-file-deployment-work-again- can confirm - its not fixed yet. Will track the merge. Again: thank you very much.

barmac commented

Can you paste here the contents of the devtools when you encounter the problem on my branch? You can access it with F12.
This might be a problem with preexisting configuration.

DeploymentTool.js:683 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'split')
    at DeploymentTool.js:683:19
    at async Promise.all (index 0)
    at async tt.withAttachments (DeploymentTool.js:462:11)
    at async tt.getSavedConfiguration (DeploymentTool.js:370:7)
    at async tt.deployTab (DeploymentTool.js:123:9)

image

barmac commented

Thanks. It looks that we'd need to handle the broken config in that case.
When you deploy, we save the last configuration. Files are serialized as { path: string } objects, but since path is missing, the serialization fails silently.

Are you about to create an automated repair of the configuration then? Or shall/ may/ I try fix the config manually in my case as this is supposedly a one time only problem?

barmac commented

Can you please check if the deployment works for you with the current contents of the branch? We will likely fail gracefully, so there will be no file read from the config as path is missing, but at least you can deploy.

barmac commented

This is how it is supposed to look for the legacy-broken config:
image

Yes. Confirmed:
image

After deleting and adding the correct form files. The deployed worked again. Further deployments seem to be working too. Awesome. Thank you.

barmac commented

Great! Thank you for your support :)

barmac commented

The fix will land in the upcoming 5.30.0 release.

barmac commented

Closed via #4708