bomberstudios/sketch-commands

Not working in Yosemite

cthrp opened this issue · 15 comments

Plugin doesn't seem to be working after updating to Yosemite. Maybe its just me, not sure though.

Getting this in console.app "10/23/14 12:16:52.207 AM All Slices as PDF (Sketch Plugin)[406]: AppSandboxFileAccessPersist.keyForBookmarkDataForURL(file:///Users/colemantharp/Dropbox/Projects/Coleman%20Tharp/PROJECT/iOS/)" when trying to export all artboards as PNG.

Is there anyway to fix this?

Thanks for the report. That seems to be an error in https://github.com/bomberstudios/sketch-sandbox, I'll take a look

Reinstalled Sketch and it seems to have fixed the issue

Experiencing the same issue with Export command. I reinstalled Sketch, but it didn't help. :/

Receiving this error in Console, among many others:

23. 10. 14 19:49:56,000 kernel[0]: Sandbox: Sketch(71734) deny file-write-create /Users/equiet/Desktop/Filename_export

Interestingly, after copying Filename.sketch to another folder, I am able to authorize a new export folder, but only 1 artboard is exported instead of all of them.

@equiet I was seeing a similar issue here with only the first slice being exported. I can no longer reproduce that but I'm seeing the same issue as originally stated.

For the record I've got my own custom script but I'm leveraging the same sandbox and reinstalling Sketch did not solve the problem.

I should also mention that I've been updating my script to automatically determine the export path. It had previously popped up the file chooser and that method had no issues whatsoever with Yosemite.

Any solution?
I wrote to BohemianCoding and got answer: «Thanks for the report but you really have to contact it's developers, it's not directly related to Sketch, but with Yosemite, sorry.»

Now i have OSX Yosemite 10.10.1 (14B23) and issue remain

Which plugins aren't working? The latest beta fixed a bunch of mine.

Richard

On 14 November 2014 13:41, Alexander Khramtsov notifications@github.com
wrote:

Any solution?
I wrote to BohemianCoding and got answer: «Thanks for the report but you
really have to contact it's developers, it's not directly related to
Sketch, but with Yosemite, sorry.»


Reply to this email directly or view it on GitHub
#49 (comment)
.

+1, getting the same issue as @equiet.

11/14/14 11:35:27.389 PM sandboxd[296]: ([3734]) Sketch(3734) deny file-read-data /Users/martinparets/Desktop
11/14/14 11:35:28.182 PM sandboxd[296]: ([3734]) Sketch(3734) deny file-write-create /Users/martinparets/Desktop/R.svg

this was just for exporting selection as SVG to desktop.

@ricburton these plugins didn't work https://github.com/bomberstudios/sketch-commands/tree/master/Export

I use Sketch version 3.1.1 (8761) from App Store. Beta version is not sandboxed isn't it? The issue is only on sandboxed appstore version.

15.11.14 10:16:55,018 All Artboards as PNG (Sketch Plugin)[2041]: AppSandboxFileAccess.persistPermissionURL(file:///Users/falkeyn/Desktop/)
15.11.14 10:16:55,029 sandboxd[234]: ([2041]) Sketch(2041) deny file-read-data /Users/falkeyn/Desktop
15.11.14 10:16:55,185 sandboxd[234]: ([2041]) Sketch(2041) deny file-write-create /Users/falkeyn/Desktop/Test/Demo_export

beta version didn't work either, but got a completely different error.

11/15/14 12:42:17.455 AM Selection to Desktop as SVG (Sketch Plugin)[915]: TypeError: undefined is not a function (evaluating 'sel.rectByAccountingForStyleSize_( sel. absoluteRect(). rect())').
Plugin “Selection to Desktop as SVG”, line 358.
» } «
11/15/14 12:42:17.455 AM Sketch Beta[915]: Exception: {
    column = 45;
    line = 358;
    sourceURL = "/Users/martinparets/Library/Containers/com.bohemiancoding.sketch3.beta/Data/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Export/Selection to Desktop as SVG.sketchplugin";
}

I just pushed a fix in 62da535

Let me know if it works for you.

@bomberstudios

i appreciate you looking into it, but unfortunately that still did not work :( here's my log:

11/15/14 10:45:07.470 AM Selection to Desktop as SVG (Sketch Plugin)[617]: AppSandboxFileAccess.accessFilePath_withBlock_persistPermission
11/15/14 10:45:07.470 AM Selection to Desktop as SVG (Sketch Plugin)[617]: path: /Users/martinparets/Library/Containers/com.bohemiancoding.sketch3/Data/Desktop
11/15/14 10:45:07.470 AM Selection to Desktop as SVG (Sketch Plugin)[617]: AppSandboxFileAccess.accessFileURL_withBlock_persistPermission
11/15/14 10:45:07.470 AM Selection to Desktop as SVG (Sketch Plugin)[617]: fileUrl: file:///Users/martinparets/Library/Containers/com.bohemiancoding.sketch3/Data/Desktop/
11/15/14 10:45:07.470 AM Selection to Desktop as SVG (Sketch Plugin)[617]: block: function do_export() {
  var slice = GKRect.rectWithRect_( rect);
  doc.saveArtboardOrSlice_toFile_( slice  ,export_filename);
  com.bomberstudios.reveal_finder_in(export_filename);
}
11/15/14 10:45:07.471 AM Selection to Desktop as SVG (Sketch Plugin)[617]: persist: true
11/15/14 10:45:07.471 AM Selection to Desktop as SVG (Sketch Plugin)[617]: AppSandboxFileAccessPersist.bookmarkDataForURL('file:///Users/martinparets/Desktop/')
11/15/14 10:45:07.471 AM Selection to Desktop as SVG (Sketch Plugin)[617]: Key: bd_file:///Users/martinparets/Desktop/
11/15/14 10:45:07.472 AM Selection to Desktop as SVG (Sketch Plugin)[617]: Bookmark data found
11/15/14 10:45:07.473 AM Selection to Desktop as SVG (Sketch Plugin)[617]: Bookmark data is stale
11/15/14 10:45:07.473 AM Selection to Desktop as SVG (Sketch Plugin)[617]: AppSandboxFileAccess.persistPermissionURL(file:///Users/martinparets/Desktop/)
11/15/14 10:45:07.000 AM kernel[0]: Sandbox: Sketch(617) deny file-write-create /Users/martinparets/Desktop/reel.svg
11/15/14 10:45:07.524 AM Selection to Desktop as SVG (Sketch Plugin)[617]: Now we need to close access to the URL
11/15/14 10:45:08.301 AM sandboxd[243]: ([617]) Sketch(617) deny file-read-data /Users/martinparets/Desktop

Unfortunately, the last patch did not fix the issue for me either. I was getting the same errors as @martinparets, so I made some changes to the code. The exporting now works for me, see PR #51.

I'm getting the same issues as everyone above. I also tried putting the .sketch file in another folder and the plugin was only able to export one page and one artboard.

If you guys find a solution please post. Thanks.

@equiet it works! Thank you