Syrius - Issue when building from source on Windows

Hi everyone!

I’ve been stuck on this for hours, hoping someone here can help me.
I’m trying to build Syrius v0.0.5 on Windows from source but I’m getting this error. It happens when the splash-screen animation ends and doesn’t transition to the wallet screen. The app doesn’t crash.
Any ideas?

======== Exception caught by widgets library =======================================================
The following assertion was thrown while finalizing the widget tree:
Duplicate GlobalKey detected in widget tree.

The following GlobalKey was specified multiple times in the widget tree. This will lead to parts of the widget tree being truncated unexpectedly, because the second time a key is seen, the previous instance is moved to the new location. The key was:
- [GlobalKey#80e3e]
This was determined by noticing that after the widget with the above global key was moved out of its previous parent, that previous parent never updated during this frame, meaning that it either did not update at all or updated before the widget was moved, in either case implying that it still thinks that it should have a child with that global key.
The specific parent that did not update after having one or more children forcibly removed due to GlobalKey reparenting is:
- Screenshot
A GlobalKey can only be specified on one widget at a time in the widget tree.

@Sigli might need to engage the devs? Any thoughts?

Yes I will try to find out and will let you know how to resolve this. Thank you

1 Like

What Flutter version are you using?

flutter doctor

[√] Flutter (Channel stable, 2.10.5, on Microsoft Windows [Version 10.0.19044.1645], locale en-US)
[X] Android toolchain - develop for Android devices
X Unable to locate Android SDK. (afaik i don’t need this)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.2)
[√] Android Studio (version 2020.3)
[√] IntelliJ IDEA Community Edition (version 2021.2)
[√] VS Code (version 1.66.0)
[√] Connected device (3 available)
[√] HTTP Host Availability

I also tried to use the master channel version of Flutter but that resulted in build dependency failures.

I’ve managed to build syrius successfully from source! :grin:
I must have made a mistake when setting up my dev environment for this project; I’m not sure why my pubspec.yaml had changed.

I’ll outline some lessons I learned along the way, in case someone else runs into similar issues.

  1. Adhere to the published pubspec.yaml.
    When in doubt, overwrite your pubspec.yaml with the published copy and run flutter pub get.

  2. Flutter can be brittle.
    After running flutter pub outdated and flutter pub upgrade, some packages used to compile syrius were not compatible with the project anymore.
    A solution to this was to

  • find the offending package in pubspec.yaml
  • remove the caret (^) prepending the version number
    – Example
    – from: infinite_scroll_pagination: ^3.1.0
    – to: infinite_scroll_pagination: 3.1.0
  • (optional) run flutter pub cache clean
    – Disclaimer: this will delete everything in C:\Users\<user>\AppData\Local\Pub\Cache\
  • (optional) delete or rename pubspec.lock
  • run flutter pub get
  1. flutter: Error: Zenon SDK Exception: Library libargon2 could not be found
    This error was thrown by Argon2FfiFlutter() in znn_sdk_dart\lib\src\argon2\argon2.dart because it could not find argon2_ffi_plugin.dll in the following locations:
  • Current Directory: C:\syrius\
  • flutter: Searching for C:\syrius\argon2_ffi_plugin.dll
  • flutter: Searching for C:\syrius\build\windows\runner\Debug\argon2_ffi_plugin.dll
  • flutter: Searching for C:\syrius\build\windows\runner\Resources\argon2_ffi_plugin.dll
  • flutter: Searching for C:\znn_sdk_dart\lib\src\argon2\blobs\argon2_ffi_plugin.dll
  • flutter: Searching for C:\packages\znn_sdk_dart\lib\src\argon2\blobs\argon2_ffi_plugin.dll
    I resolved this by copying the contents of …\znn_sdk_dart\lib\src\argon2\blobs\ into C:\syrius\.

As for the problem I originally reported… :person_shrugging:
It’s not happening for me anymore.