About the RSM Technical Discussion! category

Can you post anything that was written above this? or was there nothing?

Was nothing above it.

Any ideas guys? Been waiting 23 days for a response now… Would be appreciated thanks.

[nix-shell:~/holochain-rsm2/elemental-chat-develop/elementalChatHapp]$ hc sandbox generate ElementalChat.happ
hc-sandbox: Creating 1 conductor sandboxes with same settings
hc-sandbox: Config ConductorConfig { environment_path: EnvironmentRootPath("/tmp/tmp.xqmx7dSJtZ/VS7ZNAipLD2AIFCFc3fnP"), use_dangerous_test_keystore: false, signing_service_uri: None, encryption_service_uri: None, decryption_service_uri: None, dpki: None, keystore_path: Some("/tmp/tmp.xqmx7dSJtZ/VS7ZNAipLD2AIFCFc3fnP/keystore"), passphrase_service: None, admin_interfaces: Some([AdminInterfaceConfig { driver: Websocket { port: 0 } }]), network: None }
hc-sandbox: Created directory at: /tmp/tmp.xqmx7dSJtZ/VS7ZNAipLD2AIFCFc3fnP Keep this path to rerun the same sandbox
hc-sandbox: Created config at /tmp/tmp.xqmx7dSJtZ/VS7ZNAipLD2AIFCFc3fnP/conductor-config.yaml

Conductor ready.
Error: Failed to install app: Expected AdminResponse::AppBundleInstalled but got Error(InternalError(“Conductor returned an error while using a ConductorApi: EntryDefStoreError(DnaError(WasmError(Compile(“link error: Import not found, namespace: env, name: __debug”))))”))

[nix-shell:~/holochain-rsm2/elemental-chat-develop/elementalChatHapp]$

Oh wow yeah that’s unfortunate. holochain.love doesn’t work with hc unfortunately, and I would suggest not using that at all and instead move on to locking the holochain version with a default.nix file. This way you don’t depend on a constantly updating url that may break your code, and you can be much more deliberate about your setup and align it with your collaborators.

Here is an working example defaullt.nix file. Inside it, you’ll find the holochain hash that it will compile against, if you want to change it in the future. Let me know if you have any questions around that. Here you can find the setup instructions for the gym which explain a bit the reasonale around this way of using nix.

3 Likes

Ok great thanks bro, so do I just put that file in the root of my holochain folder and override the old file?

Then I just enter the shell again?

Then it will re-setup everything and should just work then? :slight_smile:

It’s odd everything did seem to be working until I tried running the sandbox a 2nd time?

Cheers.
D.

Mmm if by “root of my holochain folder” you mean the holochain core github repository, then no. You don’t need to have that cloned anymore.

If you copy that default.nix file in the root of the repository for your project, and then run nix-shell, you’ll have everything setup again and any collaborators in that project will have also the same holochain version.

So, if you follow exactly the same structure and instructions that are there in holochain-dna-build-tutorial, everything should just work.

4 Likes

If we clone your DNA-build-tutorial project, nix-shell into it, then cc ../ into our project, the tools (holochain, hc, etc) would still continue to work in that directory where we cc"ed", no? [That has worked fine for be thus far…]

But I guess you “recommend” that we keep that nix file in our project folder, right? It’s just a recommendation, no?

Or is it absolutely necessary (for reasons unknown to me) that the nix file be present in the happ’s project directory?


Or put simply, is cc ../my-project after nix-shell . into holochain-DNA-build-tutorial a safe action?


That way, my-project won’t have to bear the weight of the filthy dirty stuff that .nix files are; haha!

However, to explicitly specify the version of dependencies (of the tooling that the nix file provides, not to mention version-locking with a specific branch/revision of the holochain/holochain repo) the project depends upon, I think it would make sense to put the nix file in the project directory…

But as far as the zome code is concerned, it can be pretty oblivion of the hc/holochain tooling that one is using, since

[dependencies]
hdk = “0.0.100”

