GithubHelp home page GithubHelp logo

lightningrodlabs / electron-holochain-template Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 1.0 7.58 MB

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

Home Page: https://www.youtube.com/watch?v=jFraPKl2rPk

Nix 3.05% JavaScript 12.69% TypeScript 61.03% Rust 4.60% Shell 18.63%
electron happ holochain template

electron-holochain-template's People

Contributors

connoropolous avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mattyg

electron-holochain-template's Issues

holochain-runner Crash Report

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  | > [email protected] 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'''

make these hardcoded version number references dynamic

The 0.0.1 strings should be dynamic and come from the tag

gh release upload "${GITHUB_REF#refs/tags/}" "electron/out/ElectronHolochainTemplate-0.0.1.AppImage" --clobber
# MacOS
- name: upload binary (macos only)
if: ${{ runner.os == 'macOs' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${GITHUB_REF#refs/tags/}" "electron/out/ElectronHolochainTemplate-0.0.1.dmg" --clobber
# Windows
- name: upload binary (Windows only)
if: ${{ runner.os == 'Windows' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "$($env:GITHUB_REF -replace "refs/tags/")" "electron/out/ElectronHolochainTemplate.Setup.0.0.1.exe" --clobber

holochain-runner Crash Report 2

Hi there,

I tried to do a quick set-up using this template but got stuck running npm run devafter successfully installing my dependancies.

This error also comes through if I try to run the lectron command: npm run electron. It seems to be an error regarding the returning 404 when querying the application.happ directory.

electron-holochain-1  | holochain stderr err > Sep 07 23:44:54.257 ERROR holochain_runner::embedded_runner: Conductor returned an error while using a ConductorApi: AppBundleError(FfsIoError(IoError { original: Os { code: 2, kind: NotFound, message: "No such file or directory" }, path: Some("/Users/user/Desktop/CODE/holochain/holochain-electron-template/happ/workdir/application.happ"), backtrace:    0: backtrace::capture::Backtrace::new
electron-holochain-1  |    1: holochain_util::ffs::io_error::IoError::new
electron-holochain-1  |    2: holochain::conductor::conductor::app_impls::<impl holochain::conductor::conductor::Conductor>::install_app_bundle::{{closure}}
electron-holochain-1  |    3: holochain_runner::embedded_runner::install_or_passthrough::{{closure}}
electron-holochain-1  |    4: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
electron-holochain-1  |    5: tokio::runtime::task::core::Core<T,S>::poll
electron-holochain-1  |    6: tokio::runtime::task::harness::Harness<T,S>::poll
electron-holochain-1  |    7: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
electron-holochain-1  |    8: tokio::runtime::scheduler::multi_thread::worker::Context::run
electron-holochain-1  |    9: tokio::macros::scoped_tls::ScopedKey<T>::set
electron-holochain-1  |   10: tokio::runtime::scheduler::multi_thread::worker::run
electron-holochain-1  |   11: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
electron-holochain-1  |   12: tokio::runtime::task::core::Core<T,S>::poll
electron-holochain-1  |   13: tokio::runtime::task::harness::Harness<T,S>::poll
electron-holochain-1  |   14: tokio::runtime::blocking::pool::Inner::run
electron-holochain-1  |   15: std::sys_common::backtrace::__rust_begin_short_backtrace
electron-holochain-1  |   16: core::ops::function::FnOnce::call_once{{vtable.shim}}
electron-holochain-1  |   17: std::sys::unix::thread::Thread::new::thread_start
electron-holochain-1  |   18: __pthread_deallocate
electron-holochain-1  |  }))
electron-holochain-1  | FATAL PANIC PanicInfo {
electron-holochain-1  |     payload: Any { .. },
electron-holochain-1  |     message: Some(
electron-holochain-1  |         explicit panic,
electron-holochain-1  |     ),
electron-holochain-1  |     location: Location {
electron-holochain-1  |         file: "src/embedded_runner.rs",
electron-holochain-1  |         line: 115,
electron-holochain-1  |         col: 17,
electron-holochain-1  |     },
electron-holochain-1  |     can_unwind: true,
electron-holochain-1  | }
electron-holochain-1  | an unhandled error occurred: Error: Sep 07 23:44:54.257 ERROR holochain_runner::embedded_runner: Conductor returned an error while using a ConductorApi: AppBundleError(FfsIoError(IoError { original: Os { code: 2, kind: NotFound, message: "No such file or directory" }, path: Some("/Users/user/Desktop/CODE/holochain/holochain-electron-template/happ/workdir/application.happ"), backtrace:    0: backtrace::capture::Backtrace::new
electron-holochain-1  |    1: holochain_util::ffs::io_error::IoError::new
electron-holochain-1  |    2: holochain::conductor::conductor::app_impls::<impl holochain::conductor::conductor::Conductor>::install_app_bundle::{{closure}}
electron-holochain-1  |    3: holochain_runner::embedded_runner::install_or_passthrough::{{closure}}
electron-holochain-1  |    4: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
electron-holochain-1  |    5: tokio::runtime::task::core::Core<T,S>::poll
electron-holochain-1  |    6: tokio::runtime::task::harness::Harness<T,S>::poll
electron-holochain-1  |    7: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
electron-holochain-1  |    8: tokio::runtime::scheduler::multi_thread::worker::Context::run
electron-holochain-1  |    9: tokio::macros::scoped_tls::ScopedKey<T>::set
electron-holochain-1  |   10: tokio::runtime::scheduler::multi_thread::worker::run
electron-holochain-1  |   11: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
electron-holochain-1  |   12: tokio::runtime::task::core::Core<T,S>::poll
electron-holochain-1  |   13: tokio::runtime::task::harness::Harness<T,S>::poll
electron-holochain-1  |   14: tokio::runtime::blocking::pool::Inner::run
electron-holochain-1  |   15: std::sys_common::backtrace::__rust_begin_short_backtrace
electron-holochain-1  |   16: core::ops::function::FnOnce::call_once{{vtable.shim}}
electron-holochain-1  |   17: std::sys::unix::thread::Thread::new::thread_start
electron-holochain-1  |   18: __pthread_deallocate
electron-holochain-1  |  }))
electron-holochain-1  | FATAL PANIC PanicInfo {
electron-holochain-1  |     payload: Any { .. },
electron-holochain-1  |     message: Some(
electron-holochain-1  |         explicit panic,
electron-holochain-1  |     ),
electron-holochain-1  |     location: Location {
electron-holochain-1  |         file: "src/embedded_runner.rs",
electron-holochain-1  |         line: 115,
electron-holochain-1  |         col: 17,
electron-holochain-1  |     },
electron-holochain-1  |     can_unwind: true,
electron-holochain-1  | }
electron-holochain-1  |     at Socket.<anonymous> (/Users/user/Desktop/CODE/holochain/holochain-electron-template/electron/node_modules/@lightningrodlabs/electron-holochain/dist/src/holochain.js:119:33)
electron-holochain-1  |     at Socket.emit (node:events:513:28)
electron-holochain-1  |     at addChunk (node:internal/streams/readable:315:12)
electron-holochain-1  |     at readableAddChunk (node:internal/streams/readable:289:9)
electron-holochain-1  |     at Readable.push (node:internal/streams/readable:228:10)
electron-holochain-1  |     at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
electron-holochain-1  | holochain stderr err > Well, this is embarrassing.
electron-holochain-1  | holochain-runner had a problem and crashed. To help us diagnose the problem you can send us a crash report.
electron-holochain-1  | We have generated a report file at "/var/folders/vv/ps6s5lf5503_3q4lh4nj_fbh0000gn/T/report-8cbc01c7-3c49-49f0-a869-ecd802ad1df8.toml". Submit an issue or email with the subject of "holochain-runner Crash Report" and include the report as an attachment.
electron-holochain-1  | - Authors: Connor Turland <[email protected]>
electron-holochain-1  | 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.
electron-holochain-1  | Thank you kindly!
electron-holochain-1  |
electron-holochain-1  | an unhandled error occurred: Error: Well, this is embarrassing.
electron-holochain-1  | holochain-runner had a problem and crashed. To help us diagnose the problem you can send us a crash report.
electron-holochain-1  | We have generated a report file at "/var/folders/vv/ps6s5lf5503_3q4lh4nj_fbh0000gn/T/report-8cbc01c7-3c49-49f0-a869-ecd802ad1df8.toml". Submit an issue or email with the subject of "holochain-runner Crash Report" and include the report as an attachment.
electron-holochain-1  | - Authors: Connor Turland <[email protected]>
electron-holochain-1  | 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.
electron-holochain-1  | Thank you kindly!
electron-holochain-1  |
electron-holochain-1  |     at Socket.<anonymous> (/Users/user/Desktop/CODE/holochain/holochain-electron-template/electron/node_modules/@lightningrodlabs/electron-holochain/dist/src/holochain.js:119:33)
electron-holochain-1  |     at Socket.emit (node:events:513:28)
electron-holochain-1  |     at addChunk (node:internal/streams/readable:315:12)
electron-holochain-1  |     at readableAddChunk (node:internal/streams/readable:289:9)
electron-holochain-1  |     at Readable.push (node:internal/streams/readable:228:10)
electron-holochain-1  |     at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
^C>>>>> [PM2 DEV] Stopping current development session
>>>>> [PM2 DEV] Stopping current development session
web-gui-0             | INFO: Gracefully shutting down. Please wait...
electron-holochain-1  | /Users/user/Desktop/CODE/holochain/holochain-electron-template/electron/node_modules/electron/dist/Electron.app/Contents/MacOS/Electron exited with signal SIGINT

When I run npm run happ-pack

I get a lot of errors, but they all seem possibly related. The similarity is that both errors relate to the happ/workdir/ directory. Here is an example:

Error: IO error: ffs::IoError at path '/Users/checoelho/Desktop/CODE/holochain/holochain-electron-template/happ/workdir/./application.dna': No such file or directory (os error 2)
backtrace:
   0: backtrace::capture::Backtrace::new
   1: holochain_util::ffs::io_error::IoError::new
   2: holochain_util::ffs::canonicalize::{{closure}}
   3: <futures_util::future::maybe_done::MaybeDone<Fut> as core::future::future::Future>::poll
   4: <futures_util::future::join_all::JoinAll<F> as core::future::future::Future>::poll
   5: holochain_cli_bundle::cli::HcAppBundle::run::{{closure}}
   6: tokio::runtime::park::CachedParkThread::block_on
   7: tokio::runtime::context::runtime::enter_runtime
   8: hc::main
   9: std::sys_common::backtrace::__rust_begin_short_backtrace
  10: std::rt::lang_start::{{closure}}
  11: std::rt::lang_start_internal
  12: _main


Caused by:
    ffs::IoError at path '/Users/checoelho/Desktop/CODE/holochain/holochain-electron-template/happ/workdir/./application.dna': No such file or directory (os error 2)
    backtrace:
       0: backtrace::capture::Backtrace::new
       1: holochain_util::ffs::io_error::IoError::new
       2: holochain_util::ffs::canonicalize::{{closure}}
       3: <futures_util::future::maybe_done::MaybeDone<Fut> as core::future::future::Future>::poll
       4: <futures_util::future::join_all::JoinAll<F> as core::future::future::Future>::poll
       5: holochain_cli_bundle::cli::HcAppBundle::run::{{closure}}
       6: tokio::runtime::park::CachedParkThread::block_on
       7: tokio::runtime::context::runtime::enter_runtime
       8: hc::main
       9: std::sys_common::backtrace::__rust_begin_short_backtrace
      10: std::rt::lang_start::{{closure}}
      11: std::rt::lang_start_internal
      12: _main
      ```

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.