figma-reattache-instance icon indicating copy to clipboard operation
figma-reattache-instance copied to clipboard

Displays "Running Reattach Instance" forever

Open patrickrushton opened this issue 4 years ago • 4 comments

9 times out of 10 the plugin doesn't work for me. I get the "Running Reattach Instance" message with the spinner and nothing further happens.

I'm working with a typically complex design system with components in a Team Library that use several levels of nesting.

image

patrickrushton avatar Oct 01 '20 08:10 patrickrushton

Hi @patrickrushton, thanks for the feedback.

"Doesn't work all the time with team libraries" is part of know problems, but idk how to fix it. Let me know if you have any insight :)

renancamm avatar Oct 01 '20 08:10 renancamm

Hi @patrickrushton, it's hard to say what issue could be without more details. Could you open console (Plugins → Development → Open Console) and send a screenshot of what it prints when running the plugin? But general slowness is expected when processing large amounts of objects.

Other than that, check out Master plugin. (I contributed a part of the code from Master that keeps overrides to this plugin.) It works slightly differently but it allows you to do basically the same things and even more. It's well-optimized so it should work even with complex components from the library.

glebsexy avatar Oct 01 '20 09:10 glebsexy

Thanks @zyumbik I just bought 3 licenses of Master ;-)

As for Reattach Instance - it still has a use case for me that's not covered by Master which is to reattach an instance without having a target handy to relink to. I end up with un-attached instances all the time when copying an instance that was nested inside another library component. In this case, I just want to quickly reattach to the main component it (while maintaining overrides) without having to select a target.

This is the console log that I'm seeing when I try to do that:

Console was cleared figma_app.ba2bcaff1499c83f84715f0ef4c9ba32.min.js:996 ------- Clearing and silencing console.log from Figma ------- jsvm-cpp.js.br:8 unhandled promise rejection: Error: in createInstance: Can't create instance of nested main component. Please call figma.importComponentByKeyAsync(symbol.key) and await the result. The resulting component can be using createInstance(). printChar @ jsvm-cpp.js.br:8 jsvm-cpp.js.br:8 at (PLUGIN_5_SOURCE:37) printChar @ jsvm-cpp.js.br:8 jsvm-cpp.js.br:8 at next (native) printChar @ jsvm-cpp.js.br:8 jsvm-cpp.js.br:8 at (PLUGIN_5_SOURCE:6) printChar @ jsvm-cpp.js.br:8 jsvm-cpp.js.br:8 at Promise (native) printChar @ jsvm-cpp.js.br:8 jsvm-cpp.js.br:8 at (PLUGIN_5_SOURCE:7) printChar @ jsvm-cpp.js.br:8 jsvm-cpp.js.br:8 at main (PLUGIN_5_SOURCE:58) printChar @ jsvm-cpp.js.br:8 jsvm-cpp.js.br:8 at (PLUGIN_5_SOURCE:287) printChar @ jsvm-cpp.js.br:8 jsvm-cpp.js.br:8 at call (native) printChar @ jsvm-cpp.js.br:8 jsvm-cpp.js.br:8 at (PLUGIN_5_SOURCE:292) printChar @ jsvm-cpp.js.br:8 jsvm-cpp.js.br:8 printChar @ jsvm-cpp.js.br:8

patrickrushton avatar Oct 05 '20 12:10 patrickrushton

Wow thanks a lot! <3

As for the error, I understand the issue and will try to fix tomorrow.

glebsexy avatar Oct 05 '20 14:10 glebsexy