neighbour-hoods / timetracking-applet

1 stars 0 forks source link

Crash due to mismatched Lair Keystore version #15

Closed pospi closed 1 year ago

pospi commented 1 year ago

I'm first logging this issue at the leafmost point in the dependency chain because it's probably a build system thing, but it could also be due to upstream complications in the Holochain Launcher, Neighbourhoods Launcher, or Sensemaker Lite.

Ever since getting the Holochain Launcher setup for local development outside of Nix I have had this problem.

Holochain throws a misleading error but the logfiles show that:

Other({"error":"Invalid lair server version, this client requires '0.2.3', but got '0.2.4'."})

CC @weswalla @nick-stebbings @zippy @guillemcordoba @matthme

For completeness, the Sensemaker DNA appears to be built with hdk@0.2.0 and hdk@0.1.0 whilst hREA DNAs are built with hdk@0.2.1 and hdk@0.1.1. This has never been an issue before. My nix env has holochain_cli 0.1.3, holochain 0.1.3.

Terminal output as follows:

$ AGENTS=1 UI_PORT=8888 npm run launch:happ

> launch:happ
> RUST_LOG=warn WASM_LOG=debug echo "pass" | hc launch --piped -n $AGENTS ./workdir/sensemaker-enabled/provider-sensemaker.happ --ui-port $UI_PORT network mdns

[hc launch] ------ WARNING ------
[hc launch] You are running hc launch pointing to a localhost server. This is meant for development purposes
[hc launch] only as apps can behave differently than when actually running in the Holochain Launcher.
[hc launch] To test the real behavior, use --ui-path instead and point to a folder with your built and bundled files
[hc launch] or pass an already packaged .webhapp as an argument.
[hc launch] ---------------------

[hc launch] Spawning sandbox conductors.
hc-sandbox: Creating 1 conductor sandboxes with same settings

# lair-keystore init generating secure config...

# lair-keystore init config:
"/tmp/nix-shell.qybjH5/c00IUJF36zod27C-Vd47-/keystore/lair-keystore-config.yaml"

# lair-keystore init connection_url:
unix:///tmp/nix-shell.qybjH5/c00IUJF36zod27C-Vd47-/keystore/socket?k=wU-MsPrD-N-khLIWZ7ve8lZQvZb_uTblmhyOQ5UdIhY
hc-sandbox: Config ConductorConfig { environment_path: DatabaseRootPath("/tmp/nix-shell.qybjH5/c00IUJF36zod27C-Vd47-"), keystore: LairServer { connection_url: Url2 { url: "unix:///tmp/nix-shell.qybjH5/c00IUJF36zod27C-Vd47-/keystore/socket?k=wU-MsPrD-N-khLIWZ7ve8lZQvZb_uTblmhyOQ5UdIhY" } }, dpki: None, admin_interfaces: Some([AdminInterfaceConfig { driver: Websocket { port: 0 } }]), network: Some(KitsuneP2pConfig { transport_pool: [Quic { bind_to: None, override_host: None, override_port: None }], bootstrap_service: None, tuning_params: KitsuneP2pTuningParams { gossip_strategy: "sharded-gossip", gossip_loop_iteration_delay_ms: 1000, gossip_outbound_target_mbps: 100.0, gossip_inbound_target_mbps: 100.0, gossip_historic_outbound_target_mbps: 100.0, gossip_historic_inbound_target_mbps: 100.0, gossip_burst_ratio: 100.0, gossip_peer_on_success_next_gossip_delay_ms: 60000, gossip_peer_on_error_next_gossip_delay_ms: 300000, gossip_agent_info_update_interval_ms: 300000, gossip_redundancy_target: 100.0, gossip_max_batch_size: 1000000, gossip_dynamic_arcs: true, gossip_single_storage_arc_per_space: false, default_rpc_single_timeout_ms: 60000, default_rpc_multi_remote_agent_count: 3, default_rpc_multi_remote_request_grace_ms: 3000, agent_info_expires_after_ms: 1200000, tls_in_mem_session_storage: 512, proxy_keepalive_ms: 120000, proxy_to_expire_ms: 300000, concurrent_limit_per_thread: 4096, tx2_quic_max_idle_timeout_ms: 60000, tx2_pool_max_connection_count: 4096, tx2_channel_count_per_connection: 2, tx2_implicit_timeout_ms: 60000, tx2_initial_connect_retry_delay_ms: 200, tx5_max_send_bytes: 16777216, tx5_max_recv_bytes: 16777216, tx5_max_conn_count: 40, tx5_max_conn_init_s: 20, danger_tls_keylog: "no_keylog", danger_gossip_recent_threshold_secs: 900, disable_publish: false, disable_recent_gossip: false, disable_historical_gossip: false }, network_type: QuicMdns }), chc_namespace: None, db_sync_strategy: Fast }
hc-sandbox: Created directory at: /tmp/nix-shell.qybjH5/c00IUJF36zod27C-Vd47- Keep this path to rerun the same sandbox
hc-sandbox: Created config at /tmp/nix-shell.qybjH5/c00IUJF36zod27C-Vd47-/conductor-config.yaml
hc-sandbox: Command { std: "lair-keystore" "--lair-root" "/tmp/nix-shell.qybjH5/c00IUJF36zod27C-Vd47-/keystore" "server" "--piped", kill_on_drop: true }
# lair-keystore connection_url # unix:///tmp/nix-shell.qybjH5/c00IUJF36zod27C-Vd47-/keystore/socket?k=wU-MsPrD-N-khLIWZ7ve8lZQvZb_uTblmhyOQ5UdIhY #
# lair-keystore running #
hc-sandbox: Command { std: "holochain" "--structured" "--piped" "--config-path" "/tmp/nix-shell.qybjH5/c00IUJF36zod27C-Vd47-/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 "/tmp/nix-shell.qybjH5/report-ec9f3025-8c6d-436c-ac01-e9a7ea6696ea.toml". Submit an issue or email with the subject of "holochain Crash Report" and include the report as an attachment.

- Homepage: https://github.com/holochain/holochain
- Authors: Holochain Core Dev Team <devcore@holochain.org>

We take privacy seriously, and do not perform any automated error collection. In order to improve the software, we rely on people to submit reports.

Thank you kindly!

thread 'main' panicked at 'Failed to get admin port from conductor: RecvError(())', /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/holochain_cli_sandbox-0.1.3/src/run.rs:98:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
pospi commented 1 year ago

@matthme actually this turns out to be a problem with mismatched Lair Keystore versions after setting up the Holochain Launcher for local development. Original issue description updated.

Can you let me know how to reverse whatever setup step I ran which is now causing the mismatched version error? I didn't have my CLI logs as well tended to as I had imagined :/

pospi commented 1 year ago

Actually, thinking about it more and wonder whether the issue is that the Holochain Launcher I've built off the develop-0.1 branch is actually setup to reference older dependencies (Lair 0.2.3) than the current Nix environment for Holochain 0.1.3 (Lair 0.2.4) and therefore does not work within this environment?

matthme commented 1 year ago

If your environment is expecting lair 0.2.4 I assume that it is also at holochain version 0.1.5 as the lair version had a bump between holochain 0.1.3 and holochain 0.1.5. The develop-0.1 branch of the Launcher is at Holochain 0.1.3, i.e. requires lair 0.2.3

pospi commented 1 year ago

I will need to upgrade to a later Holochain Nix env then I think. @weswalla @nick-stebbings @guillemcordoba do you forsee any issues running the Neighbourhoods Applet binaries in a Holochain 0.1.5 environment?

pospi commented 1 year ago

Resolved in upgrading to Holochain 0.1.5