abynim / UserFlows

A plugin for generating user walkthroughs from Artboards in Sketch.
MIT License
1.42k stars 74 forks source link

can not create userflow diagram #161

Closed dew90730 closed 5 years ago

dew90730 commented 5 years ago

v.2.3.3, latest version can not create userflow diagram. it just creates a copied artboard and an copied image of the artboard selected as 'start from'.

sketch is version 53, which is the latest one.

abynim commented 5 years ago

@dew90730 Please add a screenshot of your UserFlows settings so I can reproduce your exact environment. Thanks!

meekjt commented 5 years ago

@abynim I have the same issue, here are my settings:

screen shot 2019-02-20 at 16 23 13
janusc commented 5 years ago

Have the same problem. image

Screenshot of where the plugin doesn't create a new page and there is a bitmap of the first selected artboard on top of the artboard.

Really appreciate your plugin a lot :-)

abynim commented 5 years ago

@meekjt @janusc Thanks for reporting. Do you see errors logged in Console.app when trying to generate a diagram?

danielthall commented 5 years ago

I am having the same issue with Sketch 53.2

Here is the output to the console:

TypeError: instance.detachByReplacingWithGroup is not a function. (In 'instance.detachByReplacingWithGroup()', 'instance.detachByReplacingWithGroup' is undefined)
line: 769
sourceURL: /Users/danielthall/Library/Application Support/com.bohemiancoding.sketch3/Plugins/UserFlows.sketchplugin/Contents/Sketch/script.js
column: 49
stack: recursivelyDetachSymbolInstance@/Users/danielthall/Library/Application Support/com.bohemiancoding.sketch3/Plugins/UserFlows.sketchplugin/Contents/Sketch/script.js:769:49
artboardWithDetachedSymbolsFromArtboard@/Users/danielthall/Library/Application Support/com.bohemiancoding.sketch3/Plugins/UserFlows.sketchplugin/Contents/Sketch/script.js:791:34
generateFlowWithSettings@/Users/danielthall/Library/Application Support/com.bohemiancoding.sketch3/Plugins/UserFlows.sketchplugin/Contents/Sketch/script.js:1100:63
generateFlow@/Users/danielthall/Library/Application Support/com.bohemiancoding.sketch3/Plugins/UserFlows.sketchplugin/Contents/Sketch/script.js:924:27
abynim commented 5 years ago

Thanks @danielthall the log was very helpful. Could you please install the version from this branch and confirm if the issue is fixed: https://github.com/abynim/UserFlows/tree/sketch53-2-compatibility

danielthall commented 5 years ago

@abynim You're amazing! Yes, that fixed it. Thank you so much.

abynim commented 5 years ago

Awesome! Thanks for confirming. Merged 👍

danielthall commented 5 years ago

@abynim Sorry- but I am seeing another error on another machine. Same file, same sketch version, using the latest plugin release:

TypeError: null is not an object (evaluating 'sketch.fromNative(instance).detach().sketchObject')
line: 771
sourceURL: /Users/hmi/Library/Application Support/com.bohemiancoding.sketch3/Plugins/UserFlows.sketchplugin/Contents/Sketch/script.js
column: 50
stack: recursivelyDetachSymbolInstance@/Users/hmi/Library/Application Support/com.bohemiancoding.sketch3/Plugins/UserFlows.sketchplugin/Contents/Sketch/script.js:771:50
recursivelyDetachSymbolInstance@/Users/hmi/Library/Application Support/com.bohemiancoding.sketch3/Plugins/UserFlows.sketchplugin/Contents/Sketch/script.js:783:35
recursivelyDetachSymbolInstance@/Users/hmi/Library/Application Support/com.bohemiancoding.sketch3/Plugins/UserFlows.sketchplugin/Contents/Sketch/script.js:783:35
recursivelyDetachSymbolInstance@/Users/hmi/Library/Application Support/com.bohemiancoding.sketch3/Plugins/UserFlows.sketchplugin/Contents/Sketch/script.js:783:35
recursivelyDetachSymbolInstance@/Users/hmi/Library/Application Support/com.bohemiancoding.sketch3/Plugins/UserFlows
abynim commented 5 years ago

@danielthall does it also show the same error message? In your previous log you had TypeError: ... but that's missing here.

danielthall commented 5 years ago

I'm sorry, I had a formatting error with my comment! I just updated it.

danielthall commented 5 years ago

I can confirm that this doesn't always occur. Some flows seem to be fine, while others have a TypeError almost immediately. Trying to dig in and see if I can tell what it is that it doesn't like.

abynim commented 5 years ago

Yeah, I could not reproduce this at all. Will dig deeper this weekend when I have some more time. At the very least I can wrap it in a try.. catch and have it fail elegantly whenever it does. Thanks for helping debug this @danielthall 🙌

danielthall commented 5 years ago

@abynim Good thinking! I just did that locally and it seems to have fixed it.

Looking into it, I think I have identified the actual problem. I have a symbol that is called Transparent that I use as a color override sometimes. That is actually just a blank symbol with nothing in it, and that's what was causing the error. I don't think I actually need this symbol anymore, but even so, failing gracefully doesn't negatively impact the production of the generated flow diagram.

danielthall commented 5 years ago

@abynim Would you like me to create a PR for adding the try ... catch?

danielthall commented 5 years ago

@abynim Following up about this issue. Happy to put a PR in

abynim commented 5 years ago

@danielthall Yes please, that would be very much appreciated. Thanks for following up 🙏

danielthall commented 5 years ago

@abynim I have the work done in a branch, but I don't have access to make a PR here

abynim commented 5 years ago

Added you as a collaborator 👍 Please feel free to merge your changes unless you think a review is absolutely required.

danielthall commented 5 years ago

Cool thanks! Just merged into the v2 branch!