mascara icon indicating copy to clipboard operation
mascara copied to clipboard

Difficulty running the example

Open monokh opened this issue 8 years ago • 8 comments
trafficstars

I’ve been trying to get this running and facing some difficulties. The first was that the default host path was zero.metamask.io so i raised this PR #8

After using the override function, I wasn't able to get the mascara UI appearing. When the injector runs, it fails to start the service worker - possibly due to background.js being quite large? The UI popup happens however it also fails as the service worker wasn't running. I created this codepen to demonstrate: https://codepen.io/anon/pen/ZaWNoy

It would be really good if we could have a live demo to try out

monokh avatar Nov 05 '17 10:11 monokh

Realised i hadn't saved overriding of the host... The correct codepen is: https://codepen.io/anon/pen/gXMrXy

Errors are:

The request to fetch the script was interrupted.
wallet.metamask.io/background.js Failed to load resource: net::ERR_FAILED
proxy.js:66 Uncaught (in promise) DOMException: Failed to register a ServiceWorker: The request to fetch the script was interrupted.

I'm on a mac with chrome 61

monokh avatar Nov 05 '17 22:11 monokh

@monokh the popup needs a user action in order to appear. So if you add a button the pop up will be their. Still trying to figure out a work around for this.

frankiebee avatar Nov 06 '17 14:11 frankiebee

@frankiebee by user interaction, do you mean some sort of RPC call? In the codepen, to simulate user interaction, I have put a sendTransaction that triggers mascara popup fine. The issue seems to be onload when mascara calls the proxy and creates a service worker, it fails

monokh avatar Nov 06 '17 15:11 monokh

Same error loading background.js as @monokh's. Any news or workarounds on this one?

Pipeliner avatar Nov 22 '17 21:11 Pipeliner

I got some an example with a little more use feedback implemented. It is basically an dapp launcher using mascara.

Maybe I don't really understand how it is supposed to work, but the most confusing for me is that maybeTriggerPopup() is bound to the window object.

Shouldn't I be able to create my own way how the user triggers a transaction?

I would be happy for some review feedback. Consider this incomplete and a evaluation of how to have a common way to integrate Mascara and and TX signers.

digitaldonkey avatar Mar 28 '18 18:03 digitaldonkey

I face the same problem. Any resolution or way to navigate this issue?

pranay01 avatar May 01 '18 06:05 pranay01

@Densi1 I was looking a way for a way to make Metamask Mascara work. The process which you mentioned will install metamask extension right?

pranay01 avatar May 18 '18 13:05 pranay01