Decoding draco buffer data after encoding in javascript gives unknown geometry type

I am trying to convert an obj file to draco using javascript by following the steps from here:

When I try to decode it, I am getting an error ‘Unknown Geometry type’. The logged value of the Geometry type is 165 whereas the decode function only accepts 0 (POINT_CLOUD) and 1 (TRIANGULAR_MESH).

To decode, I write the encoded buffer to a file and then decode using decodeDracoData() in this:

My overall objective is to convert a set of objs to a single draco file with some added parameters. While converting a set of objs to draco is simple using the terminal, I need to add some extra data to the file, so I’m trying to convert the obj to buffer using the encoderModule in draco3d, and then writing the buffer to a file. draco3d also provides a decoderModule, but trying to parse the generated file with the decoder simply returns an unknown geometry type.

I’m not sure how to proceed and will be really grateful for any pointers on possible solutions.