Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to export image #1699

Closed
nicolas-75 opened this issue Feb 21, 2020 · 13 comments · Fixed by #1711
Closed

Impossible to export image #1699

nicolas-75 opened this issue Feb 21, 2020 · 13 comments · Fixed by #1711
Assignees
Labels
bug Something isn't working
Milestone

Comments

@nicolas-75
Copy link

nicolas-75 commented Feb 21, 2020

Describe the Bug

Impossible to export image. When I do that a popup as filename and filetype then warn :

File could not be exported
Error:
Cannot destructure property 'encoding' of '(intermediate value)-(intermediate value)(intermediate value)' as it is undefined.
Cancel / Export as ...

I had the same error with all the filetype I tried.

Steps to Reproduce

  1. Open Camunda Modeler
  2. Create new diagram or Open a diagram (BPMN processes or other)
  3. Clic on menu File -> Export as Image
  4. Choose a name then validate
  5. See the warning error message

Expected Behavior

The image is exported instead of a popup warning message

Environment

  • OS: Linux Manjaro
  • Camunda Modeler Version: 3.6.0

Blocked by electron/electron#21170

@nicolas-75 nicolas-75 added the bug Something isn't working label Feb 21, 2020
@pinussilvestrus
Copy link
Contributor

Which image type to you choose for the export? .png, .jpg, .svg?

@pinussilvestrus pinussilvestrus added the help wanted Extra attention is needed label Feb 24, 2020
@nicolas-75
Copy link
Author

Which image type to you choose for the export? .png, .jpg, .svg?

I had the same error with all the filetype I tried. .png, .jpg, .svg?

I had the error even if the diagram is empty. I try with the nightly builds too.

The verbose on terminal when I open the software, add new diagram, export, clic on Cancel when the error popup was displayed:

