privacy-scaling-explorations / p0tion

The MPC suite of tools for conducting zkSNARK Phase 2 Trusted Setup ceremonies
https://ceremony.pse.dev
MIT License
86 stars 68 forks source link

errors on old node.js version v17.9.1 #303

Open themighty1 opened 3 months ago

themighty1 commented 3 months ago

As I was trying to run phase2cli auth && phase2cli contribute -c anon-aadhaar-v2-trusted-setup-ceremony

I got an error

/home/default2/.nvm/versions/node/v17.9.1/lib/node_modules/@p0tion/phase2cli/node_modules/solc/soljson.js:133
    process["on"]("unhandledRejection", function (reason) { throw reason; });
                                                            ^

Error: Unable to find the user currently authenticated with Firebase. Verify that the Firebase application is properly configured and repeat user authentication before trying again.
    at getCurrentFirebaseAuthUser (file:///home/default2/.nvm/versions/node/v17.9.1/lib/node_modules/@p0tion/phase2cli/node_modules/@p0tion/actions/dist/index.mjs:1940:15)
    at checkAuth (file:///home/default2/.nvm/versions/node/v17.9.1/lib/node_modules/@p0tion/phase2cli/dist/index.js:1642:18)
    at Command.contribute (file:///home/default2/.nvm/versions/node/v17.9.1/lib/node_modules/@p0tion/phase2cli/dist/index.js:3029:99)
    at async Command.parseAsync (/home/default2/.nvm/versions/node/v17.9.1/lib/node_modules/@p0tion/phase2cli/node_modules/commander/lib/command.js:935:5)

Node.js v17.9.1

After I upgraded to the latest LTS nodejs, the error was gone.

Maybe potion could check the version compatibility during runtime and inform the user?

ctrlc03 commented 1 month ago

As I was trying to run phase2cli auth && phase2cli contribute -c anon-aadhaar-v2-trusted-setup-ceremony

I got an error

/home/default2/.nvm/versions/node/v17.9.1/lib/node_modules/@p0tion/phase2cli/node_modules/solc/soljson.js:133
    process["on"]("unhandledRejection", function (reason) { throw reason; });
                                                            ^

Error: Unable to find the user currently authenticated with Firebase. Verify that the Firebase application is properly configured and repeat user authentication before trying again.
    at getCurrentFirebaseAuthUser (file:///home/default2/.nvm/versions/node/v17.9.1/lib/node_modules/@p0tion/phase2cli/node_modules/@p0tion/actions/dist/index.mjs:1940:15)
    at checkAuth (file:///home/default2/.nvm/versions/node/v17.9.1/lib/node_modules/@p0tion/phase2cli/dist/index.js:1642:18)
    at Command.contribute (file:///home/default2/.nvm/versions/node/v17.9.1/lib/node_modules/@p0tion/phase2cli/dist/index.js:3029:99)
    at async Command.parseAsync (/home/default2/.nvm/versions/node/v17.9.1/lib/node_modules/@p0tion/phase2cli/node_modules/commander/lib/command.js:935:5)

Node.js v17.9.1

After I upgraded to the latest LTS nodejs, the error was gone.

Maybe potion could check the version compatibility during runtime and inform the user?

this could actually be related to https://github.com/privacy-scaling-explorations/p0tion/issues/220 rather than the node version - just not enough time between auth and contributing hence why the user doc was not found, and after some time (time it took to switch node version) it worked