specifies it all (now that the hdk crate(s) have been published on crates-io). One might not be able to build the zomes (especially into a DNA file) without adequate tooling though.

1 Like

I tried this but when I run the sandbox for the ElementalChat as per your guide I am still getting the same error:

[nix-shell:~/holochain-rsm3/elemental-chat-develop/elementalChatHapp]$ hc sandbox generate ElementalChat.happ
hc-sandbox: Creating 1 conductor sandboxes with same settings
hc-sandbox: Config ConductorConfig { environment_path: EnvironmentRootPath("/tmp/tmp.lD2nYBApYu/POGeQTYAuzYCq5RaN5WE1"), use_dangerous_test_keystore: false, signing_service_uri: None, encryption_service_uri: None, decryption_service_uri: None, dpki: None, keystore_path: Some("/tmp/tmp.lD2nYBApYu/POGeQTYAuzYCq5RaN5WE1/keystore"), passphrase_service: None, admin_interfaces: Some([AdminInterfaceConfig { driver: Websocket { port: 0 } }]), network: None }
hc-sandbox: Created directory at: /tmp/tmp.lD2nYBApYu/POGeQTYAuzYCq5RaN5WE1 Keep this path to rerun the same sandbox
hc-sandbox: Created config at /tmp/tmp.lD2nYBApYu/POGeQTYAuzYCq5RaN5WE1/conductor-config.yaml

Conductor ready.
Error: Failed to install app: Expected AdminResponse::AppBundleInstalled but got Error(InternalError(“Conductor returned an error while using a ConductorApi: EntryDefStoreError(DnaError(WasmError(Compile(“link error: Import not found, namespace: env, name: __debug”))))”))

[nix-shell:~/holochain-rsm3/elemental-chat-develop/elementalChatHapp]$

Any ideas? :slight_smile: Thanks.

That seems like a mismatch in versions: the one that compiles and created ElementalChat.happ, and the one with which you are running the hc sandbox command. Are you bundling the happ yourself?

2 Likes

Great thanks. :slight_smile: Ok I started again from scratch and now it is working for your sample zomes, yay! :slight_smile:

Haven’t tried elementalchat again yet, may have been an issue with that? But for now it just needs to be any zome so I can test HoloNET RSM to see if I can get the MessagePack stuff working, as you may recall? :wink:

Problem I now have is I am getting this error from HoloNET when it attempts to connect over a websocket:

Error Occured. Resason: Error occurred connecting to ws://localhost:8888
Error Details: System.Net.WebSockets.WebSocketException (0x80004005): Unable to connect to the remote server
—> System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it.

I can’t work out where the issue is, .NET connecting through WSL2, or WSL2 through nix-shell or issue with the conductor itself?

I have a feeling it is an issue with WSL2 blocking the connection? But I have no idea how to solve this? I thought it might be the Windows Firewall but I disabled that and still same issue.

I even tried WireShark to try and find the issue but I dont know what I am looking for in the big capture file I get from that! lol Like looking for a needle in a haystack! lol :wink:

The capture file is below:
https://drive.google.com/file/d/10YJ-8mR0rVY5CFtbBCUr1TvLNnjWaLeI/view?usp=sharing

Would be near the bottom of the file, because I stopped capturing as soon as the error message was thrown.

I was looking for ws://localhost:8888 in the destination column but there is none with that so that is a bit odd? Not sure if anyone has any experience with WireShark here? Or anyone here knows more about networking? Especially on Windows and WSL2?

Would be really appreciated thanks. :slight_smile:

At least some progress finally, now just got to get this working so we can then finally get back to testing the MessagePack part! :wink:

Cheers
D.
P.S. Is there any Web UI client I can test with the conductor to see if that can connect through WSL2? Is there anyone else here who have got it all working on WSL2? Be great to here your feedback thanks! :slight_smile:

@pauldaoust @hedayat @guillemcordoba @Connoropolous @sidsthalekar @e-nastasia :heart:

