Get a SerializationException when using rhino_compute with javascript

Hi all,

playing around with rhino compute compiled with VS and running on my local mashine i was able to use compute.rhino3d.py successfully but when i try compute.rhino3d.js a error occured.

This is the simple javascript and html index

// Import libraries

import rhino3dm from 'rhino3dm'
import { RhinoCompute } from 'rhinocompute'


// Load rhino3dm
const rhino = await rhino3dm()
console.log('Loaded rhino3dm.')

// Your code ...
RhinoCompute.url = "http://localhost:5000/"
RhinoCompute.apiKey = ""

const c1 = new rhino.Circle([0,0,0],10)
const c2 = new rhino.Circle([5,0,0],10)

const curves = [c1,c2]
console.log(curves)

const ca = RhinoCompute.Curve.createBooleanUnion(curves)
console.log(ca)
<html>
  <head>
  <!-- stuff -->
  </head>
  <body>
      <!-- Import maps polyfill -->
      <!-- Remove this when import maps will be widely supported -->
      <script async src="https://unpkg.com/es-module-shims@1.10.0/dist/es-module-shims.js"></script>

      <script type="importmap">
          {
              "imports": {
                  "rhino3dm":"https://unpkg.com/rhino3dm@8.4.0/rhino3dm.module.min.js",
                  "rhinocompute": "https://www.unpkg.com/compute-rhino3d@0.13.0-beta/compute.rhino3d.module.js"
              }
          }
      </script>

      <script type="module" src="./script.js"></script>
  </body>
</html>

These are the error messeages from the browser and the server consol.

Rhino 7 is in use.

Maybe someone can give a tip to solve the problem.

The solution for the problem was , a circle in rhino3dm.js has no encode decode method but a nurbscuve have and cirle has the .toNurnsCurve method.

So i converted the circle to nurbscurve and its getting serialized automaticly and the server send the computed object back.

// Import libraries

import rhino3dm from 'rhino3dm'
import { RhinoCompute } from 'rhinocompute'


// Load rhino3dm
const rhino = await rhino3dm()
console.log('Loaded rhino3dm.')

// Your code ...
RhinoCompute.url = "http://localhost:5000/"
RhinoCompute.apiKey = ""

const c1 = new rhino.Circle([0,0,0],10)
const c2 = new rhino.Circle([5,0,0],10)

const ca = RhinoCompute.Curve.createBooleanUnion([c1.toNurbsCurve(),c2.toNurbsCurve()])

console.log(ca)