Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__get_agent_activity unknown env variable conductor error #10

Open
weswalla opened this issue Mar 29, 2023 · 16 comments
Open

__get_agent_activity unknown env variable conductor error #10

weswalla opened this issue Mar 29, 2023 · 16 comments
Assignees
Labels
bug Something isn't working

Comments

@weswalla
Copy link
Contributor

weswalla commented Mar 29, 2023

when trying to run this app:

  • nix develop
  • pnpm i
  • pnpm start

I get the following conductor error:
[1] Error: Failed to install app: Expected AdminResponse::AppInstalled but got Error(InternalError("Conductor returned an error while using a ConductorApi: RibosomeError(WasmRuntimeError(RuntimeError { source: User(WasmError { file: \"crates/holochain/src/core/ribosome/real_ribosome.rs\", line: 426, error: Compile(\"Error while importing \\\"env\\\".\\\"__get_agent_activity\\\": unknown import. Expected Function(FunctionType { params: [I32, I32], results: [I64] })\") }), wasm_trace: [], native_trace: 0: <unknown>\n 1: <unknown>\n 2: <unknown>\n 3: <unknown>\n 4: <unknown>\n 5: <unknown>\n 6: <unknown>\n 7: <unknown>\n 8: <unknown>\n 9: <unknown>\n 10: <unknown>\n 11: <unknown>\n 12: <unknown>\n 13: <unknown>\n 14: <unknown>\n 15: <unknown>\n 16: <unknown>\n 17: <unknown>\n 18: <unknown>\n 19: <unknown>\n 20: <unknown>\n 21: <unknown>\n 22: <unknown>\n 23: <unknown>\n 24: <unknown>\n 25: <unknown>\n 26: <unknown>\n 27: <unknown>\n 28: <unknown>\n 29: <unknown>\n 30: <unknown>\n 31: <unknown>\n }))"))

@weswalla weswalla added the bug Something isn't working label Mar 29, 2023
@pospi
Copy link
Collaborator

pospi commented Mar 29, 2023

Very weird. My only guess is possible platform updates but I wouldn't think that could be right what with Nix flakes... latest version, have cloned from scratch or run npm run clean first to ensure no stale binaries and all that?

@weswalla
Copy link
Contributor Author

tried doing both of those suggestions but still getting the same error.

@adaburrows
Copy link

This looks like a Holochain version mismatch between the build environment and the running environment. They did rewrite Holonix to use nix flakes, and maybe there's an error somewhere where a version is underspecified somehow. What platform are you both using? I'm going to see if I can recreate this on my M1 processor.

@weswalla
Copy link
Contributor Author

mac M1

@adaburrows
Copy link

I actually get quite a lot of warnings which indicate that peer dependencies might be underspecified. I also get the same issue on my M1: https://hackmd.io/@adaburrows/B1T9zSS-3

@pospi
Copy link
Collaborator

pospi commented Apr 4, 2023

peerDependencies warnings shouldn't matter, modules just complain a bit currently in the way that they're set up.

Related?- h-REA/hREA#392 (comment)

@adaburrows
Copy link

It looks like this is actually related to downloading the DNAs instead of building them locally. The version of Holochain installed isn't pinned to the minor version number. For instance, I have Holochain v0.1.3 installed when I run nix develop instead of 0.1.1 which is what the flake file looks like it wants, but at least on my Apple M1 it doesn't honor that.

@adaburrows
Copy link

To fix this it looks like you'll need to update the line in the flake.nix to not use underscores:

inputs.holochain.url = "github:holochain/holochain/holochain-0.1.1";

@adaburrows
Copy link

ARRRRG! It turns out if I do that, then it just doesn't build on my M1. I'm going to try Holochain 0.1.2 next.

