pythagorean / coolcats

Clutter/PyCoolcats rewrite in Rust, a fully distributed social messaging app built on Holochain
GNU General Public License v3.0
27 stars 2 forks source link

make dna-start fails for me with 0.0.17-alpha2 #3

Closed jamesray1 closed 5 years ago

jamesray1 commented 5 years ago
 16:33:51  jr@fm  ~/coolcats2  ⬡ v8.16.0   master ✔ 
$ make dna-start
(cd dna-src; hc package)
> cargo +nightly-2019-01-24 build --release --target=wasm32-unknown-unknown --target-dir=target
    Finished release [optimized] target(s) in 0.21s
thread 'main' panicked at 'Failed to instantiate module: Function("host module doesn\'t export function with name hc_grant_capability")', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
make: *** [Makefile:38: dna] Error 101

 16:34:00  ✘  jr@fm  ~/coolcats2  ⬡ v8.16.0   master ✔ 
$ hc --version
hc 0.0.17-alpha2

 16:34:09  jr@fm  ~/coolcats2  ⬡ v8.16.0   master ✔ 
$ holochain --version
holochain 0.0.17-alpha2

 16:34:17  jr@fm  ~/coolcats2  ⬡ v8.16.0   master ✔ 
$ cargo install cargo-web
    Updating crates.io index
  Installing cargo-web v0.6.25
error: binary `cargo-web` already exists in destination as part of `cargo-web v0.6.25`
Add --force to overwrite

 16:34:44  ✘  jr@fm  ~/coolcats2  ⬡ v8.16.0   master ✔ 
$ RUST_BACKTRACE=1 make dna-start
(cd dna-src; hc package)
> cargo +nightly-2019-01-24 build --release --target=wasm32-unknown-unknown --target-dir=target
    Finished release [optimized] target(s) in 0.08s
thread 'main' panicked at 'Failed to instantiate module: Function("host module doesn\'t export function with name hc_grant_capability")', src/libcore/result.rs:997:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:70
             at src/libstd/sys_common/backtrace.rs:58
             at src/libstd/panicking.rs:200
   2: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:215
             at src/libstd/panicking.rs:478
   3: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:385
   4: rust_begin_unwind
             at src/libstd/panicking.rs:312
   5: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
   6: core::result::unwrap_failed
   7: holochain_core::nucleus::ribosome::factories::wasm_instance_factory
   8: holochain_core::nucleus::ribosome::run_dna::run_dna
   9: hc::cli::package::Packager::bundle_recurse
  10: hc::cli::package::Packager::bundle_recurse
  11: hc::cli::package::package
  12: hc::run
  13: hc::main
  14: std::rt::lang_start::{{closure}}
  15: main
  16: __libc_start_main
  17: _start
make: *** [Makefile:38: dna] Error 101

 16:35:06  ✘  jr@fm  ~/coolcats2  ⬡ v8.16.0   master ✔ 
$ rustc --version
rustc 1.33.0-nightly (19f8958f8 2019-01-23)

 16:36:22  jr@fm  ~/coolcats2  ⬡ v8.16.0   master ✔ 
$ yarn --version
1.16.0

 16:36:35  jr@fm  ~/coolcats2  ⬡ v8.16.0   master ✔ 
$ node --version
v8.16.0

 16:36:42  jr@fm  ~/coolcats2  ⬡ v8.16.0   master ✔ 
$ 
jamesray1 commented 5 years ago

Actually, I hadn't ran git pull.

jamesray1 commented 5 years ago

Now I get the same error as I was getting in https://github.com/holochain/holochain-rust/pull/1463.

pythagorean commented 5 years ago

This is currently already using Holochain v0.0.18-alpha1 so you may need to update your toolchain. You can make sure you have the correct version of hc within the coolcats2 directory by running make update-cli. You can also run make update-conductor to build and install the correct version for multiuser testing.

jamesray1 commented 5 years ago

Thanks. They are the latest version at the moment. Perhaps I didn't update before trying. At the moment http://localhost:8000 works but not http://localhost:8001, with the errror #not currently working with two or more conductors

 11:58:26  jr@fm  ~/coolcats2  ⬡ v8.16.0   master ✘ ✭ 
$ holochain --version
holochain 0.0.18-alpha1

 11:59:24  jr@fm  ~/coolcats2  ⬡ v8.16.0   master ✘ ✭ 
