Open giovanni-bertoncelli opened 2 years ago
I think the issue is here: https://github.com/moleculerjs/moleculer-web/blob/master/src/index.js#L1177 where the entire route is returned with functions included...
Hi @giovanni-bertoncelli can you please create a repro repo?
We can't fix it. Related open issue in cbor repo: https://github.com/kriszyp/cbor-x/issues/2
We have software in production that has migrated to the CBOR serializer... this bug can be very frustrating, can't this be fixed on the moleculer side or with a PR on cbor-x?
Alternative, if you copy the CBOR serializer code and walk the payload in serialize
method and remove functions. It beats the performance pretty well, this is why I don't do that in the built-in serializer. The eventual solution if it's fixed in CBOR lib.
I'm using the new gateway action
![image](https://user-images.githubusercontent.com/67106822/150801214-de1afac4-1313-447b-b439-451c8f00b3a4.png)
addRoute
and it seems to try to serialize a function, which is not a problem with JSON serializer, but with CBOR for example crashes the entire node.