~/workspace/nh/timetracking-applet table-integration* 17s                                                                                                                                              23:22:12
❯ nix develop
warning: Git tree '/Users/jillianburrows/workspace/nh/timetracking-applet' is dirty
warning: updating lock file '/Users/jillianburrows/workspace/nh/timetracking-applet/flake.lock':
• Updated input 'holochain-dev/holochain':
    follows 'holochain-dev/versions/holochain'
  → 'github:holochain/holochain/44f2a47cf0c39368be3fc860d6bcceeb824390d1' (2023-02-01)
warning: Git tree '/Users/jillianburrows/workspace/nh/timetracking-applet' is dirty
warning: Git tree '/Users/jillianburrows/workspace/nh/timetracking-applet' is dirty
error: builder for '/nix/store/xb3f2761r8d64bzykbzmgq1j62icl6xg-holochain-workspace.drv' failed with exit code 101;
       last 10 log lines:
       >   cargo:rerun-if-changed=./src/sql/cell/update_dep_activity.sql
       >   cargo:rerun-if-changed=./src/sql/cell/update_dep_create_link.sql
       >   cargo:rerun-if-changed=./src/sql/conductor/schema/0.sql
       >   cargo:rerun-if-changed=./src/sql/conductor/nonce_already_seen.sql
       >   cargo:rerun-if-changed=./src/sql/conductor/delete_expired_nonce.sql
       >
       >   --- stderr
       >   thread 'main' panicked at 'Error while checking schema: Os { code: 2, kind: NotFound, message: "No such file or directory" }, path = "./src/sql/cell/schema/1-up.sql"', crates/holochain_sqlite/build.rs:108:29
       >   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
       > warning: build failed, waiting for other jobs to finish...
       For full logs, run 'nix log /nix/store/xb3f2761r8d64bzykbzmgq1j62icl6xg-holochain-workspace.drv'.
error: 1 dependencies of derivation '/nix/store/hvqsjb8nn3yxc3rlw37rrgkz1wm3wxhs-nix-shell-env.drv' failed to build

~/workspace/nh/timetracking-applet table-integration* 5m 26s

@adaburrows
Copy link

Ok, the build for version 0.1.2 works on Apple M1. If you're not using it already, you should upgrade so we can actually collaborate on this code. Maybe we should probably also try to pin this for the whole ecosystem for now, so every zome in every project should be theoretically compatible.

@adaburrows
Copy link

Oh, as much as it pains me to say it. The version 0.1.3 is much more fleshed out in terms of Nix. Perhaps we need to change it to that.

@weswalla
Copy link
Contributor Author

It looks like this is actually related to downloading the DNAs instead of building them locally. The version of Holochain installed isn't pinned to the minor version number. For instance, I have Holochain v0.1.3 installed when I run nix develop instead of 0.1.1 which is what the flake file looks like it wants, but at least on my Apple M1 it doesn't honor that.

So @adaburrows you think that the issue is that the .dna files that are downloaded from hREA are built on an incompatible version of holochain than what nix develop uses?

@adaburrows
Copy link

There's two problems:

  1. We need to be to install a particular pinned version of Holochain using Nix. Currently, we can only pin and install v0.1.3 and above on Apple M1 silicon, anything less than that still installs v0.1.3.
  2. The process used to build the zomes needs to used the same pinned version as we are using. Otherwise if we just all build our own versions we will experience network fragmentation across each built version when testing between people.

So we need to pin the proper version that works on Apple silicon (0.1.3 is sufficient) and we need to be able to download the zomes for the version of Holochain that is pinned in Nix. Currently, I see there is a version of hREA zomes built for 0.1.3. So that part is done. I'm going to get PRs in for our repos to update the flake.nix to Holochain v0.1.3. My test on our NH Launcher repo worked, so I can get that in soon.

@pospi
Copy link
Collaborator

pospi commented Apr 20, 2023

pinned to 0.1.3 now, But @weswalla is still getting the error...

@pospi
Copy link
Collaborator

pospi commented Apr 20, 2023

Oops, hadn't pushed! Try it now after re-entering your Nix env, 39a67fe should fix.

@adaburrows
Copy link

Ah, yeah, without a pinned version it would have automatically installed v0.2.0 instead of v0.1.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants