tryethernal / ethernal

Ethernal is a block explorer for EVM-based chains. In a few seconds, spin up a fully-featured explorer for your L1/L2 rollup/testnet. Compatible with Optimism, ZK, Anvil, Hardhat, Geth...
https://www.tryethernal.com
Other
204 stars 47 forks source link

[self-hosted] trying to login brings gateway error #244

Closed DegenComedian closed 1 year ago

DegenComedian commented 1 year ago

Hi,

I created a new account in the frontend and it automatically logged me in. I could work in my workspace but after I logged out and tried to login again I see the following error in the frontend

<html> <head><title>504 Gateway Time-out</title></head> <body> <center><h1>504 Gateway Time-out</h1></center> <hr><center>nginx/1.21.6</center> </body> </html> 

and here is the log output in the web container log

error: uncaughtException: Error verifying password: hash parameter missing
Error: Error verifying password: hash parameter missing
    at FirebaseScrypt.verify (/app/node_modules/firebase-scrypt/dist/firebaseScrypt.js:139:22)
    at firebaseVerify (/app/lib/crypto.js:61:23)
    at Strategy.module.exports [as _verify] (/app/middlewares/strategies/local.js:18:29)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {"date":"Tue Apr 04 2023 15:38:49 GMT+0000 (Coordinated Universal Time)","error":{"message":"Error verifying password: hash parameter missing","stack":"Error: Error verifying password: hash parameter missing\n    at FirebaseScrypt.verify (/app/node_modules/firebase-scrypt/dist/firebaseScrypt.js:139:22)\n    at firebaseVerify (/app/lib/crypto.js:61:23)\n    at Strategy.module.exports [as _verify] (/app/middlewares/strategies/local.js:18:29)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)"},"exception":true,"os":{"loadavg":[0.01,0.04,0.08],"uptime":29472339.93},"process":{"argv":["/usr/local/bin/node","/app/index.js"],"cwd":"/app","execPath":"/usr/local/bin/node","gid":0,"memoryUsage":{"arrayBuffers":452432,"external":1654237,"heapTotal":59838464,"heapUsed":54004656,"rss":147861504},"pid":29,"uid":0,"version":"v16.20.0"},"stack":"Error: Error verifying password: hash parameter missing\n    at FirebaseScrypt.verify (/app/node_modules/firebase-scrypt/dist/firebaseScrypt.js:139:22)\n    at firebaseVerify (/app/lib/crypto.js:61:23)\n    at Strategy.module.exports [as _verify] (/app/middlewares/strategies/local.js:18:29)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)","trace":[{"column":22,"file":"/app/node_modules/firebase-scrypt/dist/firebaseScrypt.js","function":"FirebaseScrypt.verify","line":139,"method":"verify","native":false},{"column":23,"file":"/app/lib/crypto.js","function":"firebaseVerify","line":61,"method":null,"native":false},{"column":29,"file":"/app/middlewares/strategies/local.js","function":"Strategy.module.exports [as _verify]","line":18,"method":"exports [as _verify]","native":false},{"column":null,"file":null,"function":"runMicrotasks","line":null,"method":null,"native":false},{"column":5,"file":"node:internal/process/task_queues","function":"processTicksAndRejections","line":96,"method":null,"native":false}]}
{"date":"Tue Apr 04 2023 15:38:49 GMT+0000 (Coordinated Universal Time)","error":{"message":"Error verifying password: hash parameter missing","stack":"Error: Error verifying password: hash parameter missing\n    at FirebaseScrypt.verify (/app/node_modules/firebase-scrypt/dist/firebaseScrypt.js:139:22)\n    at firebaseVerify (/app/lib/crypto.js:61:23)\n    at Strategy.module.exports [as _verify] (/app/middlewares/strategies/local.js:18:29)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)"},"exception":true,"level":"error","message":"uncaughtException: Error verifying password: hash parameter missing\nError: Error verifying password: hash parameter missing\n    at FirebaseScrypt.verify (/app/node_modules/firebase-scrypt/dist/firebaseScrypt.js:139:22)\n    at firebaseVerify (/app/lib/crypto.js:61:23)\n    at Strategy.module.exports [as _verify] (/app/middlewares/strategies/local.js:18:29)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)","os":{"loadavg":[0.01,0.04,0.08],"uptime":29472339.93},"process":{"argv":["/usr/local/bin/node","/app/index.js"],"cwd":"/app","execPath":"/usr/local/bin/node","gid":0,"memoryUsage":{"arrayBuffers":452432,"external":1654237,"heapTotal":59838464,"heapUsed":54004656,"rss":147861504},"pid":29,"uid":0,"version":"v16.20.0"},"stack":"Error: Error verifying password: hash parameter missing\n    at FirebaseScrypt.verify (/app/node_modules/firebase-scrypt/dist/firebaseScrypt.js:139:22)\n    at firebaseVerify (/app/lib/crypto.js:61:23)\n    at Strategy.module.exports [as _verify] (/app/middlewares/strategies/local.js:18:29)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)","trace":[{"column":22,"file":"/app/node_modules/firebase-scrypt/dist/firebaseScrypt.js","function":"FirebaseScrypt.verify","line":139,"method":"verify","native":false},{"column":23,"file":"/app/lib/crypto.js","function":"firebaseVerify","line":61,"method":null,"native":false},{"column":29,"file":"/app/middlewares/strategies/local.js","function":"Strategy.module.exports [as _verify]","line":18,"method":"exports [as _verify]","native":false},{"column":null,"file":null,"function":"runMicrotasks","line":null,"method":null,"native":false},{"column":5,"file":"node:internal/process/task_queues","function":"processTicksAndRejections","line":96,"method":null,"native":false}]}
antoinedc commented 1 year ago

Do you have the FIREBASE_SIGNER_KEY, FIREBASE_SALT_SEPARATOR, etc env variables set up?

DegenComedian commented 1 year ago

yes, i left it out. Now it works!

antoinedc commented 1 year ago

Cool, you might not be able to login in the account you created though, because the hashed passwords db fields are probably empty. if that's the case you might want to delete the account and recreate it

DegenComedian commented 1 year ago

yes, you are correct. So I reset the complete docker-compose application plus volumes, afterwards it worked fine!