Holochain Forum

Undefined signal_type error while running tests

Following the core concepts tutorial and running into this when running the test script. I assume it relates to await s.consistency()

                if (signal.signal_type !== 'Consistency') {

TypeError: Cannot read property 'signal_type' of undefined
    at /home/marcus/happs/core_concepts/cc_tuts/test/node_modules/@holochain/try-o-rama/lib/conductor.js:79:28
    at WebSocket.<anonymous> (/home/marcus/happs/core_concepts/cc_tuts/test/node_modules/@holochain/hc-web-client/lib/index.js:100:37)
    at WebSocket.emit (events.js:215:7)
    at Receiver.receiverOnMessage (/home/marcus/happs/core_concepts/cc_tuts/test/node_modules/ws/lib/websocket.js:720:20)
    at Receiver.emit (events.js:210:5)
    at Receiver.dataMessage (/home/marcus/happs/core_concepts/cc_tuts/test/node_modules/ws/lib/receiver.js:414:14)
    at Receiver.getData (/home/marcus/happs/core_concepts/cc_tuts/test/node_modules/ws/lib/receiver.js:346:17)
    at Receiver.startLoop (/home/marcus/happs/core_concepts/cc_tuts/test/node_modules/ws/lib/receiver.js:133:22)
    at Receiver._write (/home/marcus/happs/core_concepts/cc_tuts/test/node_modules/ws/lib/receiver.js:69:10)
    at doWrite (_stream_writable.js:431:12)

Edit: Still occurs when commenting out s.consistency(). Seems it actually relates to the create_person call, i.e.

const create_result = await alice.call(
        person: { name: "Alice" }
1 Like

stringifying the JSON object in alice.call() seems to resolve this specific error.

I now get a SerializationError:

  SerializationError: 'invalid type: string "{\\"person\\":{\\"name\\":\\"Alice\\"}}", expected struct InputStruct at line 1 column 35'

Reverted the stringify to avoid the SerializationErrors and now all 5 tests suddenly pass ¯\(ツ)

It might also just be a memory issue, I recently resized my DO Droplet

Edit: Nope, started happening again. No idea what’s causing it.


I’m also getting the signal_type error:

                if (signal.signal_type !== 'Consistency') {

The npm version is

"@holochain/try-o-rama": "^0.2.0-rc.2"
version "0.2.0-rc.2"

I tried using JSON.stringify but also received the same signal_type error.

I created an issue at https://github.com/holochain/tryorama/issues/17

The error has been fixed in the codebase, but has not been released. package.json is on "version": "0.3.1", but has not been published to npmjs.com

@marcus it looks like the npm package was renamed to @holochain/tryorama

To fix this issue, edit test/package.json

Replace the line containing "@holochain/try-o-rama": "*" with "@holochain/tryorama": "latest"

1 Like

Alright thanks, I’ll check it out soon and will confirm

1 Like