Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with Ganache 7.0 #694

Closed
cgewecke opened this issue Feb 15, 2022 · 20 comments
Closed

Doesn't work with Ganache 7.0 #694

cgewecke opened this issue Feb 15, 2022 · 20 comments

Comments

@cgewecke
Copy link
Member

Some ganache internals have been made private... plugin crashes with:

> UnhandledRejections detected
Promise {
  <rejected> TypeError: Cannot read private member from an object whose class did not declare it
      at __classPrivateFieldGet (/home/circleci/project/metacoin/node_modules/ganache/dist/node/webpack:/Ganache/core/lib/src/server.js:10:94)
      at close (/home/circleci/project/metacoin/node_modules/ganache/dist/node/webpack:/Ganache/core/lib/src/server.js:221:13)
      at /home/circleci/project/metacoin/node_modules/solidity-coverage/node_modules/pify/index.js:32:6
@cgewecke
Copy link
Member Author

Would need to begin using the new provider event api:

https://github.com/trufflesuite/ganache/tree/develop/src/packages/ganache#ganache-provider-events

@davidmurdoch
Copy link

Let me know if you want help updating to the new event system.

@sra122
Copy link

sra122 commented Apr 13, 2022

@davidmurdoch @cgewecke How did this issue of "Cannot read private member from an object whose class did not declare it" is resolved. Could you please help me in that. I'm exactly on the same issue.

@leiiiooo
Copy link

same, sad.

"ganache": "^7.0.5"
> solidity-coverage cleaning up, shutting down ganache server
UnhandledRejections detected
Promise {
  <rejected> TypeError: Cannot read private member from an object whose class did not declare it
      at __classPrivateFieldGet (/Users/user/Desktop/contract-demo0330-test/node_modules/truffle/node_modules/ganache/dist/node/webpack:/Ganache/core/lib/src/server.js:10:94)
      at close (/Users/user/Desktop/contract-demo0330-test/node_modules/truffle/node_modules/ganache/dist/node/webpack:/Ganache/core/lib/src/server.js:234:13)
      at /Users/user/Desktop/contract-demo0330-test/node_modules/solidity-coverage/node_modules/pify/index.js:32:6
      at new Promise (<anonymous>)
      at /Users/user/Desktop/contract-demo0330-test/node_modules/solidity-coverage/node_modules/pify/index.js:6:9
      at ret (/Users/user/Desktop/contract-demo0330-test/node_modules/solidity-coverage/node_modules/pify/index.js:56:76)
      at API.finish (/Users/user/Desktop/contract-demo0330-test/node_modules/solidity-coverage/lib/api.js:226:36)
      at Object.finish (/Users/user/Desktop/contract-demo0330-test/node_modules/solidity-coverage/plugins/resources/plugin.utils.js:299:22)
      at plugin (/Users/user/Desktop/contract-demo0330-test/node_modules/solidity-coverage/plugins/truffle.plugin.js:121:15)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
} TypeError: Cannot read private member from an object whose class did not declare it
    at __classPrivateFieldGet (/Users/user/Desktop/contract-demo0330-test/node_modules/truffle/node_modules/ganache/dist/node/webpack:/Ganache/core/lib/src/server.js:10:94)
    at close (/Users/user/Desktop/contract-demo0330-test/node_modules/truffle/node_modules/ganache/dist/node/webpack:/Ganache/core/lib/src/server.js:234:13)
    at /Users/user/Desktop/contract-demo0330-test/node_modules/solidity-coverage/node_modules/pify/index.js:32:6
    at new Promise (<anonymous>)
    at /Users/user/Desktop/contract-demo0330-test/node_modules/solidity-coverage/node_modules/pify/index.js:6:9
    at ret (/Users/user/Desktop/contract-demo0330-test/node_modules/solidity-coverage/node_modules/pify/index.js:56:76)
    at API.finish (/Users/user/Desktop/contract-demo0330-test/node_modules/solidity-coverage/lib/api.js:226:36)
    at Object.finish (/Users/user/Desktop/contract-demo0330-test/node_modules/solidity-coverage/plugins/resources/plugin.utils.js:299:22)
    at plugin (/Users/user/Desktop/contract-demo0330-test/node_modules/solidity-coverage/plugins/truffle.plugin.js:121:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

@RahulChoudhary888
Copy link

solidity

you get solution or not??

@arithmetric
Copy link

Have you tried the beta version described here?

I was encountering the error TypeError: Cannot read private member from an object whose class did not declare it and it was fixed by upgrading to solidity-coverage version 0.8.0-beta.1.

@davidmurdoch
Copy link

@cgewecke Just checking in on this again. Do you need an help from the Truffle team?

@cgewecke
Copy link
Member Author

cgewecke commented Jun 1, 2022

@davidmurdoch Apologies, i'll have time to take a look this week.

@johnnyshankman
Copy link

johnnyshankman commented Jun 15, 2022

Have you tried the beta version #700 (comment)?

I was encountering the error TypeError: Cannot read private member from an object whose class did not declare it and > it was fixed by upgrading to solidity-coverage version 0.8.0-beta.1.

This just results in it using a backup legacy version of ganache-cli which is deprecated.

⚠️  There was a problem attaching to the ganache VM.
⚠️  For help, see the "client" & "providerOptions" syntax in solidity-coverage docs.
⚠️  Using ganache-cli (v2.13.2) instead.

@arithmetric

I have this issue currently as well. My two options are pin ganache to an older version or as the above states, use the beta which fallsback to deprecated ganache-cli 2.13.2.

@mfigurski80
Copy link

Hey all! It seems like version 0.8.0-beta.1 doesn't support truffle, but there's a 0.8.x-truffle branch present in the repo -- is there any chance that is published and I can install that to fix?

Alternatively, how do I go about downgrading ganache? Which version has been working?

mfigurski80 added a commit to mfigurski80/karmaToken that referenced this issue Jul 18, 2022
@davidmurdoch
Copy link

@cgewecke, anything I can do to help?

@johnnyshankman
Copy link

Ran into this today using ganache at ^7.0.0

@magiconch
Copy link

magiconch commented Aug 11, 2022

Same bug, I use ganache ^7.3.2 and "solidity-coverage": "^0.7.21".

@davidmurdoch
Copy link

@cgewecke, we'd love to help here! Can you point us in the right direction to get the work done?

@monperrus
Copy link

FTR, tried today with Ganache 7.4.3, same issue.

@davidmurdoch
Copy link

@cgewecke, we'd still love to help here! Can you point us in the right direction to get the work done?

@v-pcode
Copy link

v-pcode commented Mar 6, 2023

Have you tried the beta version #700 (comment)?
I was encountering the error TypeError: Cannot read private member from an object whose class did not declare it and > it was fixed by upgrading to solidity-coverage version 0.8.0-beta.1.

This just results in it using a backup legacy version of ganache-cli which is deprecated.

⚠️  There was a problem attaching to the ganache VM.
⚠️  For help, see the "client" & "providerOptions" syntax in solidity-coverage docs.
⚠️  Using ganache-cli (v2.13.2) instead.

@arithmetric

I have this issue currently as well. My two options are pin ganache to an older version or as the above states, use the beta which fallsback to deprecated ganache-cli 2.13.2.

Did it work with any option?

@cgewecke
Copy link
Member Author

RIP ganache.

@davidmurdoch
Copy link

Sad day.

@monperrus
Copy link

monperrus commented Jan 29, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests