I am going through the MetaMask simple dapp tutorial.
I was going through the tutorial fine until I reached the MetaMaskOnboarding section which fires if the browser detects that Metamask isn't installed.
const onboarding = new MetaMaskOnboarding({ forwarderOrigin });
As soon as I insert this code everything stops working. I'm pretty sure i have the onboarding dependency installed. I am relatively new to this so I imagine there is a simple mistake, but I have poured over it for days and been unable to get it working.
I commented out this line and continued with the tutorial without issue. Obviously this just means if someone came to the site without MM installed they wouldn't be automatically routed to the installation page.
I face a similar issue, although I am maybe one step ahead. If you look in the GitHub page for the metamask-onboarding library, you will see that the forwarderOrigin argument is optional. By default, Metamask redirects back to origin, so just remove forwarderOrigin and see if that works. It does for me.
Hope that helps, although it still doesn't solve the issue of why trying to input the forwarderOrigin optional argument doesn't work, which for the life of me I can't figure out yet.