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

Error trying to export PNGs #228

Open
jasonkylefrank opened this issue Apr 6, 2020 · 7 comments
Open

Error trying to export PNGs #228

jasonkylefrank opened this issue Apr 6, 2020 · 7 comments

Comments

@jasonkylefrank
Copy link

jasonkylefrank commented Apr 6, 2020

How did it happen?

Try to export PNG images for the artboards.

I'm getting this error on both a pre-existing file and a new, simple file. No PNGs get exported as a result of the error.

I've tried uninstalling all instances of Git.sketchplugin from my machine and starting over with a fresh new download of the plugin. Getting the same error.

On a larger file that I tried the export process on, the beach-ball cursor hung indefinitely. During a normal export process (which doesn't happen now), the cursor turns into the beach-ball for a couple minutes but then completes the export.

Version info

Sketch version: 64
Git-Sketch-Plugin version: 0.12.0 (the new release as of 5 days ago).

Error log

JSON Parse error: Unrecognized token '�'

{
	"line": 1,
	"column": 32249,
	"sourceURL": "/Users/jasonfrank/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Git.sketchplugin/Contents/Sketch/__commands_Export.js"
}

parse@[native code]
v@/Users/jasonfrank/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Git.sketchplugin/Contents/Sketch/__commands_Export.js:1:32249
/Users/jasonfrank/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Git.sketchplugin/Contents/Sketch/__commands_Export.js:1:34592
/Users/jasonfrank/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Git.sketchplugin/Contents/Sketch/__commands_Export.js:1:34545
/Users/jasonfrank/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Git.sketchplugin/Contents/Sketch/__commands_Export.js:1:34578
__skpm_run@/Users/jasonfrank/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Git.sketchplugin/Contents/Sketch/__commands_Export.js:1:35021
__skpm_run@[native code]
@mathieudutour
Copy link
Owner

could you share the file?

@jasonkylefrank
Copy link
Author

jasonkylefrank commented Apr 7, 2020

@mathieudutour The export process fails on every file on my machine and on my colleague's machine (the process either bombs with the same error or the beach-ball hangs indefinitely). I could share a file but all it is a brand new Sketch file with one artboard with a simple rectangle in it. That's it. And again, it happens on every single file. So I'm not sure that there's anything file-specific or even machine-specific going on here.

If you want that one-artboard file, I attached it (I had to change its extension to .txt b/c GitHub won't allow attaching .sketch files). But again, the issue is not file-specific or machine-specific.

Thanks for your help. :-)

Test.txt

@pizzaeater
Copy link

For me the same, the beach-ball hangs indefinitely with the latest update. I need to downgrade until it's fixed :(

@mathieudutour
Copy link
Owner

could you try running

/Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool list artboards "/PATH/TO/YOUR/FILE.sketch" --include-symbols=YES

?
For some reason it seems that the output isn't a JSON object

@pizzaeater
Copy link

could you try running

/Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool list artboards "/PATH/TO/YOUR/FILE.sketch" --include-symbols=YES

?
For some reason it seems that the output isn't a JSON object

Hi, it prints a big JSON with 'pages' etc.

@mathieudutour
Copy link
Owner

right but I think you have a different issue than the OP: JSON Parse error: Unrecognized token '�'

@jasonkylefrank
Copy link
Author

jasonkylefrank commented Apr 22, 2020

@mathieudutour When I ran that command on that simple test file it returned this JSON:

{
  "pages" : [
    {
      "id" : "3752D9A8-72F0-44E4-9BF9-1A66D540054C",
      "name" : "Page 1",
      "bounds" : "654.000000,199.000000,360.000000,720.000000",
      "artboards" : [
        {
          "id" : "E8AEFEB1-B022-4468-836F-327EADE80184",
          "name" : "Test 2",
          "rect" : {
            "y" : 199,
            "x" : 654,
            "width" : 360,
            "height" : 720
          },
          "trimmed" : {
            "y" : 199,
            "x" : 654,
            "width" : 360,
            "height" : 720
          }
        }
      ]
    }
  ]
}

The same error is occurring (even with the newest v0.12.1). Thanks for working on it. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants