Coder Social home page Coder Social logo

Comments (54)

Connoropolous avatar Connoropolous commented on May 28, 2024 2

you will want to separate those different things into different issues. Nobody can track with your scenario cleanly. You are having 3 separate classes of issues:

  1. installation of the development tools. Windows native isn’t technically a supported platform but I seems there’s no reason that it couldn’t be, in terms of viability.
  2. Happ development. The error you raised about “manifest” is almost certainly a version mismatch issue, in terms of compatibility . The only way to resolve it is to share a complete copy of your environment or more of your project code or context such that it can be inspected and reproduced.
  3. Building a holochain client for C#. This is a very specialized need. You should focus on getting support from the people who develop holochain clients. Such as @guillemcordoba , @matthme and @jost-s for this category

from holochain.

Connoropolous avatar Connoropolous commented on May 28, 2024 1

@neonphog
Do you have any tips for @dellams on this?
It's a big value to help David (David meet David) out because he is basically building (and well into it with many past releases already out) a Unity and C# client for Holochain.

from holochain.

Connoropolous avatar Connoropolous commented on May 28, 2024 1

Nice!

Yeah so

cargo install --version 0.2.3 --force lair_keystore

from holochain.

dellams avatar dellams commented on May 28, 2024 1

yes correct, it was all generated from the scaffolding tool so it should all be working?

from holochain.

Connoropolous avatar Connoropolous commented on May 28, 2024

@dellams you need to install lair-keystore.

This could be done like:

cargo install --force lair_keystore

from holochain.

dellams avatar dellams commented on May 28, 2024

Ok thanks, I tried this but got a new error about Open SSL:

error: failed to run custom build command for `openssl-sys v0.9.90`

Caused by:
  process didn't exit successfully: `C:\Users\USER\AppData\Local\Temp\cargo-install2pkDVZ\release\build\openssl-sys-35892b6a0d22f27c\build-script-main` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR
  X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  OPENSSL_NO_VENDOR unset
  running "perl" "./Configure" "--prefix=C:\\Users\\USER\\AppData\\Local\\Temp\\cargo-install2pkDVZ\\release\\build\\openssl-sys-a1ee2527945e4423\\out\\openssl-build\\install" "--openssldir=SYS$MANAGER:[OPENSSL]" "no-dso" "no-shared" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "no-engine" "no-asm" "VC-WIN64A"

  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: NotFound, message: "program not found" }', C:\Users\USER\.cargo\registry\src\index.crates.io-6f17d22bba15001f\openssl-src-111.26.0+1.1.1u\src\lib.rs:504:39
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `lair_keystore v0.2.4`, intermediate artifacts can be found at `C:\Users\USER\AppData\Local\Temp\cargo-install2pkDVZ`

Do I need to try and install OpenSSL separately?

Thanks

from holochain.

Connoropolous avatar Connoropolous commented on May 28, 2024

yeah you'll need to install openssl

from holochain.

dellams avatar dellams commented on May 28, 2024

Ok, I tried but it wont let me because they are libraries:

C:\Users\USER>cargo install --force openssl
    Updating crates.io index
  Downloaded openssl v0.10.55
  Downloaded 1 crate (258.8 KB) in 0.75s
error: there is nothing to install in `openssl v0.10.55`, because it has no binaries
`cargo install` is only for installing programs, and can't be used with libraries.
To use a library crate, add it as a dependency to a Cargo project with `cargo add`.

C:\Users\USER>cargo install --force openssl-sys
    Updating crates.io index
error: there is nothing to install in `openssl-sys v0.9.90`, because it has no binaries
`cargo install` is only for installing programs, and can't be used with libraries.
To use a library crate, add it as a dependency to a Cargo project with `cargo add`.

and here https://github.com/openssl/openssl/releases/tag/openssl-3.1.1 doesn't appear to have any windows install?

from holochain.

Connoropolous avatar Connoropolous commented on May 28, 2024

more like this:
https://thesecmaster.com/procedure-to-install-openssl-on-the-windows-platform/

from holochain.

Connoropolous avatar Connoropolous commented on May 28, 2024

I don't use windows nowadays so this is speculation, but based on my overall knowledge of holochain

from holochain.

dellams avatar dellams commented on May 28, 2024

I just checked and already have it installed as part of my git install here:

image

So odd cargo is still trying to install it? I guess because that is using it as a lib instead of a binary?

from holochain.

Connoropolous avatar Connoropolous commented on May 28, 2024

I just passed your error to GPT4, and it says the following. I HIGHLY recommend paying 20$ a month for it, it will save you countless hours and blockers.


The error message you're seeing is because the build process for the openssl-sys crate, which provides FFI bindings to OpenSSL, couldn't find OpenSSL installed on your system.

Here's how you can fix this issue:

  1. Download OpenSSL for Windows

    The easiest way to get OpenSSL on Windows is to use precompiled binaries. You can download the latest version of OpenSSL for Windows from this link. Be sure to download the version that matches your system's architecture (32 or 64 bit).

    During the installation process, make sure to select the option "Copy OpenSSL DLLs to: The OpenSSL binaries (/bin) directory".

  2. Add OpenSSL to your PATH

    After you've installed OpenSSL, you need to add its bin directory to your system PATH environment variable. This allows programs to locate the OpenSSL libraries.

    You can do this by:

    • Right-click on "Computer" or "This PC" in the start menu or file explorer, and choose "Properties".
    • Click on "Advanced System Settings".
    • Click on "Environment Variables".
    • In the "System Variables" section, scroll until you find the "Path" variable, select it, and click on "Edit".
    • In the "Variable value" field, add the path to your OpenSSL's bin directory. The paths are separated by semicolons. An example might look like this C:\Program Files\OpenSSL\bin;.
  3. Set OPENSSL_DIR Environment Variable

    The openssl-sys crate uses the OPENSSL_DIR environment variable to locate your OpenSSL installation.

    You can set this variable by:

    • Following the steps above to get to the "Environment Variables" window.
    • In the "User Variables" section, click on "New".
    • For "Variable name", enter OPENSSL_DIR.
    • For "Variable value", enter the path to your OpenSSL installation. This should be the parent directory of your bin folder. An example might look like this C:\Program Files\OpenSSL.
  4. Recompile Your Project

    After you've done all of this, you should be able to recompile your project without any issues. If you're using Cargo, you can do this with cargo build.