$ INFO app:main:bootstrap starting Camunda Modeler v3.6.0
INFO app:cli parsing [ '/opt/camunda-modeler/camunda-modeler' ] in '/home/nicolas'
INFO app:flags searching for flags.json in paths [
'/opt/camunda-modeler/resources',
'/home/nicolas/.config/camunda-modeler/resources'
]
INFO app:flags found []
INFO app:flags active {}
INFO app:plugins searching for plugins/*/index.js in paths [
'/opt/camunda-modeler',
'/opt/camunda-modeler/resources',
'/home/nicolas/.config/camunda-modeler/resources',
'/home/nicolas/.config/camunda-modeler'
]
INFO app:plugins found plug-in entries []
INFO app:plugins registered []
INFO app:main:bootstrap received ready
[3566:0224/092049.705179:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
INFO app:main window focused
INFO app:main:bootstrap received client-ready
INFO app:workspace saving
INFO app:workspace saving
INFO app:main window focused
INFO app:main window focused

@oguzeroglu
Copy link
Contributor

Looks like an OS related issue, let's see if we can reproduce this on a Linux Manjaro distro. Thanks for reporting!

@oguzeroglu
Copy link
Contributor

oguzeroglu commented Feb 24, 2020

After a quick research I found this one: https://stackoverflow.com/questions/58347778/electron-fix-errorbuffer-manager-cc488-displaycompositorgl-error-gl-inv

We still need to investigate the negative side effects on performance of this --disable-gpu flag though.

@nicolas-75
Copy link
Author

When I do:
$ /usr/lib/electron/electron /home/nicolas/camunda-modeler-3.6.0-linux-x64/camunda-modeler I have a lot of errors so maybe I don't do something right...

App threw an error during load
/home/nicolas/camunda-modeler-3.6.0-linux-x64/camunda-modeler:1
ELF
^

SyntaxError: Invalid or unexpected token
at Module._compile (internal/modules/cjs/loader.js:815:22)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:892:10)
at Module.load (internal/modules/cjs/loader.js:735:32)
at Module._load (internal/modules/cjs/loader.js:648:12)
at Module._load (electron/js2c/asar.js:717:26)
at Function.Module._load (electron/js2c/asar.js:717:26)
at loadApplicationPackage (/usr/lib/electron/resources/default_app.asar/main.js:109:16)
at Object. (/usr/lib/electron/resources/default_app.asar/main.js:155:9)
at Module._compile (internal/modules/cjs/loader.js:880:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:892:10)
A JavaScript error occurred in the main process
Uncaught Exception:
/home/nicolas/camunda-modeler-3.6.0-linux-x64/camunda-modeler:1
ELF
^

SyntaxError: Invalid or unexpected token
at Module._compile (internal/modules/cjs/loader.js:815:22)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:892:10)
at Module.load (internal/modules/cjs/loader.js:735:32)
at Module._load (internal/modules/cjs/loader.js:648:12)
at Module._load (electron/js2c/asar.js:717:26)
at Function.Module._load (electron/js2c/asar.js:717:26)
at loadApplicationPackage (/usr/lib/electron/resources/default_app.asar/main.js:109:16)
at Object. (/usr/lib/electron/resources/default_app.asar/main.js:155:9)
at Module._compile (internal/modules/cjs/loader.js:880:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:892:10)

The app don't launch and I have to CTRL+C

@pinussilvestrus
Copy link
Contributor

pinussilvestrus commented Feb 24, 2020

We do not support any other Linux distributions then Ubuntu so it seems like we are not able to help you. The errors might really depend on your operating system.

You can read about the supported environments in the documentation.

@nikku
Copy link
Member

nikku commented Feb 24, 2020

I was able to reproduce it (Arch Linux here). The issue is home made and occurs due to the fact how the Save As... dialog works on Linux: It does not automatically assume the file extension for the export file type.

Steps to reproduce:

  • Export Diagram
  • Choose a file name such as Foo.bpmn as a name (file format PNG is selected)
  • Press SAVE
  • Editor explodes

While...

  • Export Diagram
  • Choose a file name such as Foo.bpmn as a name (file format PNG is selected)
  • Need to manually rename to Foo.png
  • Press SAVE
  • Editor exports

@nikku nikku reopened this Feb 24, 2020
@nikku nikku added backlog Queued in backlog and removed help wanted Extra attention is needed labels Feb 24, 2020
@nikku
Copy link
Member

nikku commented Feb 24, 2020

It is quite easy to run into this bug on Linux, as the Save as... dialog does not change the entered files file extension.

@nikku nikku added this to the M34 milestone Feb 24, 2020
@nikku nikku added ready Ready to be worked on and removed backlog Queued in backlog labels Feb 24, 2020
@nikku nikku self-assigned this Feb 24, 2020
@nicolas-75
Copy link
Author

Great! That's work when I add the file extension.

Thanks you! 👍

@nikku
Copy link
Member

nikku commented Feb 24, 2020

Broken upstream it seems: electron/electron#21170.

@nikku
Copy link
Member

nikku commented Feb 24, 2020

To prevent accidental overriding of the diagram, we should pass in the diagram without the extension as a file name.

@pinussilvestrus
Copy link
Contributor

Thanks for double-checking @nikku!

@barmac barmac modified the milestones: M34, M35 Feb 26, 2020
@nikku nikku added in progress Currently worked on and removed ready Ready to be worked on labels Feb 28, 2020 — with bpmn-io-tasks
nikku added a commit that referenced this issue Feb 28, 2020
This ensures that the happy path (saving without changing the file type)
works on Linux.

Related to #1699
nikku added a commit that referenced this issue Feb 28, 2020
@nikku nikku mentioned this issue Feb 28, 2020
3 tasks
@bpmn-io-tasks bpmn-io-tasks bot removed the in progress Currently worked on label Feb 28, 2020
@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Feb 28, 2020
@nikku
Copy link
Member

nikku commented Feb 28, 2020

I've implemented a workaround via #1711.

We need to double check if that one does not break anything on MacOS and Windows though.

barmac pushed a commit that referenced this issue Feb 28, 2020
This ensures that the happy path (saving without changing the file type)
works on Linux.

Related to #1699
barmac pushed a commit that referenced this issue Feb 28, 2020
@nikku nikku closed this as completed Mar 3, 2020
@nikku nikku removed the needs review Review pending label Mar 3, 2020 — with bpmn-io-tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants