lightningrodlabs / electron-holochain-template

This project is a template that can be used to start projects that utilize holochain as a backend and electron + web as a frontend. It does not make any assumptions about a front-end framework
https://www.youtube.com/watch?v=jFraPKl2rPk
11 stars 1 forks source link

holochain-runner Crash Report #9

Open rosseyre opened 1 year ago

rosseyre commented 1 year ago

Not sure if I have missed something here but holochain-runner seems to be crashing due to an invalid path input ('path must be shorter than libc::sockaddr_un.sun_path"')

After installing deps and running npm run dev, the splash screen opens and hangs.

Console logs:

===============================================================================
--- PM2 development mode ------------------------------------------------------
Apps started         : web-gui,electron-holochain
Processes started    : 2
Watch and Restart    : Enabled
Ignored folder       : node_modules
===============================================================================
web-gui-0  | > electron-holochain-template@0.0.3 web
web-gui-0  | > cd web && ADMIN_WS_PORT=1234 APP_WS_PORT=8888 npx serve -p 8080 dist
web-gui-0  |  INFO  Accepting connections at http://localhost:8080
electron-holochain-1  | holochain > Looking for passphrase piped to stdin
electron-holochain-1  | holochain > Found passphrase, continuing...
electron-holochain-1  | holochain > 1
web-gui-0             |  HTTP  9/5/2023 4:47:50 PM ::1 GET /splashscreen
web-gui-0             |  HTTP  9/5/2023 4:47:50 PM ::1 Returned 304 in 28 ms
electron-holochain-1  | holochain stderr err > Well, this is embarrassing.
electron-holochain-1  | holochain-runner had a problem and crashed.

Crash report (report-92693ff7-0798-4178-b1df-3bab097ffda6.toml):

name = 'holochain-runner'
operating_system = 'unix:OSX'
crate_version = '0.5.2'
explanation = '''
Panic occurred in file 'src/embedded_runner.rs' at line 165
'''
cause = 'Could not initialize Conductor from configuration: Other({"error":"InvalidInput","message":"path must be shorter than libc::sockaddr_un.sun_path"})'
method = 'Panic'
backtrace = '''

   0: 0x1047f5504 - core::panicking::panic_fmt::h8c7f3d540a75578f
   1: 0x1047f56ec - core::result::unwrap_failed::h666d2c7e0d130ea0
   2: 0x102d7a194 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h24b5e83c31761c6f
   3: 0x102bfb230 - tokio::runtime::park::CachedParkThread::block_on::h175bb71cbf8bc6b0
   4: 0x102b98998 - tokio::runtime::handle::Handle::block_on::h2d83cb82aa02e342
   5: 0x102b504c4 - tokio::runtime::scheduler::multi_thread::worker::block_in_place::h877aff0f87a871d6
   6: 0x102c1200c - holochain_runner::main::h541d30922bf68ccf
   7: 0x102c684e4 - std::sys_common::backtrace::__rust_begin_short_backtrace::h0acbf1778cb0b260
   8: 0x102bc990c - std::rt::lang_start::{{closure}}::h574c11e8d51530ac
   9: 0x10472c550 - std::rt::lang_start_internal::h659a783147314d97
  10: 0x102c12580 - _main'''
matthme commented 1 year ago

Seems to be the same issue we had in the launcher (https://github.com/holochain/launcher/issues/144). In the launcher it was fixed by creating a symlink to the lair directory in the temp folder (the symlink having a shorter path length). Without it being fixed at the holochain-runner level (and without knowing the details of how the holochain-runner works), you'd probably be able to work around it in your case if you shorten the identifier/name of your app which will most likely also make the path to the lair directory shorter.