sigtm / sketch-style-libraries

Sync layer & text styles from any Sketch Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dialogue box not appearing when running plugin

connerdrew opened this issue · comments

There seems to be a bug that prevents the sketch style libraries dialog box from appearing when running the plugin. I've confirmed this on multiple machines with varying existing/new files. So far the machines test have been running sketch 49.3.

Our design systems team was hoping to release this as the new way to sync our text styles for our design team, but can't recommend this with this bug existing yet :(

Thanks!

I am having the same issue. I am using Abstract if that has anything to do with it. Sketch 49.3.

That's weird, and you aren't getting the "Couldn't find any user defined libraries" message at the bottom either? I'm on 49.3 and use Abstract too, so that's a bit worrying if it randomly doesn't work for a bunch of users :/

I was just made aware of a potential issue with Sketch 50 that I was planning to fix tonight, but no idea why 49.3 wouldn't work.

Has it never worked, or did it recently stop working?

I just downloaded it for the first time and tried to use it. I get no dialogs or alerts when clicking Fetch or Push. I do get a 'No Duplicate Styles' dialog when clicking merge duplicate styles.

I restarted Sketch and reinstalled the plugin. I am still on 49.3 and have no updated to 50 yet.

@nickm717 Yeah that's not great :/ Any chance you could check the plugin log at ~/Library/Logs/com.bohemiancoding.sketch3/Plugin Output.log and let me know if there are any errors there? Basically anything you find via cmd+f and searching for sketch-style-libraries

@sigtm It's been intermittent for me. Initially it was working great, then it would stop presenting the dialog. I get no visible message at the bottom. Abstract is currently not installed, but as. This is also happening with many people on my team, not just me.

The problem still exists with Sketch 50.

FWIW I just updated to 2.0.1 running Sketch 50 and it appears to still be broken. The dialog box appearing that is.

@sigtm This is what appeared when I searched.

sourceURL: /Users/cdrew/Library/Application Support/com.bohemiancoding.sketch3/Plugins/sketch-style-libraries.sketchplugin/Contents/Sketch/sync-styles.js
stack: getLibraryID@/Users/cdrew/Library/Application Support/com.bohemiancoding.sketch3/Plugins/sketch-style-libraries.sketchplugin/Contents/Sketch/sync-styles.js:162:25
selectOptions@/Users/cdrew/Library/Application Support/com.bohemiancoding.sketch3/Plugins/sketch-style-libraries.sketchplugin/Contents/Sketch/sync-styles.js:444:41
pullStyles@/Users/cdrew/Library/Application Support/com.bohemiancoding.sketch3/Plugins/sketch-style-libraries.sketchplugin/Contents/Sketch/sync-styles.js:667:26
__skpm_run@/Users/cdrew/Library/Application Support/com.bohemiancoding.sketch3/Plugins/sketch-style-libraries.sketchplugin/Contents/Sketch/sync-styles.js:740:17
sourceURL: /Users/cdrew/Library/Application Support/com.bohemiancoding.sketch3/Plugins/sketch-style-libraries.sketchplugin/Contents/Sketch/sync-styles.js
stack: getLibraryID@/Users/cdrew/Library/Application Support/com.bohemiancoding.sketch3/Plugins/sketch-style-libraries.sketchplugin/Contents/Sketch/sync-styles.js:162:25
selectOptions@/Users/cdrew/Library/Application Support/com.bohemiancoding.sketch3/Plugins/sketch-style-libraries.sketchplugin/Contents/Sketch/sync-styles.js:444:41
pullStyles@/Users/cdrew/Library/Application Support/com.bohemiancoding.sketch3/Plugins/sketch-style-libraries.sketchplugin/Contents/Sketch/sync-styles.js:667:26
__skpm_run@/Users/cdrew/Library/Application Support/com.bohemiancoding.sketch3/Plugins/sketch-style-libraries.sketchplugin/Contents/Sketch/sync-styles.js:740:17

Thanks @connerdrew, that's very helpful 👍 Looking into it right now to see if I can figure out what's going on.

Ah, looks like Sketch has changed how you access a library's ID, which the plugin uses to remember which library you synced with last time. It's been added to a proper API now, which is great news and means it should be an easy fix :) Nevermind, the old way should still work and the new API is incomplete for what this plugin needs. So have to keep it the same, but will add a check to avoid problems if there is an issue with the library ID for any reason.

Just gotta check to see if there's anything else that's sneakily broken, but I'll get the fix out today barring any major surprises.

@connerdrew & @nickm717 Would you be willing to test this version to see if it fixes it?

https://www.dropbox.com/s/3vnadz2ocoq3qzq/sketch-style-libraries.sketchplugin.zip?dl=1

Just unzip and double click to install like usual. All I've done so far is add a check so it hopefully won't fail if it can't grab the ID of a library. If it works I'll push the update to the production version right away.

@sigtm Thank you for the fast response and turnaround!

I tried to install the plugin but it doesn't seem to be installing. I've downloaded the plugin from dropbox and double clicked with no update. I tried removing the previous version as well as manually copying the plug into the sketch plugins folder. Still no luck :(

FWIW when I downloaded the plugin from dropbox I didn't need to unzip the file, it was just the plugin directly.

@connerdrew Wow I can't get anything to work these days :) I've released 2.0.2 now which includes the same fix, so hopefully the update should appear in Sketch now anyway. If not, you can download it from the 2.0.2 release here:

https://github.com/sigtm/sketch-style-libraries/releases/download/v2.0.2/sketch-style-libraries.sketchplugin.zip

Did that fix it? 🤞

I was able to install it this time :)

Unfortunately the dialog still isn't opening in some of my files :( If I create a new file it works just fine, but not in some of my existing files.

Any chance you'd be able to share one of those files with me, even just a duplicate with any sensitive design work removed? Hopefully it won't work with that file on my end either, which would make debugging much easier :)

@sigtm best way to share a file privately?

@connerdrew Good question. If you're able to e-mail it or a download link you can send it to mannsaker@gmail.com?

FYI I'm getting the same problem (running Sketch 50) the dialogue doesn't open on existing documents and there's no message of any kind, it's like nothing happened. Testing on a new blank document works fine.

Exactly, blank documents are fine, but the files that have already fetched the library don't show the dialogue box for me..

@enrayarne Just to clarify, it doesn't work if you've fetched styles already, then saved and re-opened it? Or does it already stop working immediately after the first sync?

Really weird that I can't reproduce this. I'll push an update tonight with proper error logging, hopefully that will help me get to the bottom of this!

OK just pushed 2.0.3, which adds some error handling that might resolve it, or at the very least display an error message and log some stuff.

Can anyone confirm if you see any improvement in the new version? And if not, would you be able to check ~/Library/Logs/com.bohemiancoding.sketch3/Plugin Output.log and see if there is anything there from "Style Libraries" or "sketch-style-libraries"?

It looks like it actually fixed the original issue for me! Thanks! Although, I had to update manually. It didn't show in the plugin updater native to sketch. At least yet...

@connerdrew Weird, maybe it just takes some time to propagate. I don't publish it manually, I just use the skpm tool for it, so I don't even know what goes into it 😄 I'll leave this issue open for a bit longer until I feel confident the patch got out and the issue is gone for everyone. Thanks for your help!

@sigtm if I fetched it already it didn't show. On documents where I didn't fetch it yet it would show only once.

Since your 2.0.3 push everything seems to be working fine again!

@enrayarne good stuff, I'm relieved it's finally working! I'll close this then, thanks for your help everyone 😄