$ hc --version
hc 0.0.18-alpha1

 11:59:46  jr@fm  ~/coolcats2  ⬡ v8.16.0   master ✘ ✭ 
$ make start
(cd dna-src; mkdir dist; rustup run nightly-2019-01-24 hc package -o dist/coolcats.dna.json)
mkdir: cannot create directory ‘dist’: File exists
> cargo build --release --target=wasm32-unknown-unknown --target-dir=target
    Finished release [optimized] target(s) in 0.18s
> cargo build --release --target=wasm32-unknown-unknown --target-dir=target
    Finished release [optimized] target(s) in 0.08s
Created DNA package file at "dist/coolcats.dna.json"
DNA hash: QmRoaKg9JaZN1LdYLBzfhHP6hr8t3wMGY5PSmjcKRNxoRn
ln -s coolcats.dna.json dna-src/dist/dna-src.dna.json
ln: failed to create symbolic link 'dna-src/dist/dna-src.dna.json': File exists
make: [Makefile:49: dna-build] Error 1 (ignored)
(cd ui-src; yarn -s; yarn deploy)
yarn run v1.16.0
$ webpack; cargo +stable web deploy --release; patch -p0 target/deploy/*.js < deploy-js.diff
[hardsource:241fcee8] Writing new cache 241fcee8...
[hardsource:241fcee8] Tracking node dependencies with: yarn.lock.
clean-webpack-plugin: removed static
Hash: d5572ccee472ae4a5d16
Version: webpack 4.33.0
Time: 4956ms
Built at: 2019-06-07 12:00:30
                               Asset       Size  Chunks             Chunk Names
../static/cat-eating-bird-circle.png    259 KiB          [emitted]  
                  ../static/cats.jpg   54.9 KiB          [emitted]  
               ../static/favicon.png   7.12 KiB          [emitted]  
                ../static/index.html  657 bytes          [emitted]  
                         favicon.png   7.12 KiB          [emitted]  
                          runtime.js   28.6 KiB       0  [emitted]  main
Entrypoint main = runtime.js
[0] ./src/runtime.ts 234 bytes {0} [built]
[1] ./src/application/interfaces/app.css 1.07 KiB {0} [built]
[2] ./node_modules/css-loader/dist/cjs.js!./src/application/interfaces/app.css 8.06 KiB {0} [built]
[5] ./src/application/interfaces/images/cats.jpg 30 bytes {0} [built]
[8] ./src/application/interfaces/images/favicon.png 33 bytes {0} [built]
[9] ./src/application/interfaces/images/cat-eating-bird-circle.png 48 bytes {0} [built]
    + 4 hidden modules
Child html-webpack-plugin for "../static/index.html":
     1 asset
    Entrypoint undefined = ../static/index.html
    [2] (webpack)/buildin/global.js 472 bytes {0} [built]
    [3] (webpack)/buildin/module.js 497 bytes {0} [built]
        + 2 hidden modules
   Compiling serde v1.0.92
   Compiling coolcats2 v0.1.0 (/home/jr/coolcats2/ui-src)
   Compiling serde_json v1.0.39
   Compiling bincode v1.0.1
   Compiling stdweb-derive v0.5.1
   Compiling stdweb-internal-macros v0.2.7
   Compiling stdweb v0.4.17
   Compiling yew v0.7.0 (https://github.com/DenisKolodin/yew#0f4ca793)
   Compiling yew-router v0.1.0 (https://github.com/saschagrunert/yew-router#e12a8cb7)
    Finished release [optimized] target(s) in 38.87s
    Processing "coolcats2.wasm"...
    Finished processing of "coolcats2.wasm"!
The `coolcats2` was deployed to "/home/jr/coolcats2/ui-src/target/deploy"!
patching file target/deploy/coolcats2.js
Done in 52.58s.
holochain -c conductor/conductor-config-agent1.toml > /tmp/dna-testnet.log 2>&1 &
tail: cannot open '+1' for reading: No such file or directory
#not currently working with two or more conductors
#holochain -c /tmp/conductor-config-agent2.toml > /tmp/dna-testnet2.log 2>&1 &

 12:25:07  jr@fm  ~/coolcats2  ⬡ v8.16.0   master ✘ ✭  1m39s 
$ 
pythagorean commented 5 years ago

You're using an older version of Coolcats2 now. Sorry about that. Do a git pull then make update and try again.

jamesray1 commented 5 years ago

Got it to work!

image