matt-curtis / Fluid-for-Sketch

[Sketch Plugin] Sketch-flavored Auto Layout-like Constraints
2.38k stars 69 forks source link

Framework/Bundle fail to load, plugin commands fail to run in rare cases #32

Closed rohapa closed 9 years ago

rohapa commented 9 years ago

Doesn't work with Sketch 3.4 or 3.4.1

matt-curtis commented 9 years ago

Likely issue #15.

rohapa commented 9 years ago

Nope, didn't install using Toolbox.

matt-curtis commented 9 years ago

Could you elaborate? How did you install? What happens when you click the Plugin menu options - nothing at all? Does the plugin appear in the Plugins menu at all?

Also, could you tell me what prints in the Console.app?

rohapa commented 9 years ago

Installed manually.

11/5/15 9:34:21.096 AM Sketch[10982]: Exception: (null)
11/5/15 9:34:21.096 AM Show/Hide Toolbar (Sketch Plugin)[10982]: *** -[__NSArrayM objectAtIndex:]: index 390 beyond bounds [0 .. 9]
11/5/15 9:34:21.097 AM Show/Hide Toolbar (Sketch Plugin)[10982]: Error in command Show/Hide Toolbar Script at path /Users/robertpaige/Library/Containers/com.bohemiancoding.sketch3/Data/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Sketch/dynamicCommands.js does not contain a handler function named: command_toggleToolbarVisiblity
matt-curtis commented 9 years ago

Hmm. You downloaded the zipped plugin using the link in the README, right? Could you try downloading and installing it again?

rohapa commented 9 years ago

Yes. Doesn't work.

matt-curtis commented 9 years ago

Please include what version of OS X you're running, your Sketch version, and whether it is from the App Store or the Sketch site.

OK, let's try this:

  1. In Sketch, go to Plugins > Manage Plugins.... In the bottom left of the window that opens, click the tiny cog, then Show Plugins Folder.
  2. Close Sketch, and any open documents in Sketch.
  3. In the Plugins Folder we just opened, delete any folder or .sketchplugin you see that has Fluid in its name.
  4. Download the .sketchplugin.zip from the README, extract it, and drag the extracted .sketchplugin into the Plugins Folder.
  5. Re-open Sketch, and try one of the menu options from Plugins > Fluid again.

This is a little on the nuclear side, but should eliminate the potential causes.

Please provide your Console.app log, so that I can confirm the same error is persisting.

rohapa commented 9 years ago

Still Error

11/5/15 9:56:01.440 AM Show/Hide Toolbar (Sketch Plugin)[21174]: Error in command Show/Hide Toolbar Script at path /Users/robertpaige/Library/Containers/com.bohemiancoding.sketch3/Data/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Sketch/dynamicCommands.js does not contain a handler function named: command_toggleToolbarVisiblity
matt-curtis commented 9 years ago

That's puzzling. Is your version of Sketch from the Mac App Store or the Sketch site? The error you are getting is consistent with the corrupt/invalid download error Sketch Toolbox users are currently getting. Since you haven't downloaded using Sketch Toolbox and are installing manually, you shouldn't be having this problem... You are trying this all on 3.4.1, right?

rohapa commented 9 years ago

I downloaded from the App Store, currently I switched back to 3.4 because I couldn't get Fluid to work. And so I'm staying on 3.4 until it's released on the App Store.

matt-curtis commented 9 years ago

I'm sorry you aren't able to use Fluid. :/ I'm going to continue to investigate this and see if I can't come up with a solution, or at least isolate what's causing it. I'll update you via this issue & Twitter.

rohapa commented 9 years ago

No problem. I just wish I could use your wonderful plugin.

Thanks!

itsgrafik commented 9 years ago

Hi Matt, here's +1 with the same issue, different errors. Except I installed Fluid through the Sketch Toolbox, uninstalled it and then installed it manually. Nothing I do seems to work.

Console log:

11/6/15 02:46:50.095 Sketch[653]: Version 3.4.1 (15681). Variant is NONAPPSTORE. Config is Release. Crash reporting is enabled. Updating is enabled.
11/6/15 02:46:54.101 Sketch[653]: Error loading /Users/Vladimir/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Resources/MCSketchConstraints.bundle/Contents/MacOS/MCSketchConstraints:  dlopen(/Users/Vladimir/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Resources/MCSketchConstraints.bundle/Contents/MacOS/MCSketchConstraints, 265): Symbol not found: _NSEdgeInsetsZero
  Referenced from: /Users/Vladimir/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Resources/MCSketchConstraints.bundle/Contents/MacOS/MCSketchConstraints
  Expected in: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
 in /Users/Vladimir/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Resources/MCSketchConstraints.bundle/Contents/MacOS/MCSketchConstraints
