seneca-mesh icon indicating copy to clipboard operation
seneca-mesh copied to clipboard

mesh does not work

Open nick121212 opened this issue 7 years ago • 6 comments

err: CL MISSING { color: 'red', format: 'hex' }

nick121212 avatar Jul 19 '17 08:07 nick121212

Same here. Additionally the quick example in the readme is not consistent with the example "05-readme"

// this part is omitted in the readme
.listen(9001)

If I remove the part above the service seems to work but the client complains w msg: 'seneca: No matching action pattern found for { format: \'hex\', color: \'red\' }, and no default result provided (using a default$ property).',

karlpokus avatar Jul 21 '17 12:07 karlpokus

Same error here: CL MISSING { format: 'hex', color: 'red' }

vforv avatar Jul 27 '17 18:07 vforv

Seems to be a problem with the [email protected] release. [email protected] works.

timoweiss avatar Jul 28 '17 07:07 timoweiss

I had the same issue with color-client.js in examples/30-multicast-discovery folder. Then I noticed that the latest version (0.10.0) published to NPM is quite old ( March 7), so I tried the master branch, but I still got the same error. Then I checked the api-service.js in examples/30-multicast-discovery folder, and it worked, although the code block which sends the message looked very similar to the one in color-client.js. There was one outstanding difference: in color-client.js there was no seneca.ready(). It turned out that adding this solved the problem. My working color-client.js is:

var Seneca = require('seneca')

Seneca({tag: 'client', log: 'silent'})
  .use('../..')
  .ready(function () {
    this.act(
    {
      role: 'color',
      format: process.argv[2] || 'hex',
      color: process.argv[3] || 'red'
    },
    function (err, out) {
      console.log(err && err.message || out.color)
      this.close()
    })
  })

Using master branch is not a real solution for this problem, but I hope this helps. @rjrodger is there a plan for shipping a new (or a quickfix) version to NPM?

sirudog avatar Aug 07 '17 13:08 sirudog

@sirudog, I had the same issue with [email protected] and [email protected]. I was able to make it work by adding the client act registration in the ready method as you recommended. I am new to Seneca-mesh and Senecajs in general. I came here after ready @rjrodger book The Tao of Microservices. I believe that the framework could benefit from better/updated documentation. I am ready to help !

bakarydiarra avatar Jul 24 '18 18:07 bakarydiarra

HI I am still getting the same error

seneca: No matching action pattern found for { role: 'color', format: 'hex', color: 'red' }, and no default result provided (using a default$ property)

My node version is 8.12.0

Can you please help me with this.

raghuprathap avatar Oct 16 '18 09:10 raghuprathap