fuse import is unable to import your Sketch file due to an internal error.

Hey guys—

I’m having issues importing sketch files. I get the same error regardless of the contents of the .sketch file, I’ve tried multiple different files with different file names, and also dragging the file into preview vs importing via terminal. I’ve tried reinstalling SketchImport, restarting my computer, reinstalling fuse, and nothing seems to work.

I’m on OSX 10.11.1, Sketch v 3.4.2, and Fuse v 0.9.3

Here’s the error I get:

Unhandled Exception:
SketchImporter.UserException: fuse import is unable to import your Sketch file due to an internal error. See above output for more information.
  at SketchImporter.Program.ProcessSketchFile (System.String sketchFile, System.String resPath, System.String appPath, System.Double[] densities) [0x00000] in <filename unknown>:0 
  at SketchImporter.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: SketchImporter.UserException: fuse import is unable to import your Sketch file due to an internal error. See above output for more information.
  at SketchImporter.Program.ProcessSketchFile (System.String sketchFile, System.String resPath, System.String appPath, System.Double[] densities) [0x00000] in <filename unknown>:0 
  at SketchImporter.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
fuse: Import failed: An error occurred

Hopefully I’m doing something stupid! Please help!

Hi,

The SketchImporter has had a ton of bugs weeded out the last weeks, and this file could quite possibly be working with the lastest version. If you’d like I can have a lot at the file and tell you why it’s not working now. Just send it to me.

The error you are posting is that sketchtool does not output any JSON from the dump command. Could you please check if sketchtool dump <filename> gives you any output? If you don’t have sketchtool in your path please try /Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool dump <filename>

I am having the same issue with the same results with the exact same versions as the original poster.

❯ fuse import robinhood.sketch
Analyzing robinhood.sketch. This can take a while if the file is big.

Unhandled Exception:
SketchImporter.UserException: fuse import is unable to import your Sketch file due to an internal error. See above output for more information.
  at SketchImporter.Program.ProcessSketchFile (System.String sketchFile, System.String resPath, System.String appPath, System.Double[] densities) [0x00000] in <filename unknown>:0
  at SketchImporter.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: SketchImporter.UserException: fuse import is unable to import your Sketch file due to an internal error. See above output for more information.
  at SketchImporter.Program.ProcessSketchFile (System.String sketchFile, System.String resPath, System.String appPath, System.Double[] densities) [0x00000] in <filename unknown>:0
  at SketchImporter.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
fuse: Import failed: An error occurred

Any ideas on what the issue could be?

The sketch resource is from http://www.gfxnerds.com/sketch/robinhood-ios-app and the project is a new project created from fuse create app.

I tried using mono directly with the same results:

❯ mono /Applications/Fuse.app/Contents/SketchImporter/SketchImporter.exe robinhood.sketch
Analyzing robinhood.sketch. This can take a while if the file is big.

Unhandled Exception:
SketchImporter.UserException: fuse import is unable to import your Sketch file due to an internal error. See above output for more information.
  at SketchImporter.Program.ProcessSketchFile (System.String sketchFile, System.String resPath, System.String appPath, System.Double[] densities) [0x00000] in <filename unknown>:0
  at SketchImporter.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: SketchImporter.UserException: fuse import is unable to import your Sketch file due to an internal error. See above output for more information.
  at SketchImporter.Program.ProcessSketchFile (System.String sketchFile, System.String resPath, System.String appPath, System.Double[] densities) [0x00000] in <filename unknown>:0
  at SketchImporter.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0

With 0.9.3 the command you sent me crashes with a system font error (which is fixed in development). The error you are referring to is that sketchtool is run, but sketchtool dump robinhood.sketch returns empty string. Can you please send me the output of sketchtool -v and also see that the dump command gives output?

But of course:

❯ sketchtool dump robinhood.sketch
2015-12-03 10:50:54.343 sketchtool[18198:2622909] Exception whilst decoding (version 62): -[MSUnarchiver decodeObjectForKey:]: cannot decode object of class (MSImmutableDocumentData)
Failed to open document robinhood.sketch -- file:///Users/auser/Downloads/playgorund/flowers/
((null) MSDocumentDomain:11)

 +[NSJSONSerialization dataWithJSONObject:options:error:]: value parameter is nil
((null) ECCommandLineDomain:5)

And that comes from sketchtool version:

❯ sketchtool -v
sketchtool Version 1.4 (305)

Any updates/thoughts to what might be causing this? (ping)

Sorry for missing your reply. Can you please try to update your sketchtool? Mine is version 3.4.2. I think you sketchtool is too old to read your sketchfile.

Sketchtool dump output: http://cl.ly/text/1I1h1d0b3t2G

Running sketchtool Version 3.4 (375)

Here’s a sample file that I’m trying to import: http://cl.ly/1444062e3H2r

I updated sketchtool and still getting the same error.

Hi greg,

Can you also please check if you have a sketchtool in /Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool.

The file you used here imported fine for me, and the dump you sent indicates that everything is running fine.

greg, what error are you getting?

For me, the problem was that I was on a VERY old version of sketchtool. Updating it fixed the problem.

I get this error why importing sketch, while my version of sketchtool is 3.4.4.

Demen fuse creation $ fuse import new.sketch 
Analyzing new.sketch. This can take a while if the file is big.

Unhandled Exception:
SketchImporter.UserException: fuse import is unable to import your Sketch file due to an internal error. See above output for more information.
  at SketchImporter.Program.ProcessSketchFile (System.String sketchFile, System.String resPath, System.String appPath, System.Double[] densities) [0x00000] in <filename unknown>:0 
  at SketchImporter.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: SketchImporter.UserException: fuse import is unable to import your Sketch file due to an internal error. See above output for more information.
  at SketchImporter.Program.ProcessSketchFile (System.String sketchFile, System.String resPath, System.String appPath, System.Double[] densities) [0x00000] in <filename unknown>:0 
  at SketchImporter.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
fuse: Import failed: An error occurred

It’s really a nightmare. I am playing around with so many ways and cannot find out a solution. Please help

This error is because sketchtool cannot export the assets from the sketch file. Can you check that you can run sketchtool with the sketch-file, or send me the sketchfile so I can test.

https://www.dropbox.com/s/twfc6w7owj97vsg/new.sketch?dl=0

Thank you for your instant response, here please check.

With Fuse 0.9.6 this works for me. Can you please try the following commands, and paste the output:

/usr/local/bin/sketchtool -v

/Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool -v

/usr/local/bin/sketchtool metadata new.sketch

Here you are

 /usr/local/bin/sketchtool -v
-bash: /usr/local/bin/sketchtool: No such file or directory

 /Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool -v
sketchtool Version 3.4.4 (395)

/usr/local/bin/sketchtool metadata new.sketch
-bash: /usr/local/bin/sketchtool: No such file or directory

Thank you.

Please try:

/Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool dump new.sketch

I’m having the same problem.

I have followed your advise and paste in the terminal, “/Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool dump new.sketch”.

It’s not working.

@Anderson Carswell: Is it not outputting anything, or is it saying command not found?