If you still encounter issues, it might be a version conflict between the openssl-sys crate and the installed OpenSSL version. Check if you're using the latest version of openssl-sys, or try installing a version of OpenSSL that's known to work with your version of openssl-sys.

from holochain.

Connoropolous avatar Connoropolous commented on May 28, 2024

of course there's no guarantees that will work, but I have found its success rate to be quite high in troubleshooting

from holochain.

dellams avatar dellams commented on May 28, 2024

Ok great thanks bro, I followed all of the above but I am still getting the same error. :(

So it might be like it says at the bottom that the crate is looking for an older version of OpenSSL? But how will I know which version it is looking for?

The error message mentions openssl-sys v0.9.90 but there is no OpenSSL version that old on the download page suggested above?

https://slproweb.com/products/Win32OpenSSL.html

I installed the latest ( v3.1.1).

Any other ideas? Thanks bro.

P.S. Out of interest what question did you ask GPT4? Is that the same as the Bing Chat Bot? I used that before and I think it is powered by GPT4 also...

from holochain.

Connoropolous avatar Connoropolous commented on May 28, 2024

Maybe this…

https://stackoverflow.com/a/70949736

from holochain.

ThetaSinner avatar ThetaSinner commented on May 28, 2024

Officially Holochain doesn't guarantee Windows support I believe, but the Launcher runs fine on Windows so that's probably the best place to look for hints. I see it's using a provided GitHub runner to build Holochain here https://github.com/holochain/launcher/blob/main/.github/workflows/release.yaml#L37C41-L37C45.

Looking at the software for that runner https://github.com/actions/runner-images/blob/main/images/win/Windows2019-Readme.md it lists OpenSSL 1.1.1u.

I think @Connoropolous is on the right track with trying to get OpenSSL installed. I have a Windows environment here although I only work in WSL so let me have a go at getting things installed and I will post back here with any useful information I find if I get this working

from holochain.

ThetaSinner avatar ThetaSinner commented on May 28, 2024

Okay I think I've got it. The thing that's missing isn't actually openssl. We ask for openssl-sys to vendor OpenSSL so it's actually trying to build OpenSSL for you and doesn't have the tools it needs to do that. The requirements are described here https://github.com/sfackler/rust-openssl/blob/0f0bbe42bcfe817bb943e3ed36efee9a875c8458/openssl/src/lib.rs#L14. I already have a working C compiler in my environment but I think that has to be there because rustup installs MSVC on Windows. The thing I was perl. I installed Strawberry Perl from here https://strawberryperl.com/.

Once I did, I was able to run the cargo install --version 0.2.4 lair_keystore command.

@dellams could you give that a try and let me know if anything else isn't working? I don't know exactly what else I might have installed on this machine so I can't be sure Perl is everything you need :)

from holochain.

ThetaSinner avatar ThetaSinner commented on May 28, 2024

Worth mentioning that the runner docs I linked above also mentions Perl. So that's quietly available on the Windows GitHub runner which is why it's not been noticed.

from holochain.

neonphog avatar neonphog commented on May 28, 2024

Thanks @Connoropolous @ThetaSinner for chipping in on this, and thanks @dellams for digging in to this!

Yeah, unfortunately I don't use Windows and the github actions windows ci runner comes pre-installed with everything needed to build lair, so I don't have any experience with the process.

One thing we could consider doing is building a Windows lair-keystore release artifact through github actions that could just be downloaded and run directly.

In the mean time, if you are able to figure out how to build it directly, let me know what was required or feel free to make a PR to update the README.md here over in the lair repo with the info. Thanks!

from holochain.

dellams avatar dellams commented on May 28, 2024

Good news! :) It worked! thank you.

But now lairkeystone is working we got a new error, the conductor crashed:

