holochain / tryorama

Toolset to manage Holochain conductors and facilitate test scenarios
212 stars 13 forks source link

Example test fails: Field "manifest" missing #87

Closed jost-s closed 2 years ago

jost-s commented 3 years ago

Running npm test in the example folder from a nix shell with nightly holochain build throws an error:

07:04:57 [tryorama: player c0] debug: Player.installHapp(["/Users/jost/Desktop/dev/holochain/tryorama/example/test.dna.gz"], noAgentPubKey)
07:04:57 [tryorama] error: Test error: {
  type: 'error',
  data: { type: 'internal_error', data: 'missing field `manifest`' }
}
not ok 1 Test threw an exception. See output for details.
  ---
    operator: fail
    at: <anonymous> (/Users/jost/Desktop/dev/holochain/tryorama/src/middleware.ts:137:13)
    stack: |-
      Error: Test threw an exception. See output for details.
          at Test.assert [as _assert] (/Users/jost/Desktop/dev/holochain/tryorama/node_modules/tape/lib/test.js:304:54)
          at Test.bound [as _assert] (/Users/jost/Desktop/dev/holochain/tryorama/node_modules/tape/lib/test.js:91:32)
          at Test.fail (/Users/jost/Desktop/dev/holochain/tryorama/node_modules/tape/lib/test.js:398:10)
          at Test.bound [as fail] (/Users/jost/Desktop/dev/holochain/tryorama/node_modules/tape/lib/test.js:91:32)
          at /Users/jost/Desktop/dev/holochain/tryorama/src/middleware.ts:137:13
          at processTicksAndRejections (internal/process/task_queues.js:97:5)
  ...
07:04:57 [tryorama] debug: Test failed: basic test {
  type: 'error',
  data: { type: 'internal_error', data: 'missing field `manifest`' }
}

I've debugged into the (fairly complex) code and and got to the point that it happens when the client sends the message to register the test.dna to the AdminWebSocket. The response is the above error then.

I don't understand the architecture enough yet to know where the registering fails on the admin web socket. Perhaps @Connoropolous or @zo-el can see on the spot where the problem is?

zo-el commented 3 years ago

@jost-s, I don't know what version of tryorama you are using, I mention this because it seems like you are using a much older version of holochain. I see you are using a DNA with .dna.gz file format. This would be created if you are still using dna-utils binary. Currently, after the hc binary release, the new file format ends with .dna or .happ.

jost-s commented 3 years ago

@zo-el I have cloned the tryorama repo and run the example test as is.

My holochain version is 0.0.100

[nix-shell:~/Desktop/dev/holochain/tryorama/example]$ holochain --version
holochain 0.0.100

The tryorama version is 0.4.3

{
  "name": "@holochain/tryorama",
  "repository": {
    "type": "git",
    "url": "https://github.com/holochain/tryorama"
  },
  "version": "0.4.3",
  "description": "test framework for holochain hApps",
  "main": "lib/index.js",
  "types": "lib/index.d.ts",
  "directories": {
    "test": "test"
  },

Maybe the test dna in the example folder is not up to date?

zo-el commented 3 years ago

@jost-s Interesting, that looks to be an oversite. This is the new test DNA that is been used for testing tryorama. I will clean this up. Sorry for the inconvenience.

jost-s commented 3 years ago

Not at all, @zo-el. Thanks for the hint 👌