11/6/15 02:46:54.102 Sketch[653]: Exception: ReferenceError: Can't find variable: MCSConstraintsPluginController
11/6/15 02:46:54.103 Show/Hide Toolbar (Sketch Plugin)[653]: ReferenceError: Can't find variable: MCSConstraintsPluginController
stack: /Users/Vladimir/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Sketch/commands.js:431:55
dynFunc@/Users/Vladimir/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Sketch/commands.js:406:18
line: 431
sourceURL: /Users/Vladimir/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Sketch/commands.js
11/6/15 02:47:01.878 Sketch[653]: Exception: ReferenceError: Can't find variable: MCSConstraintsPluginController
11/6/15 02:47:01.878 Edit Constraints (Sketch Plugin)[653]: ReferenceError: Can't find variable: MCSConstraintsPluginController
stack: /Users/Vladimir/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Sketch/commands.js:437:55
dynFunc@/Users/Vladimir/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Sketch/commands.js:406:18
line: 437
sourceURL: /Users/Vladimir/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Sketch/commands.js
matt-curtis commented 9 years ago

Ah, well. Whatever this is is just a bundle of joy. I suspect this is still the same issue that Sketch Toolbox suffers from (even though neither of you have installed via it), where the bundle and framework files somehow get corrupted.

@itsgrafik, did you: a.) install via Sketch Toolbox (they aren't working, install manually, see README) and b.) try the instructions above?

itsgrafik commented 9 years ago

I did install via Sketch Toolbox, uninstalled and then followed the instructions but just not working... I am still on Mavericks tho, maybe that could remotely be related to the reason?

matt-curtis commented 9 years ago

It's possible. @rohapa are you on Mavericks as well?

rohapa commented 9 years ago

Yosemite

disablesilence commented 9 years ago

Hello! +1 same issue. (I wrote about this in Twitter).

The plugin was installed manually, but nothing happens at startup. OS X Mavericks, Sketch 3.4.1.

May be downgrade to 3.4.0?

matt-curtis commented 9 years ago

No, downgrading won't fix it, unfortunately. It could be caused by your using Mavericks, but as rohapa above is on Yosemite that doesn't quite explain it. Maybe two different issues.

Could you include your console.app log?

disablesilence commented 9 years ago

08.11.15 17:52:27,586 Sketch[310]: Exception: ReferenceError: Can't find variable: MCSConstraintsPluginController 08.11.15 17:52:27,586 Show/Hide Toolbar (Sketch Plugin)[310]: ReferenceError: Can't find variable: MCSConstraintsPluginController stack: /Users/admin/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Sketch/dynamicCommands.js:436:55 dynFunc@/Users/admin/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Sketch/dynamicCommands.js:411:18 line: 436 sourceURL: /Users/admin/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Sketch/dynamicCommands.js 08.11.15 17:52:32,962 Sketch[310]: Exception: ReferenceError: Can't find variable: MCSConstraintsPluginController 08.11.15 17:52:32,962 Preview (Sketch Plugin)[310]: ReferenceError: Can't find variable: MCSConstraintsPluginController stack: /Users/admin/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Sketch/dynamicCommands.js:454:55 dynFunc@/Users/admin/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Sketch/dynamicCommands.js:411:18 line: 454 sourceURL: /Users/admin/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Fluid.sketchplugin/Contents/Sketch/dynamicCommands.js

disablesilence commented 9 years ago

In the coming days I will try to upgrade to El Capitan

matt-curtis commented 9 years ago

Do let me know if that works. Is there anything else that you left out of your log? Usually there's a load failure related to the framework or bundle.

disablesilence commented 9 years ago

Of course, Matt

image

cherry2000 commented 9 years ago

+1+1 same issue

The plugin was installed manually. OS X Mavericks 10.9.5, Sketch 3.4.2.

I tried to use the plugin functions with the demo (Constraints Demos.sketch) but nada happens... ?

bildschirmfoto 2015-11-18 um 17 55 51

BlakWolf commented 9 years ago

DONE! thanks

matt-curtis commented 9 years ago

@BlakWolf I'm sorry? I don't see anything.

matt-curtis commented 9 years ago

So far, I'm guessing that this has something to do with Mavericks (10.9), maybe, as that's the only common denominator I see. No clue why, there aren't any known issues with Mavericks and loading frameworks.

matt-curtis commented 9 years ago

Oh! This is obvious now - NSEdgeInsets isn't available in 10.9, only 10.10+. I feel silly, the error was staring me right in the face. I'll have this fixed in 1.7, everyone. Sorry for the wait.

This is also why you set deployment targets correctly, ladies and gents

disablesilence commented 9 years ago

Yohooo! Waiting next release!