Skip to content

Monarch does not build from sources: it tries to open version file from flutter sdk which is not present in it #166

@artem-kamyshev

Description

@artem-kamyshev

Here is the output:

PS C:\repos\monarch_src> dart .\tools\build.dart all

### clean.dart

Cleaning directory at:
  C:\repos\monarch_src\out

Cleaning directory at:
  C:\repos\monarch_src\platform\windows\gen_seed

Cleaning directory at:
  C:\repos\monarch_src\platform\windows\gen

Cleaning directory at:
  C:\repos\monarch_src\platform\windows\build


### build_cli.dart

Using Dart SDK version: 3.10.4 (stable) (Tue Dec 9 00:01:55 2025 -0800) on "windows_x64"
Running `dart pub get` in:
  C:\repos\monarch_src\cli

Building monarch_cli executable. Will output to:
  C:\repos\monarch_src\out\monarch\bin\monarch.exe

Monarch CLI build finished.
Unhandled exception:
PathNotFoundException: Cannot open file, path = 'c:\\FlutterSDK\\flutter\version' (OS Error: Cannot find the file specified, errno = 2)
#0      _File.throwIfError (dart:io/file_impl.dart:783:7)
#1      _File.openSync (dart:io/file_impl.dart:576:5)
#2      _File.readAsBytesSync (dart:io/file_impl.dart:664:18)
#3      _File.readAsStringSync (dart:io/file_impl.dart:719:18)
#4      get_flutter_version (file:///C:/repos/monarch_src/tools/paths.dart:95:54)
#5      flutter_id (file:///C:/repos/monarch_src/tools/paths.dart:55:17)
#6      out_ui_flutter_id (file:///C:/repos/monarch_src/tools/paths.dart:61:20)
#7      BuildWithFlutterCommand.run (file:///C:/repos/monarch_src/tools/build.dart:119:13)
#8      BuildAllCommand.run (file:///C:/repos/monarch_src/tools/build.dart:59:36)
<asynchronous suspension>
#9      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#10     main (file:///C:/repos/monarch_src/tools/build.dart:40:5)
<asynchronous suspension>

The file is indeed missing. I have checked an archive with the latest flutter sdk and it does not have this file as well: https://docs.flutter.dev/install/manual

OS: Windows 10

flutter doctor output:

PS C:\repos\monarch_src> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.38.5, on Microsoft Windows [Version 10.0.19045.6456], locale ru-RU)
[√] Windows Version (Њ ©Єа®б®дв Windows 10 Pro 64-а §ап¤­ п, 22H2, 2009)
[√] Android toolchain - develop for Android devices (Android SDK version 36.0.0-rc1)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.13.6)
[√] Connected device (3 available)
[!] Network resources
    X A cryptographic error occurred while checking "https://pub.dev/": Connection terminated during handshake
      You may be experiencing a man-in-the-middle attack, your network may be compromised, or you may have malware installed on your computer.
    X A cryptographic error occurred while checking "https://storage.googleapis.com/": Connection terminated during handshake
      You may be experiencing a man-in-the-middle attack, your network may be compromised, or you may have malware installed on your computer.
    X A cryptographic error occurred while checking "https://maven.google.com/": Connection terminated during handshake
      You may be experiencing a man-in-the-middle attack, your network may be compromised, or you may have malware installed on your computer.
    X A cryptographic error occurred while checking "https://cocoapods.org/": Connection terminated during handshake
      You may be experiencing a man-in-the-middle attack, your network may be compromised, or you may have malware installed on your computer.
    X A cryptographic error occurred while checking "https://github.com/": Connection terminated during handshake
      You may be experiencing a man-in-the-middle attack, your network may be compromised, or you may have malware installed on your computer.

I get some wierd errors on network here, but they are obliviously have nothing to do with a missing file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions