Unable to impor sketch file due to missing font even it exists

Hi,

I am unable to import a sketch file. The error reports that there is a missing font file but it is present in the filesystem on that path. Any ideas what could be up?

================= Import Error: vinay:~/projects/sketchproj/sketchproj$ fuse import ~/Downloads/fuse/roomify-roommate-finder-app.sketch Analyzing roomify-roommate-finder-app.sketch. This can take a while if the file is big. Analyzing file structure… Extracting font: System Font Regular

Unhandled Exception: System.IO.FileNotFoundException: file:///System/Library/Fonts/HelveticaNeueDeskInterface.ttc does not exist File name: ‘file:///System/Library/Fonts/HelveticaNeueDeskInterface.ttc’ at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, Boolean overwrite) [0x00000] in :0 at SketchImporter.UXBuilder.RegisterFont (System.String identifierName, System.String originalName, System.String name) [0x00000] in :0 at SketchImporter.TextLayer.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.EmitChildren (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.EmitChildren (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.EmitChildren (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.Page.EmitChildren (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.Document.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.Program.ProcessSketchFile (System.String sketchFile, System.String resPath, System.String appPath, System.Double[] densities) [0x00000] in :0 at SketchImporter.Program.Main (System.String[] args) [0x00000] in :0 [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: file:///System/Library/Fonts/HelveticaNeueDeskInterface.ttc does not exist File name: ‘file:///System/Library/Fonts/HelveticaNeueDeskInterface.ttc’ at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, Boolean overwrite) [0x00000] in :0 at SketchImporter.UXBuilder.RegisterFont (System.String identifierName, System.String originalName, System.String name) [0x00000] in :0 at SketchImporter.TextLayer.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.EmitChildren (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.EmitChildren (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.EmitChildren (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.Page.EmitChildren (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.Document.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.Program.ProcessSketchFile (System.String sketchFile, System.String resPath, System.String appPath, System.Double[] densities) [0x00000] in :0 at SketchImporter.Program.Main (System.String[] args) [0x00000] in :0 fuse: Import failed: An error occurred

================= Font File Exists:

vinay:~/projects/sketchproj/sketchproj$ ls -alt /System/Library/Fonts/HelveticaNeueDeskInterface.ttc -rw-r–r-- 1 root wheel 5393616 Sep 9 2014 /System/Library/Fonts/HelveticaNeueDeskInterface.ttc

Btw this is the sketch file I was importing: http://www.sketchappsources.com/free-source/1624-roomify-search-for-roommates-sketch-freebie-concept.html

Hi,

It seems you are missing some of the fonts required by the .sketch file in your system.

We’ll look into the ugly error message, thanks for posting.

I am receiving that same error message. I have tried using multiple fonts, all of which are installed on my system. Any help would be appreciated as I am really looking forward to trying this feature out if I can just get past this hurdle.

Can you upload the .sketch file which has the problem? If the fonts are installed, this shouldn’t happen. If the file is private, you can use https://dropbox.com/request/Rx1QN3QluvxAJiyGJqrh and we’ll keep it private and just for diagnostics. :slight_smile:

I have uploaded a test sketch file (SketchImportTest) that simply has one word with the Helvetica Neue font.

The error I get is almost exactly the same as above:

Extracting font: Helvetica Neue

Unhandled Exception: System.IO.FileNotFoundException: file:///System/Library/Fonts/HelveticaNeue.dfont does not exist File name: ‘file:///System/Library/Fonts/HelveticaNeue.dfont’ at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, Boolean overwrite) [0x00000] in :0 at SketchImporter.UXBuilder.RegisterFont (System.String identifierName, System.String originalName, System.String name) [0x00000] in :0 at SketchImporter.TextLayer.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.EmitChildren (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.Page.EmitChildren (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.Document.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.Program.ProcessSketchFile (System.String sketchFile, System.String resPath, System.String appPath, System.Double[] densities) [0x00000] in :0 at SketchImporter.Program.Main (System.String[] args) [0x00000] in :0 [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: file:///System/Library/Fonts/HelveticaNeue.dfont does not exist File name: ‘file:///System/Library/Fonts/HelveticaNeue.dfont’ at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, Boolean overwrite) [0x00000] in :0 at SketchImporter.UXBuilder.RegisterFont (System.String identifierName, System.String originalName, System.String name) [0x00000] in :0 at SketchImporter.TextLayer.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.EmitChildren (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.Page.EmitChildren (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.ParentLayer.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.Document.Emit (SketchImporter.UXBuilder ux) [0x00000] in :0 at SketchImporter.Program.ProcessSketchFile (System.String sketchFile, System.String resPath, System.String appPath, System.Double[] densities) [0x00000] in :0 at SketchImporter.Program.Main (System.String[] args) [0x00000] in :0 fuse: Import failed: An error occurred

I do however have the font installed:

Ryans-MacBook-Air:/ ryandurant$ find /System/Library/Fonts -name “HelveticaNeue.dfont”

/System/Library/Fonts/HelveticaNeue.dfont

Thanks! I’ve created an internal ticket to get this checked out.

No problem. Thank you for looking in to it! I’m loving your product so far and would be delighted to be able to import from Sketch. Let me know if you need me to test anything else.

Thanks guys for looking into it!

Any progress on this? I would be happy to help troubleshoot if there is anything I can do.

Hi,

I’m not sure why this happens, but can you try to run it from the command line like this:

mono /Applications/Fuse.app/Contents/SketchImporter/SketchImporter.exe SketchImportTest.sketch

hi, can you please provide the file “SketchImportTest.sketch” so that I can test it out.

Try this with any .sketch file.

Here you go: https://gist.github.com/vinaykr/305d165380e48ff2a421 and this is the sample sketch file: http://www.gfxnerds.com/sketch/robinhood-ios-app

Hi,

This issue is (hopefully) solved in the next release. You can try now writing this instead of fuse import: mono /Applications/Fuse.app/Contents/SketchImporter/SketchImporter.exe robinhood-ios-app-ui-thecoolgeeknet.sketch

Please rename the .sketch file to not have any dashes in it (for instance robinhood.sketch or robinhood_ios_app_ui_thecoolgeeknet.sketch) to prevent a couple of other issues, that will be fixed in a later release.

Thanks Bjorn! It is much better but still breaking while trying to access temp folder. Here is the error: System.UnauthorizedAccessException: Access to the path ‘robinhood.sketch-assets/temp/’ is denied.

and the gist: https://gist.github.com/vinaykr/fba6c1202ecb60637693

I guess it still doesn’t like the path of the assets folder :slight_smile:

Any ideas when the next release will come out?

This issue is also fixed in the next version of the SketchImporter.

I’m not involved in the release process, so I don’t have the exact date, but it shouldn’t be too long.

Thanks for the help. I’ll wait for the release to come out.

0.9.2 is release. Please check if that fixes your problems.

Hi,

I tested the robinhood sketch file again. The import process went farther than last time but still got stuck due to another font issue. Here is the output: https://gist.github.com/vinaykr/1d5307d48f60a55d0e29

This font file is not present on my system font path /System/Library/Fonts/ . Do I need the font file to make this work? Shouldn’t it fallback to some default font?