Skip to content
This repository has been archived by the owner on May 15, 2021. It is now read-only.

Issues trying to get server started on fresh machine #106

Open
harlantwood opened this issue Oct 24, 2020 · 4 comments
Open

Issues trying to get server started on fresh machine #106

harlantwood opened this issue Oct 24, 2020 · 4 comments

Comments

@harlantwood
Copy link

harlantwood commented Oct 24, 2020

Mac OS Catalina -- 10.15.6 (19G2021)

I cloned the repo and ran nix-shell, which took a while but then gave me a shell. I quit that and tried the first command in the readme with the following results:

$ nix-shell --run acorn-package

    Updating git repository `https://github.com/holochain/holochain.git`
  Installing holochain v0.0.1 (https://github.com/holochain/holochain.git?rev=4714fbddc48f1f9987c9f574b8d06510ea58ab16#4714fbdd)
    Updating git repository `https://github.com/holochain/lmdb-rs.git`
    Updating git repository `https://github.com/holochain/rkv.git`
    Updating crates.io index
   Compiling holochain_wasm_test_utils v0.0.1 (/Users/harlan/code/acorn-hc/.cargo/git/checkouts/holochain-391184137afba57c/4714fbd/crates/test_utils/wasm)
   Compiling holochain v0.0.1 (/Users/harlan/code/acorn-hc/.cargo/git/checkouts/holochain-391184137afba57c/4714fbd/crates/holochain)
    Finished release [optimized] target(s) in 15.29s
   Replacing /Users/harlan/code/acorn-hc/.cargo/bin/holochain
    Replaced package `holochain v0.0.1 (https://github.com/holochain/holochain.git?rev=4714fbddc48f1f9987c9f574b8d06510ea58ab16#4714fbdd)` with `holochain v0.0.1 (https://github.com/holochain/holochain.git?rev=4714fbddc48f1f9987c9f574b8d06510ea58ab16#4714fbdd)` (executable `holochain`)
    Updating git repository `https://github.com/holochain/holochain.git`
  Installing dna_util v0.0.1 (https://github.com/holochain/holochain.git?rev=4714fbddc48f1f9987c9f574b8d06510ea58ab16#4714fbdd)
    Updating git repository `https://github.com/holochain/lmdb-rs.git`
    Updating git repository `https://github.com/holochain/rkv.git`
    Updating crates.io index
warning: Patch `lmdb-rkv v0.14.0 (https://github.com/holochain/lmdb-rs.git#46043614)` was not used in the crate graph.
Patch `rkv v0.10.4 (https://github.com/holochain/rkv.git#6f6b4b5a)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
    Finished release [optimized] target(s) in 3.08s
   Replacing /Users/harlan/code/acorn-hc/.cargo/bin/dna-util
    Replaced package `dna_util v0.0.1 (https://github.com/holochain/holochain.git?rev=4714fbddc48f1f9987c9f574b8d06510ea58ab16#4714fbdd)` with `dna_util v0.0.1 (https://github.com/holochain/holochain.git?rev=4714fbddc48f1f9987c9f574b8d06510ea58ab16#4714fbdd)` (executable `dna-util`)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

audited 176 packages in 1.103s
found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
audited 26 packages in 0.633s
found 0 vulnerabilities

+ cargo build --release --target wasm32-unknown-unknown
    Updating git repository `ssh://[email protected]/holochain/holochain.git`
error: failed to get `hdk3` as a dependency of package `dna_help v0.1.0 (/Users/harlan/code/acorn-hc/crates/dna_help)`

Caused by:
  failed to load source for dependency `hdk3`

Caused by:
  Unable to update ssh://[email protected]/holochain/holochain.git?rev=4714fbddc48f1f9987c9f574b8d06510ea58ab16#4714fbdd

Caused by:
  failed to clone into: /Users/harlan/code/acorn-hc/.cargo/git/db/holochain-8605acaca5aa8bc8

Caused by:
  failed to authenticate when downloading repository
attempted ssh-agent authentication, but none of the usernames `git` succeeded

Caused by:
  no authentication available
@harlantwood
Copy link
Author

I solved this by adding: ~/.cargo/config configuration that looks like:

[net]
git-fetch-with-cli = true

which will instruct Cargo to fetch git repositories with the git CLI rather than with libgit2. Using this will read .ssh/config because that's what git does.

-- from rust-lang/cargo#2078 (comment)

Feel free to close if you like.

@harlantwood harlantwood changed the title failed to get hdk3 as a dependency of package `dna_help v0.1.0 Issues trying to get server started on fresh machine Oct 24, 2020
@harlantwood
Copy link
Author

harlantwood commented Oct 24, 2020

next issue:

$ nix-shell --run acorn-hc
    Updating git repository `https://github.com/holochain/holochain.git`
  Installing holochain v0.0.1 (https://github.com/holochain/holochain.git?rev=4714fbddc48f1f9987c9f574b8d06510ea58ab16#4714fbdd)
    Updating git repository `https://github.com/holochain/lmdb-rs.git`
    Updating git repository `https://github.com/holochain/rkv.git`
    Updating crates.io index
    Finished release [optimized] target(s) in 3.93s
   Replacing /Users/harlan/code/acorn-hc/.cargo/bin/holochain
    Replaced package `holochain v0.0.1 (https://github.com/holochain/holochain.git?rev=4714fbddc48f1f9987c9f574b8d06510ea58ab16#4714fbdd)` with `holochain v0.0.1 (https://github.com/holochain/holochain.git?rev=4714fbddc48f1f9987c9f574b8d06510ea58ab16#4714fbdd)` (executable `holochain`)
    Updating git repository `https://github.com/holochain/holochain.git`
  Installing dna_util v0.0.1 (https://github.com/holochain/holochain.git?rev=4714fbddc48f1f9987c9f574b8d06510ea58ab16#4714fbdd)
    Updating git repository `https://github.com/holochain/lmdb-rs.git`
    Updating git repository `https://github.com/holochain/rkv.git`
    Updating crates.io index
warning: Patch `lmdb-rkv v0.14.0 (https://github.com/holochain/lmdb-rs.git#46043614)` was not used in the crate graph.
Patch `rkv v0.10.4 (https://github.com/holochain/rkv.git#6f6b4b5a)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
    Finished release [optimized] target(s) in 2.52s
   Replacing /Users/harlan/code/acorn-hc/.cargo/bin/dna-util
    Replaced package `dna_util v0.0.1 (https://github.com/holochain/holochain.git?rev=4714fbddc48f1f9987c9f574b8d06510ea58ab16#4714fbdd)` with `dna_util v0.0.1 (https://github.com/holochain/holochain.git?rev=4714fbddc48f1f9987c9f574b8d06510ea58ab16#4714fbdd)` (executable `dna-util`)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

audited 176 packages in 1.147s
found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
audited 26 packages in 0.639s
found 0 vulnerabilities

+ acorn-package
+ cargo build --release --target wasm32-unknown-unknown
    Finished release [optimized] target(s) in 0.07s
+ cd dnas/profiles
+ dna-util -c profiles.dna.workdir
+ cd ../..
+ cd dnas/projects
+ dna-util -c projects.dna.workdir
+ npm run start

> [email protected] start /Users/harlan/code/acorn-hc
> npx @holochain-open-dev/holochain-run-dna dnas/profiles/profiles.dna.gz

events.js:187
      throw er; // Unhandled 'error' event
      ^

Error: spawn lair-keystore ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn lair-keystore',
  path: 'lair-keystore',
  spawnargs: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `npx @holochain-open-dev/holochain-run-dna dnas/profiles/profiles.dna.gz`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/harlan/.npm/_logs/2020-10-24T07_27_18_160Z-debug.log

@harlantwood
Copy link
Author

harlantwood commented Oct 24, 2020

This was apparently because holochain had not been initialized on my machine.

I did:

nix-shell
holochain -i

And hit enter a few times to install DB, keystore, etc, and then running the original command:

nix-shell --run acorn-hc

works fine.

@harlantwood
Copy link
Author

All good now! Running both client and server successfully. 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant