neighbour-hoods / social_sensemaker

integration of `rep_lang` and Holochain
Other
25 stars 2 forks source link

debug strange WASM compilation error introduced by #37 #41

Closed mhuesch closed 2 years ago

mhuesch commented 2 years ago

(introduced by #37)

vayu :: ~/projects/social_sensemaker ‹main› » g rev-parse HEAD                                1 ↵
d388d8ccbeecb54345cb18d7de32921aa672f7c1

vayu :: ~/projects/social_sensemaker ‹main› » npm run hc:build && npm run hc:pack && npm run hc:run

> social_sensemaker@1.0.0 hc:build
> cargo build -p social_sensemaker --release --target wasm32-unknown-unknown && cp $CARGO_TARGET_DIR/wasm32-unknown-unknown/release/social_sensemaker.wasm ./happs/social_sensemaker

    Finished release [optimized] target(s) in 0.12s

> social_sensemaker@1.0.0 hc:pack
> hc dna pack happs/social_sensemaker && hc app pack happs/social_sensemaker

Wrote bundle /home/mhueschen/projects/social_sensemaker/happs/social_sensemaker/social_sensemaker.dna
Wrote bundle /home/mhueschen/projects/social_sensemaker/happs/social_sensemaker/social_sensemaker.happ

> social_sensemaker@1.0.0 hc:run
> hc sandbox -f=9000 generate happs/social_sensemaker -r=9999 network mdns

hc-sandbox: Creating 1 conductor sandboxes with same settings
hc-sandbox: Config ConductorConfig { environment_path: DatabaseRootPath("/tmp/WhHBMMrwDwbQ3PHj4Ytm4"), keystore: LairServerLegacyDeprecated { keystore_path: Some("/tmp/WhHBMMrwDwbQ3PHj4Ytm4/keystore"), danger_passphrase_insecure_from_config: "default-insecure-passphrase" }, 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: 0.5, gossip_inbound_target_mbps: 0.5, gossip_historic_outbound_target_mbps: 0.1, gossip_historic_inbound_target_mbps: 0.1, gossip_peer_on_success_next_gossip_delay_ms: 60000, gossip_peer_on_error_next_gossip_delay_ms: 300000, gossip_local_sync_delay_ms: 60000, gossip_dynamic_arcs: true, gossip_single_storage_arc_per_space: false, default_rpc_single_timeout_ms: 30000, 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: 30000, tx2_pool_max_connection_count: 4096, tx2_channel_count_per_connection: 2, tx2_implicit_timeout_ms: 30000, tx2_initial_connect_retry_delay_ms: 200, danger_tls_keylog: "no_keylog", disable_publish: false }, network_type: QuicMdns }), db_sync_strategy: Fast }
hc-sandbox: Created directory at: /tmp/WhHBMMrwDwbQ3PHj4Ytm4 Keep this path to rerun the same sandbox
hc-sandbox: Created config at /tmp/WhHBMMrwDwbQ3PHj4Ytm4/conductor-config.yaml
Jun 24 18:10:42.852 ERROR lair_keystore_client: error=IpcClientConnectError("/tmp/WhHBMMrwDwbQ3PHj4Ytm4/keystore/socket", Os { code: 2, kind: NotFound, message: "No such file or directory" }) file="/build/cargo-vendor-dir/lair_keystore_client-0.0.10/src/lib.rs" line=41

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(\"Error while importing \\\"__wbindgen_placeholder__\\\".\\\"__wbindgen_describe\\\": unknown import. Expected Function(FunctionType { params: [I32], results: [] })\"))))"))
vayu :: ~/projects/social_sensemaker ‹main› »                                                 1 ↵

potential leads

while those suggest similarity to other issues ppl have encountered, I think we may have a unique problem on our hands.

the change which brought about this breakage was simply updating a bunch of dependencies. no code changes were made, and no updates to any Holochain deps (libraries-used-in-our-Rust, or cmdline executables) were made. this is the patch on the change to nh-nix-env: https://github.com/neighbour-hoods/nh-nix-env/pull/3/commits/ca30d8ec36431102937f2357d65379e9a3085700

I am wondering if we might have a subtle issue of wasm compilation being perturbed by one of our wasm-y dependencies which was updated?

I don't understand enough about wasm compilation to know why.

potential fixes

mhuesch commented 2 years ago

closed by #44.

I did not diagnose the root cause, but merely backed down some deps which allowed me to circumvent the issue.