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

TypeError: Cannot read properties of undefined (reading 'unshift') #686

Closed
prcolaco opened this issue Nov 2, 2023 · 6 comments · Fixed by #693
Closed

TypeError: Cannot read properties of undefined (reading 'unshift') #686

prcolaco opened this issue Nov 2, 2023 · 6 comments · Fixed by #693

Comments

@prcolaco
Copy link

prcolaco commented Nov 2, 2023

I am recording a video series about Ethernaut CTF solutions and found it was not working online on Sepolia.

image

Using Chrome version 119.0.6045.105 (Official Build) (arm64)and MetaMask version 11.4.0 from Chrome Web Store

Cloned the repo locally and followed the instructions to run it on a local chain, but still the same error.

Will send a PR with my bandaid solution.

Here is a video about my quick-fix to make it work in the meantime: https://www.youtube.com/watch?v=VS8r6dNC22Y

Cheers, PRC

prcolaco added a commit to decentrawise/ethernaut that referenced this issue Nov 2, 2023
@juanschallibaum
Copy link

juanschallibaum commented Nov 3, 2023

Hello! Thank you very much for opening this Github issue and sharing that video. I've been experiencing the same issue since my Metamask extension was updated to version 11.4.0 in Chrome. Thanks to the solution you suggested, I can play again. However, the downside of this solution is that it disables the part of the code that is supposed to intercept transactions and log them to the console when they are sent and when they are mined. Let's hope the platform's developers address the issue and find a solution to make the platform work correctly without losing this functionality.

Edit: A temporary alternative solution for players is to play using Firefox, as the latest version of Metamask for Firefox is 11.2.0, and this version still retains the '_middleware' property.

Cheers, Juan

@crackcodesprogramloads
Copy link

crackcodesprogramloads commented Nov 4, 2023

I have the same issue, and I also saw this suggestion in the console, but I couldn't find any such privacy switch in my Metamask.

"<|º감º|> Ethernaut contract not found in the current network. Please make sure (1) that you are using metamask, (2) that it's on a supported network, (3) that it is unlocked, (4 optional) From November 2 you can turn ON privacy mode (OFF by default) in Metamask settings if you don't want to expose your info by default. (5 optional) If privacy mode is turn ON you have to authorized metamask to use this page. and (6) then refresh."

@GianfrancoBazzani
Copy link
Member

GianfrancoBazzani commented Nov 6, 2023

Thank you for bringing this to our attention. Our development team is actively addressing the issue and will smash the bug soon. Thanks also @prcolaco for illustrating the solution in the video.

@sarobinson2011
Copy link

I get the same - originally posted this on the openzeppelin forums, earlier today:

"I've been working my way through the Ethernaut levels in recent weeks, currently on Puzzle Wallet, but having had it work fine yesterday, I now get the following error (in the developer console) when trying to create a new level instance:

"Ethernaut contract not found in the current network. Please make sure (1) that you are using metamask, (2) that it's on a supported network, (3) that it is unlocked, (4 optional) From November 2 you can turn ON privacy mode (OFF by default) in Metamask settings if you don't want to expose your info by default. (5 optional) If privacy mode is turn ON you have to authorized metamask to use this page. and (6) then refresh."

I haven't changed any settings in metamask, from beating the previous levels.

I can always create a factory contract and deploy the levels myself, but I kinda like the web interface 😄

Any ideas?

edit: I've also tried using Brave browser and chrome, on both a linux machine, and macOS, all permutations result in the same "red" error message in the dev console..."

@prcolaco
Copy link
Author

prcolaco commented Nov 9, 2023

Just put out another video explaining how to install MetaMask version 11.3.0, instead of the latest one 11.4.1, so that Ethernaut challenges work again: https://www.youtube.com/watch?v=glZqTh4zAnw

@sarobinson2011, @crackcodesprogramloads and all, hope this helps you get up and running with the Ethernaut! 👍

@sarobinson2011
Copy link

Just put out another video explaining how to install MetaMask version 11.3.0, instead of the latest one 11.4.1, so that Ethernaut challenges work again: https://www.youtube.com/watch?v=glZqTh4zAnw

@sarobinson2011, @crackcodesprogramloads and all, hope this helps you get up and running with the Ethernaut! 👍

Thanks for your efforts mate 👍

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

Successfully merging a pull request may close this issue.

5 participants