←[1;34mhc-sandbox:←[0m Creating 1 conductor sandboxes with same settings
# passphrase>

# lair-keystore init generating secure config...

# lair-keystore init config:
"C:\\Users\\USER\\AppData\\Local\\Temp\\aTeh_MPOPeR6KCzgEDQzl\\keystore\\lair-keystore-config.yaml"

# lair-keystore init connection_url:
named-pipe:\\.\pipe\T7C8WaDx4BNomX1t7kCyY?k=hHbWFNb4gqs-3WgbzawzPkL-eFBUUNPXfr2aW8jaExI
←[1;34mhc-sandbox:←[0m Config ConductorConfig { environment_path: DatabaseRootPath("C:\\Users\\USER\\AppData\\Local\\Temp\\aTeh_MPOPeR6KCzgEDQzl"), keystore: LairServer { connection_url: Url2 { url: "named-pipe:\\\\.\\pipe\\T7C8WaDx4BNomX1t7kCyY?k=hHbWFNb4gqs-3WgbzawzPkL-eFBUUNPXfr2aW8jaExI" } }, dpki: None, admin_interfaces: Some([AdminInterfaceConfig { driver: Websocket { port: 0 } }]), network: None, chc_namespace: None, db_sync_strategy: Fast }
←[1;34mhc-sandbox:←[0m Created directory at: ←[1;4;48;5;254;38;5;4mC:\Users\USER\AppData\Local\Temp\aTeh_MPOPeR6KCzgEDQzl←[0m ←[1mKeep this path to rerun the same sandbox←[0m
←[1;34mhc-sandbox:←[0m Created config at C:\Users\USER\AppData\Local\Temp\aTeh_MPOPeR6KCzgEDQzl\conductor-config.yaml
←[1;34mhc-sandbox:←[0m Command { std: "lair-keystore" "--lair-root" "C:\\Users\\USER\\AppData\\Local\\Temp\\aTeh_MPOPeR6KCzgEDQzl\\keystore" "server" "--piped", kill_on_drop: true }
# lair-keystore connection_url # named-pipe:\\.\pipe\T7C8WaDx4BNomX1t7kCyY?k=hHbWFNb4gqs-3WgbzawzPkL-eFBUUNPXfr2aW8jaExI #
# lair-keystore running #
←[1;34mhc-sandbox:←[0m Command { std: "holochain" "--structured" "--piped" "--config-path" "C:\\Users\\USER\\AppData\\Local\\Temp\\aTeh_MPOPeR6KCzgEDQzl\\conductor-config.yaml", kill_on_drop: true }
WARNING: running without local db encryption
WARNING: running without local db encryption
Well, this is embarrassing.

holochain had a problem and crashed. To help us diagnose the problem you can send us a crash report.

We have generated a report file at "C:\Users\USER\AppData\Local\Temp\report-da646295-663a-49ca-b8d2-bb09cf280373.toml". Submit an issue or email with the subject of "holochain Crash Report" and include the report as an attachment.thread '
main
' panicked at '- Homepage: https://github.com/holochain/holochainFailed to get admin port from conductor: RecvError(())
', - Authors: Holochain Core Dev Team <[email protected]>C:\Users\USER\holochain-holochain-0.1.3\crates\hc_sandbox\src\run.rs
:
98We take privacy seriously, and do not perform any automated error collection. In order to improve the software, we rely on people to submit reports.:
10

Thank you kindly!note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

C:\Users\USER\holochain-holochain-0.1.3\happs\oasis>

from holochain.

dellams avatar dellams commented on May 28, 2024

And here is the contents of the error report:

name = "holochain"
operating_system = "Windows 10.0.19045 (Windows 10 Pro) [64-bit]"
crate_version = "0.1.3"
explanation = '''
Panic occurred in file 'crates\holochain\src/bin/holochain/main.rs' at line 175
'''
cause = "Could not initialize Conductor from configuration: Other({\"error\":\"Invalid lair server version, this client requires '0.2.3', but got '0.2.4'.\"})"
method = "Panic"
backtrace = '''

   0: 0x7ff6891553d9 - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\sys_common\backtrace.rs:150
   1: 0x7ff689157680 - std::panicking::begin_panic_handler
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\panicking.rs:578
   2: 0x7ff68937c0d5 - core::panicking::panic_fmt
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\core\src\panicking.rs:67
   3: 0x7ff68937c5f6 - core::result::unwrap_failed
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\core\src\result.rs:1687
   4: 0x7ff686d3754e - tokio::runtime::park::CachedParkThread::block_on::hfb4c5cfd004a25e4
   5: 0x7ff686d38820 - tokio::runtime::context::runtime::enter_runtime::hdf23eb23e2dd478d
   6: 0x7ff6870a6351 - tokio::runtime::runtime::Runtime::block_on::h32ff9e2fc04fb0bf
   7: 0x7ff686d38b1d - tokio::runtime::scheduler::multi_thread::worker::block_in_place::hacb3b64f424e133c
   8: 0x7ff686f570da - holochain_util::tokio_helper::block_forever_on::h45276e33f74b91b6
   9: 0x7ff686b8b1cc - structopt::StructOpt::from_args::h382466800f23b9a3
  10: 0x7ff686c17806 - std::sys_common::backtrace::__rust_end_short_backtrace::hf1030f80c7b50dec
  11: 0x7ff686c1781c - std::rt::lang_start::{{closure}}::h1f668355d3f2e008
  12: 0x7ff6891469fe - core::ops::function::impls::impl$2::call_once
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\core\src\ops\function.rs:287
  13: 0x7ff6891469fe - std::panicking::try::do_call
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\panicking.rs:485
  14: 0x7ff6891469fe - std::panicking::try
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\panicking.rs:449
  15: 0x7ff6891469fe - std::panic::catch_unwind
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\panic.rs:140
  16: 0x7ff6891469fe - std::rt::lang_start_internal::closure$2
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\rt.rs:148
  17: 0x7ff6891469fe - std::panicking::try::do_call
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\panicking.rs:485
  18: 0x7ff6891469fe - std::panicking::try
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\panicking.rs:449
  19: 0x7ff6891469fe - std::panic::catch_unwind
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\panic.rs:140
  20: 0x7ff6891469fe - std::rt::lang_start_internal
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\rt.rs:148
  21: 0x7ff686b8b50c - main
  22: 0x7ff6892e801c - invoke_main
                at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  23: 0x7ff6892e801c - __scrt_common_main_seh
                at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  24: 0x7ffcaadc7614 - BaseThreadInitThunk
  25: 0x7ffcaaf026f1 - RtlUserThreadStart'''

Any ideas guys? Your help is really appreciated, thank you to you all for chipping in, appreciated! :) <3

from holochain.

dellams avatar dellams commented on May 28, 2024

Looks like it is looking for the wrong keystone version, so I will see if I can install 0.2.3. What is the cargo command for that?

cargo install --force lair_keystore --version v2.0.3 or something?

from holochain.

dellams avatar dellams commented on May 28, 2024

Great thanks, that worked, finally having a running conductor for v1.0.3! :)

But it seems to start the conductor twice or start two? It never use to do that?

# lair-keystore init connection_url:
named-pipe:\\.\pipe\w7oThBfKb0irO-Z817BQd?k=Quo7l0yJFtGkKPkjNFBVSUq0bhrNcGo-3o402xaRsjg
←[1;34mhc-sandbox:←[0m Config ConductorConfig { environment_path: DatabaseRootPath("C:\\Users\\USER\\AppData\\Local\\Temp\\2HvVnB1GJl7yl8bHs92ia"), keystore: LairServer { connection_url: Url2 { url: "named-pipe:\\\\.\\pipe\\w7oThBfKb0irO-Z817BQd?k=Quo7l0yJFtGkKPkjNFBVSUq0bhrNcGo-3o402xaRsjg" } }, dpki: None, admin_interfaces: Some([AdminInterfaceConfig { driver: Websocket { port: 0 } }]), network: None, chc_namespace: None, db_sync_strategy: Fast }
←[1;34mhc-sandbox:←[0m Created directory at: ←[1;4;48;5;254;38;5;4mC:\Users\USER\AppData\Local\Temp\2HvVnB1GJl7yl8bHs92ia←[0m ←[1mKeep this path to rerun the same sandbox←[0m
←[1;34mhc-sandbox:←[0m Created config at C:\Users\USER\AppData\Local\Temp\2HvVnB1GJl7yl8bHs92ia\conductor-config.yaml
←[1;34mhc-sandbox:←[0m Command { std: "lair-keystore" "--lair-root" "C:\\Users\\USER\\AppData\\Local\\Temp\\2HvVnB1GJl7yl8bHs92ia\\keystore" "server" "--piped", kill_on_drop: true }
# lair-keystore connection_url # named-pipe:\\.\pipe\w7oThBfKb0irO-Z817BQd?k=Quo7l0yJFtGkKPkjNFBVSUq0bhrNcGo-3o402xaRsjg #
# lair-keystore running #
←[1;34mhc-sandbox:←[0m Command { std: "holochain" "--structured" "--piped" "--config-path" "C:\\Users\\USER\\AppData\\Local\\Temp\\2HvVnB1GJl7yl8bHs92ia\\conductor-config.yaml", kill_on_drop: true }
WARNING: running without local db encryption
WARNING: running without local db encryption

Conductor ready.
←[1;34mhc-sandbox:←[0m Created ["C:\\Users\\USER\\AppData\\Local\\Temp\\2HvVnB1GJl7yl8bHs92ia"]
←[1;34mhc-sandbox:←[0m Command { std: "lair-keystore" "--lair-root" "C:\\Users\\USER\\AppData\\Local\\Temp\\2HvVnB1GJl7yl8bHs92ia\\keystore" "server" "--piped", kill_on_drop: true }
# lair-keystore connection_url # named-pipe:\\.\pipe\w7oThBfKb0irO-Z817BQd?k=Quo7l0yJFtGkKPkjNFBVSUq0bhrNcGo-3o402xaRsjg #
# lair-keystore running #
←[1;34mhc-sandbox:←[0m Command { std: "holochain" "--structured" "--piped" "--config-path" "C:\\Users\\USER\\AppData\\Local\\Temp\\2HvVnB1GJl7yl8bHs92ia\\conductor-config.yaml", kill_on_drop: true }
WARNING: running without local db encryption
WARNING: running without local db encryption

Conductor ready.
←[1;34mhc-sandbox:←[0m Running conductor on admin port 57640
←[1;34mhc-sandbox:←[0m Attaching app port 8888
←[1;34mhc-sandbox:←[0m App port attached at 8888
←[1;34mhc-sandbox:←[0m Connected successfully to a running holochain

from holochain.

dellams avatar dellams commented on May 28, 2024

I also tried installing the latest hc (0.1.5) natively on windows (needed for HoloNET) but got this error:

error: failed to run custom build command for libsodium-sys-stable v1.19.28
 
Caused by:
  process didn't exit successfully: C:\Users\USER\holochain-holochain-0.1.5\target\release\build\libsodium-sys-stable-33ca0874b74fa340\build-script-build (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=SODIUM_LIB_DIR
  cargo:rerun-if-env-changed=SODIUM_SHARED
  cargo:rerun-if-env-changed=SODIUM_USE_PKG_CONFIG
  cargo:rerun-if-env-changed=VCPKGRS_DYNAMIC
 
  --- stderr
  thread 'main' panicked at 'called Result::unwrap() on an Err value: Kind(UnexpectedEof)', C:\Users\USER.cargo\registry\src\index.crates.io-6f17d22bba15001f\libsodium-sys-stable-1.19.28\build.rs:432:14
  note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for libsodium-sys-stable v1.19.28
 
Caused by:
  process didn't exit successfully: C:\Users\USER\holochain-holochain-0.1.5\target\release\build\libsodium-sys-stable-33ca0874b74fa340\build-script-build (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=SODIUM_LIB_DIR
  cargo:rerun-if-env-changed=SODIUM_SHARED
  cargo:rerun-if-env-changed=SODIUM_USE_PKG_CONFIG
  cargo:rerun-if-env-changed=VCPKGRS_DYNAMIC
 
  --- stderr
 thread 'main' panicked at 'called Result::unwrap() on an Err value: Kind(UnexpectedEof)', C:\Users\USER.cargo\registry\src\index.crates.io-6f17d22bba15001f\libsodium-sys-stable-1.19.28\build.rs:432:14
  note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
error: failed to compile holochain_cli v0.1.5 (C:\Users\USER\holochain-holochain-0.1.5\crates\hc), intermediate artifacts can be found at C:\Users\USER\holochain-holochain-0.1.5\target
 
C:\Users\USER\holochain-holochain-0.1.5>

Caused when running the cargo install --path crates/hc command

Any ideas?

Any help would be really appreciated as always thanks 🙂 ❤️

Many thanks,
David.

from holochain.

Connoropolous avatar Connoropolous commented on May 28, 2024

Lol… from Gpt

The error you're encountering is related to the libsodium-sys-stable crate. It seems like it failed to build because it couldn't read a file it expected to be there, causing an unexpected end-of-file (UnexpectedEof) error.

This might be a problem with the environment variables it's checking for (SODIUM_LIB_DIR, SODIUM_SHARED, SODIUM_USE_PKG_CONFIG, VCPKGRS_DYNAMIC).

First, please confirm if the libsodium library is correctly installed and accessible in your system. You can download and install it from the official GitHub repo. After the library is installed, you need to set SODIUM_LIB_DIR to point to the location where it's installed.

If you're using Windows, you can set the environment variable like this:

set SODIUM_LIB_DIR=C:\path\to\libsodium\lib

Replace C:\path\to\libsodium\lib with the actual path where libsodium library files are located.

After setting the environment variable, try to build the project again.

If the error still persists, it would be helpful to get the full backtrace of the error. To get that, you can run the build command with the RUST_BACKTRACE=1 environment variable:

RUST_BACKTRACE=1 cargo build

Then, check the printed backtrace to get a more precise idea of what might be going wrong. You can then use this detailed backtrace information to search for similar issues or ask for help in Rust or libsodium communities.

from holochain.

Connoropolous avatar Connoropolous commented on May 28, 2024

No guarantees

from holochain.

ThetaSinner avatar ThetaSinner commented on May 28, 2024

I don't seem to see this error, and I don't know what that repository will contain. You'll be seeing a version of the workspace Cargo lock file by building it that way which is one potential source of issues. Could you try installing from crates.io instead and see if you get the same error?

cargo install --version 0.1.5 holochain_cli

from holochain.

dellams avatar dellams commented on May 28, 2024

ok great guys, will try what you suggested...

But in mean time I just tried running my hApp again in v0.1.3 as I did before but now I am getting an error:

←[1;34mhc-sandbox:←[0m Creating 1 conductor sandboxes with same settings
# passphrase>

# lair-keystore init generating secure config...

# lair-keystore init config:
"C:\\Users\\USER\\AppData\\Local\\Temp\\En3o75-aMGPttImhktYE5\\keystore\\lair-keystore-config.yaml"

# lair-keystore init connection_url:
named-pipe:\\.\pipe\CqxJCyNNaM-kKJU0-tQll?k=KXQSLlybhSVYS79R5TtHtWKmReyhpiEQ0v0XC76S9AY
←[1;34mhc-sandbox:←[0m Config ConductorConfig { environment_path: DatabaseRootPath("C:\\Users\\USER\\AppData\\Local\\Temp\\En3o75-aMGPttImhktYE5"), keystore: LairServer { connection_url: Url2 { url: "named-pipe:\\\\.\\pipe\\CqxJCyNNaM-kKJU0-tQll?k=KXQSLlybhSVYS79R5TtHtWKmReyhpiEQ0v0XC76S9AY" } }, dpki: None, admin_interfaces: Some([AdminInterfaceConfig { driver: Websocket { port: 0 } }]), network: None, chc_namespace: None, db_sync_strategy: Fast }
←[1;34mhc-sandbox:←[0m Created directory at: ←[1;4;48;5;254;38;5;4mC:\Users\USER\AppData\Local\Temp\En3o75-aMGPttImhktYE5←[0m ←[1mKeep this path to rerun the same sandbox←[0m
←[1;34mhc-sandbox:←[0m Created config at C:\Users\USER\AppData\Local\Temp\En3o75-aMGPttImhktYE5\conductor-config.yaml
←[1;34mhc-sandbox:←[0m Command { std: "lair-keystore" "--lair-root" "C:\\Users\\USER\\AppData\\Local\\Temp\\En3o75-aMGPttImhktYE5\\keystore" "server" "--piped", kill_on_drop: true }
# lair-keystore connection_url # named-pipe:\\.\pipe\CqxJCyNNaM-kKJU0-tQll?k=KXQSLlybhSVYS79R5TtHtWKmReyhpiEQ0v0XC76S9AY #
# lair-keystore running #
←[1;34mhc-sandbox:←[0m Command { std: "holochain" "--structured" "--piped" "--config-path" "C:\\Users\\USER\\AppData\\Local\\Temp\\En3o75-aMGPttImhktYE5\\conductor-config.yaml", kill_on_drop: true }
WARNING: running without local db encryption
WARNING: running without local db encryption

Conductor ready.
Error: Deserialize("missing field `manifest`")
C:\Users\USER\holochain-holochain-0.1.3\happs\oasis>

Any ideas?

Thanks

from holochain.

dellams avatar dellams commented on May 28, 2024

I don't seem to see this error, and I don't know what that repository will contain. You'll be seeing a version of the workspace Cargo lock file by building it that way which is one potential source of issues. Could you try installing from crates.io instead and see if you get the same error?

cargo install --version 0.1.5 holochain_cli

Great, that worked thanks! :) Odd it works from crates.io but not from path though? I thought they were the same?

from holochain.

dellams avatar dellams commented on May 28, 2024

Lol… from Gpt

The error you're encountering is related to the libsodium-sys-stable crate. It seems like it failed to build because it couldn't read a file it expected to be there, causing an unexpected end-of-file (UnexpectedEof) error.

This might be a problem with the environment variables it's checking for (SODIUM_LIB_DIR, SODIUM_SHARED, SODIUM_USE_PKG_CONFIG, VCPKGRS_DYNAMIC).

First, please confirm if the libsodium library is correctly installed and accessible in your system. You can download and install it from the official GitHub repo. After the library is installed, you need to set SODIUM_LIB_DIR to point to the location where it's installed.

If you're using Windows, you can set the environment variable like this:

set SODIUM_LIB_DIR=C:\path\to\libsodium\lib

Replace C:\path\to\libsodium\lib with the actual path where libsodium library files are located.

After setting the environment variable, try to build the project again.

If the error still persists, it would be helpful to get the full backtrace of the error. To get that, you can run the build command with the RUST_BACKTRACE=1 environment variable:

RUST_BACKTRACE=1 cargo build

Then, check the printed backtrace to get a more precise idea of what might be going wrong. You can then use this detailed backtrace information to search for similar issues or ask for help in Rust or libsodium communities.

Great thanks @Connoropolous for this. :) What did you ask GPT4 out of interest?

from holochain.

dellams avatar dellams commented on May 28, 2024

I get the same Error: Deserialize("missing field manifest") error for v 0.1.5 too:

C:\Users\USER\holochain-holochain-0.1.5\happs\oasis>build

C:\Users\USER\holochain-holochain-0.1.5\happs\oasis>REM Set the workdir variable below to the workdir where your dna and happ folders are.

C:\Users\USER\holochain-holochain-0.1.5\happs\oasis>REM See https://github.com/holochain-open-dev/wiki/wiki/Installing-Holochain-Natively-On-Windows for more info...

C:\Users\USER\holochain-holochain-0.1.5\happs\oasis>SET workdir=zomes/workdir

*************************************************
NextGen Software Holochain hApp Builder v1.1
*************************************************

Building hApp...
Compiling Zomes...
warning: unreachable pattern
  --> dnas\oasis\zomes\integrity\oasis\src\lib.rs:77:25
   |
77 |                         _ => {
   |                         ^
   |
   = note: `#[warn(unreachable_patterns)]` on by default

warning: `oasis_integrity` (lib) generated 1 warning
    Finished release [optimized] target(s) in 0.42s
Packing DNA...
Wrote bundle C:\Users\USER\holochain-holochain-0.1.5\happs\oasis\zomes\workdir\dna\oasis.dna
Packing HAPP...
Wrote bundle C:\Users\USER\holochain-holochain-0.1.5\happs\oasis\zomes\workdir\happ\oasis.happ
Cleaning Sandbox...

hApp Built Successfully.

Press any key to continue . . .

Running hApp...

←[1;34mhc-sandbox:←[0m Creating 1 conductor sandboxes with same settings
# passphrase>

# lair-keystore init generating secure config...

# lair-keystore init config:
"C:\\Users\\USER\\AppData\\Local\\Temp\\c1S7ls-SUKwYzUFcqFacL\\keystore\\lair-keystore-config.yaml"

# lair-keystore init connection_url:
named-pipe:\\.\pipe\I7vxPSQp9RQeIEzsEib_C?k=aqiZk0NdfqE3_KWDMPF4oxgIxMSeScDEniIC0kSoah4
←[1;34mhc-sandbox:←[0m Config ConductorConfig { environment_path: DatabaseRootPath("C:\\Users\\USER\\AppData\\Local\\Temp\\c1S7ls-SUKwYzUFcqFacL"), keystore: LairServer { connection_url: Url2 { url: "named-pipe:\\\\.\\pipe\\I7vxPSQp9RQeIEzsEib_C?k=aqiZk0NdfqE3_KWDMPF4oxgIxMSeScDEniIC0kSoah4" } }, dpki: None, admin_interfaces: Some([AdminInterfaceConfig { driver: Websocket { port: 0 } }]), network: None, chc_namespace: None, db_sync_strategy: Fast }
←[1;34mhc-sandbox:←[0m Created directory at: ←[1;4;48;5;254;38;5;4mC:\Users\USER\AppData\Local\Temp\c1S7ls-SUKwYzUFcqFacL←[0m ←[1mKeep this path to rerun the same sandbox←[0m
←[1;34mhc-sandbox:←[0m Created config at C:\Users\USER\AppData\Local\Temp\c1S7ls-SUKwYzUFcqFacL\conductor-config.yaml
←[1;34mhc-sandbox:←[0m Command { std: "lair-keystore" "--lair-root" "C:\\Users\\USER\\AppData\\Local\\Temp\\c1S7ls-SUKwYzUFcqFacL\\keystore" "server" "--piped", kill_on_drop: true }
# lair-keystore connection_url # named-pipe:\\.\pipe\I7vxPSQp9RQeIEzsEib_C?k=aqiZk0NdfqE3_KWDMPF4oxgIxMSeScDEniIC0kSoah4 #
# lair-keystore running #
←[1;34mhc-sandbox:←[0m Command { std: "holochain" "--structured" "--piped" "--config-path" "C:\\Users\\USER\\AppData\\Local\\Temp\\c1S7ls-SUKwYzUFcqFacL\\conductor-config.yaml", kill_on_drop: true }
WARNING: running without local db encryption
WARNING: running without local db encryption

Conductor ready.
Error: Deserialize("missing field `manifest`")
C:\Users\USER\holochain-holochain-0.1.5\happs\oasis>

from holochain.

dellams avatar dellams commented on May 28, 2024

Not sure if this is the correct place to post this but I am attempting to implement zome call signing in the HoloNET client and was looking at the follow code take from https://github.com/holochain/holochain-client-js/blob/main/src/api/zome-call-signing.ts

/**
 * Generates a key pair for signing zome calls.
 *
 * @returns The signing key pair and an agent pub key based on the public key.
 *
 * @public
 */
export const generateSigningKeyPair: () => Promise<
  [KeyPair, AgentPubKey]
> = async () => {
  const privateKey = ed25519.utils.randomPrivateKey();
  const publicKey = await ed25519.getPublicKeyAsync(privateKey);
  const keyPair: KeyPair = { privateKey, publicKey };
  const signingKey = new Uint8Array(
    [132, 32, 36].concat(...publicKey).concat(...[0, 0, 0, 0])
  );
  return [keyPair, signingKey];
};

So looks like the AgentPubKey is now generated from the private/public key pair? Before the AgentPubKey was generated by the conductor/hc sandbox command so I presume that is no longer the case?

Also, it is generating a signingKey from the publicKey, but can't quite work out what it is doing? The [132, 32, 36]] means its a 3 dimensional array? Which it then concatenates the public key to and then adds a empty byte (termination byte?) at the end?

Sorry guys but my strongest area is c# and haven't had to work in other languages for a long time so it's a bit of learning curve currently! ;-) Thanks for any help, really appreciated! :)

from holochain.

ThetaSinner avatar ThetaSinner commented on May 28, 2024

Odd it works from crates.io but not from path though? I thought they were the same?

Not quite the same because of how Cargo deal with locking. Specifically that the version of Holochain you install from crates.io will be based on the Cargo.toml and the Cargo.lock is ignored. So you will get subtly different results between a local build and a crates.io build. I think the important thing is just to not mix them. If you're building from the Holochain repository that should work but everything needs to be built from there. Similarly, once you've started using crates.io, stick with that for your set of Holochain binaries.


For the manifest error, I agree it looks like a mismatch between your YAML files for the happ and Holochain. There is a new helper in hc from 0.1.5 to get at the expected format for these files. hc app schema and hc dna schema will output JSON schemas that your IDE should support (vscode, jetbrains certainly do, I think visual studio will too - I'm not sure about anything else). That will give you a bit of a hint from your IDE what fields you need in those files.
Otherwise, if you link to the relevant files from here I can take a look.


@Connoropolous has made a good suggestion above, I would split other topics than 'building' for Windows into new issues. The list of people suggested for questions about Holochain clients is good, I'd tag them on a new issue about creating a C# client. I suspect that's something we'd like to put some effort into supporting as an organisation (disclaimer: my opinion) so it's a good idea to be in touch with the people at Holochain who are maintaining clients already.

from holochain.

ThetaSinner avatar ThetaSinner commented on May 28, 2024

@dellams How is this coming along?

from holochain.

dellams avatar dellams commented on May 28, 2024

Sorry guys, I was moving house so catching up on things now...

hc app schema gave me this error:

>hc app schema
error: Found argument 'schema' which wasn't expected, or isn't valid in this context

USAGE:
    hc app <SUBCOMMAND>

For more information try --help

hc dna schema gave the same error so looks like these sub-commands were not reconginsed? Why is that? I am running 0.1.5.

My hHapp code is here:
https://github.com/NextGenSoftwareUK/OASIS-Holochain-hApp

Any ideas? Thanks guys, appreciated. :)

from holochain.

dellams avatar dellams commented on May 28, 2024

Odd it works from crates.io but not from path though? I thought they were the same?

Not quite the same because of how Cargo deal with locking. Specifically that the version of Holochain you install from crates.io will be based on the Cargo.toml and the Cargo.lock is ignored. So you will get subtly different results between a local build and a crates.io build. I think the important thing is just to not mix them. If you're building from the Holochain repository that should work but everything needs to be built from there. Similarly, once you've started using crates.io, stick with that for your set of Holochain binaries.

Ok thanks but I did build everything from the repo as you said but it didn't work but luckily from crates.io it does...

from holochain.

ThetaSinner avatar ThetaSinner commented on May 28, 2024

The schema command is my mistake, I thought that was back-ported. All it does is provide these files though https://github.com/holochain/holochain/tree/develop/crates/hc_bundle/schema.

It looks like your schema files are good on the main branch. I did

  • hc dna pack dnas/oasis/workdir/
  • hc app pack workdir
  • hc sandbox generate workdir/oasis.happ --run=8888

and my conductor started up okay.

Looking at the BUILD.bat script I don't think the hc dna pack and hc app pack commands are pointing at the right paths. So it's possible Holochain is just rejecting an older bundle, rather than the source code being wrong.

from holochain.

dellams avatar dellams commented on May 28, 2024

Thanks for getting back to me, I just double checked and it is defintley using the latest generated bundles, the BUILD.bat puts the build in a new BUILD folder so it is all in one place.

But there is however, also a BUILD_SCAFFOLDING.bat script which builds and puts them in the same folders that the scaffolding tool does (as you have also done above), but that gives the same error so there is still an issue somewhere?

Any other ideas? :)

Many thanks,
David.

from holochain.

ThetaSinner avatar ThetaSinner commented on May 28, 2024

@dellams Did you have any luck packaging and running the happ manually with the command above?

Otherwise can I have a list of steps to follow to reproduce the problem?

from holochain.

dellams avatar dellams commented on May 28, 2024

Hey @ThetaSinner , hope you are well? :)

Yes, I just tried running the above commands manually as you suggested but still the same manifest error:

C:\Users\USER\holochain-holochain-0.1.5\happs\oasis>hc dna pack dnas/oasis/workdir/
Wrote bundle C:\Users\USER\holochain-holochain-0.1.5\happs\oasis\dnas\oasis\workdir\oasis.dna

C:\Users\USER\holochain-holochain-0.1.5\happs\oasis>hc app pack workdir
Wrote bundle C:\Users\USER\holochain-holochain-0.1.5\happs\oasis\workdir\oasis.happ

C:\Users\USER\holochain-holochain-0.1.5\happs\oasis>hc sandbox generate workdir/oasis.happ --run=8888
←[1;34mhc-sandbox:←[0m Creating 1 conductor sandboxes with same settings
# passphrase>

# lair-keystore init generating secure config...

# lair-keystore init config:
"C:\\Users\\USER\\AppData\\Local\\Temp\\JQMhijZI6lZ4ioMXnATiF\\keystore\\lair-keystore-config.yaml"

# lair-keystore init connection_url:
named-pipe:\\.\pipe\JsuOGtfW5YE-o2u5gwFu8?k=p7QkrQAiE8mhmhrR0EcuZUr5Baj6xwoJ_H94ag4pPig
←[1;34mhc-sandbox:←[0m Config ConductorConfig { environment_path: DatabaseRootPath("C:\\Users\\USER\\AppData\\Local\\Temp\\JQMhijZI6lZ4ioMXnATiF"), keystore: LairServer { connection_url: Url2 { url: "named-pipe:\\\\.\\pipe\\JsuOGtfW5YE-o2u5gwFu8?k=p7QkrQAiE8mhmhrR0EcuZUr5Baj6xwoJ_H94ag4pPig" } }, dpki: None, admin_interfaces: Some([AdminInterfaceConfig { driver: Websocket { port: 0 } }]), network: None, chc_namespace: None, db_sync_strategy: Fast }
←[1;34mhc-sandbox:←[0m Created directory at: ←[1;4;48;5;254;38;5;4mC:\Users\USER\AppData\Local\Temp\JQMhijZI6lZ4ioMXnATiF←[0m ←[1mKeep this path to rerun the same sandbox←[0m
←[1;34mhc-sandbox:←[0m Created config at C:\Users\USER\AppData\Local\Temp\JQMhijZI6lZ4ioMXnATiF\conductor-config.yaml
←[1;34mhc-sandbox:←[0m Command { std: "lair-keystore" "--lair-root" "C:\\Users\\USER\\AppData\\Local\\Temp\\JQMhijZI6lZ4ioMXnATiF\\keystore" "server" "--piped", kill_on_drop: true }
# lair-keystore connection_url # named-pipe:\\.\pipe\JsuOGtfW5YE-o2u5gwFu8?k=p7QkrQAiE8mhmhrR0EcuZUr5Baj6xwoJ_H94ag4pPig #
# lair-keystore running #
←[1;34mhc-sandbox:←[0m Command { std: "holochain" "--structured" "--piped" "--config-path" "C:\\Users\\USER\\AppData\\Local\\Temp\\JQMhijZI6lZ4ioMXnATiF\\conductor-config.yaml", kill_on_drop: true }
WARNING: running without local db encryption
WARNING: running without local db encryption

Conductor ready.
Error: Deserialize("missing field `manifest`")

C:\Users\USER\holochain-holochain-0.1.5\happs\oasis>

It is odd, maybe holochain isn't installed properly or is missing some dependencies? Is there a way we can check?

Would be good if hc had some sort of health/install state/status check tool? Think would be useful for a lot of people that, especially when trying to deploy to different platforms/OS etc like I am trying... :)

Cheers
D.

from holochain.

dellams avatar dellams commented on May 28, 2024

Did you get it working on Windows? Or was yours on linux or in nixos?

from holochain.

jost-s avatar jost-s commented on May 28, 2024

@dellams Please post a link to the repo or provide steps and yaml files.

from holochain.

ThetaSinner avatar ThetaSinner commented on May 28, 2024

I worked directly on Windows.

The repo is here https://github.com/NextGenSoftwareUK/OASIS-Holochain-hApp/blob/main/BUILD.bat, steps to reproduce would be really useful

from holochain.

dellams avatar dellams commented on May 28, 2024

not sure what steps you are referring to? I simply run the BUILD.bat above or BUILD_SCAFOLDING.bat or run the manual commands above @ThetaSinner shared... all result in the same manifest error, leading me to believe hc isn't installed or configured correctly?

I installed hc following the guide I published here:
https://github.com/holochain-open-dev/wiki/wiki/Installing-Holochain--&-Building-hApps-Natively-On-Windows

from holochain.

jost-s avatar jost-s commented on May 28, 2024

Ok, so the happ.yaml that you're using is still https://github.com/NextGenSoftwareUK/OASIS-Holochain-hApp/blob/main/workdir/happ.yaml?

from holochain.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.