Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displays "Running Reattach Instance" forever #17

Open
patrickrushton opened this issue Oct 1, 2020 · 4 comments · May be fixed by #18
Open

Displays "Running Reattach Instance" forever #17

patrickrushton opened this issue Oct 1, 2020 · 4 comments · May be fixed by #18

Comments

@patrickrushton
Copy link

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

@renancamm
Copy link
Owner

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 :)

@glebsexy
Copy link
Contributor

glebsexy commented Oct 1, 2020

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.

@patrickrushton
Copy link
Author

patrickrushton commented Oct 5, 2020

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

@glebsexy
Copy link
Contributor

glebsexy commented Oct 5, 2020

Wow thanks a lot! <3

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

glebsexy added a commit to glebsexy/figma-reattache-instance that referenced this issue Oct 6, 2020
@glebsexy glebsexy linked a pull request Oct 6, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants