mjmlio / mjml-app

:email: The desktop app for MJML
http://mjmlio.github.io/mjml-app
MIT License
842 stars 81 forks source link

`setSize` function incorrect signature on Windows #214

Open RichForever opened 6 years ago

RichForever commented 6 years ago

To help us help you, provide as much information as you can. You'll find below a template you can use to submit your issue, but feel free to remove any part that wouldn't be relevant here.

Hello, I want to save screenshot from my MJML template. It seems to don't work for me.

Reproduction Steps:

  1. I opened my mjml project in mjml app on pc (app version 2.8.0, mjml version 4.0.0)
  2. I clicked on "screenshot" button
  3. Nothing happens. I check folder with my project - nothing inside

Expected behavior:

First I want to confirm where screenshots should be saved, and of course I want to make it work for me :D

MJML version:

PC App - 2.8.0 MJML - 4.0.0

meriadec commented 6 years ago

Hmm.. that's interesting. I just tested on Windows + Linux and it worked. The screenshots should be generated in your current working directory.

screenshot

Can you open the developer tools (View -> Toggle Developer Tools), go to the "Console" tab of devtools, then take the screenshot and copy/paste eventual errors here? Thanks !

RichForever commented 6 years ago

@meriadec

Here it is. btw, I also tried to export screenshot from vscode and it worked. But I want to use export in app for both mobile and pc view.

mjml-error-1 mjml-error-2

meriadec commented 6 years ago

Okay so your problem seems to be raised here, and given the error message I will suspect a floating/arithmetical problem.

Can you re-define the dimensions of mobile & desktop ? You can access them in Settings > Preview

RichForever commented 6 years ago

@meriadec Unfortunately it didn't help. I redefine dimensions like you ask. mjml-error-3

meriadec commented 6 years ago

~~Okaaay I just reproduced the issue. The problem is caused by the missing image in your template. Can you try removing the mj-images tags for those two urls:~~

uua

Anyway, that should do the trick for now, but mjml-app should be able to handle that simple case.

edit: reproduced problem on windows build, even without missing images 😢 investigation needed

relatable: https://github.com/Microsoft/vscode/issues/26509, https://github.com/electron/electron/issues/7351