Giter VIP home page Giter VIP logo

Comments (4)

0xjjpa avatar 0xjjpa commented on June 8, 2024 1

Figured it out after 2 hours. Since this error only happens during production, I figured to diff the outputs from the sourced-maps enabled versions. Turns out that the minifier would mess enough of the class names for the types to not be parsed during the writeJSON. For whoever might see this in the future, this is the line that helped me in my next.config.js although likely would be needed in similar webpack-bundling setups:

webpack: (config) => {
    config.optimization.minimize = false;
    return config;
  },

from zkp-ecdsa.

0xjjpa avatar 0xjjpa commented on June 8, 2024

FWIW I tried updating the same tsconfig.json, the same typescript version, importing reflect-metadata, using Proxy to wrap the Type and then pass the instance to the writeJson, using directly TypedJSON.stringify, JSON.stringify, and nothing worked.

Would it be possible to give a try to run the read/write|Json code against a browser runner? I've seen most of this code in action already used in browsers, but just the serializing part might be broken.

from zkp-ecdsa.

0xjjpa avatar 0xjjpa commented on June 8, 2024

image

This is the exact line and the exact values where the error kicks in, which bubbled down from const proof = writeJson(SignatureProofList, attestation.proof);.

I've no idea how to replicate this as the tests are ran against node.js environment, but might look into getting this replicated to begin with outside of the current framework (i.e. nextjs)

from zkp-ecdsa.

0xjjpa avatar 0xjjpa commented on June 8, 2024

As a final note on my side, this only happens with SignatureProofList. When running const JSONParams = writeJson(SystemParametersList, attestation.params); I've got no errors.

from zkp-ecdsa.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.