Good news everyone, worked out why, its because for some unknown MAD reason port forwarding is off by default with WSL2! Crazy I know!

You need to create a .wslconfig file in the root of your userspace so for me that is C:\Users\David.

In the file you just need:

[wsl2]
localhostForwarding=true

So now after a long 8 months waiting I can FINALLY get on with HoloNET RSM! lol :wink:

The error I now get from the conductor is below:

May 17 18:04:55.193 ERROR holochain_websocket::websocket: Websocket: Bad message type Pong([])
May 17 18:04:55.240 ERROR holochain_websocket::websocket: websocket_error_from_network=Utf8

Not sure what Pong means though? lol

Here is what I am sending:

Any ideas? :slight_smile:

Thanks Tribe.
D.

As a reminder, here is what we were discussing back in Feb when I last managed to get HoloNET to connect on my Linux standalone install… :slight_smile:

Ok, I changed the HoloHash and AgentPubKey to binary arrays and that got rid of the pong error but the Conductor still gives this error:

May 17 18:33:50.757 ERROR holochain_websocket::websocket: websocket_error_from_network=Utf8

It doesn’t give anymore than that, are there any logs or something I can look at for more info?

Here is what I am now sending:

Getting closer… :slight_smile: :heart:

Cheers.
D.

Anyone? :slight_smile:

Hey @dellams I don’t know much about your project to undertake integrating Holochain with Unity, but I’m very interested in it, and curious to learn more. Would also really like to see you succeed. I am on a road trip and won’t necessarily have a quick response time, but I have a general recommendation for you, that people can only usefully help debug such things, if all the necessary information to make sense of it quickly is presented right away. I would recommend posting up as a github issue for each specific one, putting the full context of your configuration, and which holochain commits / version numbers you are using. Then, use that link as a reference in forum posts or comments, if you feel like you want to draw extra attention to it. The best case scenario is doing full ‘steps to reproduce’, but barring that, at least listing the system configuration will be a tremendous benefit to yourself and anyone trying to help you, which I’d even like to support

3 Likes

Thanks for your reply, appreciated and good wishes… :slight_smile:

Will sort that later or tomorrow I hope… and post the link here… :slight_smile:

I am just using the default setup from the DNA tutorial here:

My default.nix file looks like this:

let 
  holonixPath = builtins.fetchTarball {
    url = "https://github.com/holochain/holonix/archive/90a19d5771c069dbcc9b27938009486b54b12fb7.tar.gz";
    sha256 = "11wv7mwliqj38jh1gda3gd0ad0vqz1d42hxnhjmqdp037gcd2cjg";
  };
  holonix = import (holonixPath) {
    includeHolochainBinaries = true;
    holochainVersionId = "custom";
    
    holochainVersion = { 
     rev = "d3a61446acaa64b1732bc0ead5880fbc5f8e3f31";
     sha256 = "0k1fsxg60spx65hhxqa99nkiz34w3qw2q4wspzik1vwpkhk4pwqv";
     cargoSha256 = "0fz7ymyk7g3jk4lv1zh6gbn00ad7wsyma5r7csa88myl5xd14y68";
     bins = {
       holochain = "holochain";
       hc = "hc";
     };
    };
  };
in holonix.main

As I already said I am using WSL2 on Windows 10.

I am not sure what other info is required to be honest?

Cheers
D.

I just created the issue here:

I’ll reply there :+1:

1 Like

Great thanks, I replied. :slight_smile:

Some of which is below:

"Yes it is .net/c# code and it uses my own hand written web socket code (it only uses some of the internal .net websocket classes).

Here is the full code (including Web Socket Code):

The issue is in the CallZomeFunctionAsync method so it connects fine with the Connect method higher up, but when you then try to call a zome function, that is when you get the Conductor error.

It is using this MessagePack library:

After doing research, it looked like this was the fastest MessagePack library for .net.

I hope this was all you was after? :slight_smile:

Many thanks,
David."