Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Sketch To Flutter Code Conversion #28

Closed
DepressoExpressoBoi opened this issue Sep 23, 2020 · 6 comments · Fixed by #47
Closed

Sketch To Flutter Code Conversion #28

DepressoExpressoBoi opened this issue Sep 23, 2020 · 6 comments · Fixed by #47
Labels
bug Something isn't working question Further information is requested

Comments

@DepressoExpressoBoi
Copy link
Contributor

  1. Created a simple sketch file trying to replicate how the demo sketch layer out it's components.
  2. Opened the terminal to the the Parabeac-Core Directory, and entered the command to convert the Sketch file to flutter code.
  3. Got the following messages on the terminal:

[INFO]: Installing Para-beac core and its dependencies

audited 525 packages in 4.62s

34 packages are looking for funding
run npm fund for details

found 1 moderate severity vulnerability
run npm audit fix to fix them, or npm audit for details

Installed Sketch Asset Converter dependencies

Error: Error when reading 'pub': No such file or directory
npm WARN sketch-assets-converter@1.0.0 No repository field.
npm WARN sketch-assets-converter@1.0.0 No license field.

[INFO]: No URL provided

[INFO]: Processing plugins...

[INFO]: Plugin already in file. Skipping...

[ERROR]: No semantics found for Tab

[INFO]: Plugin already in file. Skipping...

[INFO]: Plugin already in file. Skipping...

[INFO]: Done processing!

Main: [INFO] - [-p, /Users/saidajo/Desktop/magic_calculator.sketch, -n, MagicTest]

Sketch: [INFO] - We encountered a page that has 0 page items.

Sketch: [INFO] - We encountered a page that has 0 page items.

Interpret: [ERROR] - NoSuchMethodError: The getter 'boundaryRectangle' was called on null.
Receiver: null
Tried calling: boundaryRectangle

PBAlignGenerationService: [WARNING] - We don't support class type Null for adding to the queue.

lib/main.dart: Warning: Interpreting this as package URI, 'package:parabeac_core/main.dart'.
Unhandled exception:
NoSuchMethodError: The getter 'name' was called on null.
Receiver: null
Tried calling: name
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1 Interpret._generateGroup (package:parabeac_core/controllers/interpret.dart:85:31)

#2 Interpret.interpretAndOptimize (package:parabeac_core/controllers/interpret.dart:64:49)

#3 SketchController.convertSketchFile (package:parabeac_core/controllers/sketch_controller.dart:31:38)
#4 main (package:parabeac_core/main.dart:86:30)
#5 _RootZone.runUnary (dart:async/zone.dart:1450:54)
#6 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#7 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#8 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#9 Future._completeWithValue (dart:async/future_impl.dart:529:5)
#10 Future._asyncCompleteWithValue. (dart:async/future_impl.dart:567:7)
#11 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#12 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#13 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#14 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)

  1. After Getting these messages I entered nom audit to get details from the first message saying that their was a nom vulnerability and got the following message:

npm ERR! code EAUDITNOPJSON npm ERR! audit No package.json found: Cannot audit a project without a package.json

@DepressoExpressoBoi DepressoExpressoBoi changed the title Sketch To Flutter Code Conversion Sketch To Flutter Code Conversion 🏷️bug Sep 23, 2020
@DepressoExpressoBoi DepressoExpressoBoi changed the title Sketch To Flutter Code Conversion 🏷️bug Sketch To Flutter Code Conversion Sep 23, 2020
@DepressoExpressoBoi DepressoExpressoBoi changed the title Sketch To Flutter Code Conversion Sketch To Flutter Code Conversion label:bug Sep 23, 2020
@DepressoExpressoBoi DepressoExpressoBoi changed the title Sketch To Flutter Code Conversion label:bug Sketch To Flutter Code Conversion Sep 23, 2020
@Ihuds577
Copy link
Contributor

Hey DepressoExpressoBoi, this looks like it's an issue with Dart. What Operating System are you using? Also, it looks like you do have Flutter installed, do you happen to know which version of Flutter you have installed (If you installed 1.20 or below it does not include the dart pub dependencies).

@DepressoExpressoBoi
Copy link
Contributor Author

I am using MacOS, and as for flutter I am using version 1.20.4 since I had updated it a couple of days ago. I also installed dart separately since when I first cloned the repo I was getting dart errors then too.

@siliconivan
Copy link
Member

@Ihuds577 I don't think this was an issue with dart. See the following:
NoSuchMethodError: The getter 'name' was called on null.

Has anyone tried running this on our end? I believe he shared the sketch file in Discord.

@Ihuds577 Ihuds577 added bug Something isn't working question Further information is requested labels Sep 24, 2020
@DepressoExpressoBoi
Copy link
Contributor Author

After testing making different type of sketch files, it seems that the bug comes from when I insert the basic shapes from Sketch. When I enter images and text it seems to work as expected and doesn't prompt me any image. Also the null message is coming from the boundaryRectangle variable from the inserting basic shapes from Sketch.

@siliconivan
Copy link
Member

That's super weird, they should just be converted into images from SketchAssetConverter. I did try testing your sketch file on my end and received the error around boundaryRectangle throwing an error. I will keep digging into this. I noticed we don't have docs on creating a debugging environment, we should get those in, it may make it easier for you to give debugging a shot as well. Stay tuned.

@DepressoExpressoBoi
Copy link
Contributor Author

Ok, and I've been reading through the code myself to see if I can understand what might be causing the error. So I'll keep doing more investigation from my side as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working question Further information is requested
Projects
None yet
3 participants