Agoric / dapp-fungible-faucet

A simple dapp that mints and sends fungible tokens to a user's wallet
3 stars 8 forks source link

Unable to connect dapp to wallet #51

Closed 0xpatrickdev closed 1 year ago

0xpatrickdev commented 2 years ago

Describe the bug

I am initializing the default demo project with agoric init demo. When trying to connect the dapp to the agoric wallet, it seems the dapp does not connect to the API server and I am not prompted to enable the dapp. I also see some error messages in the web console for the dapp (see screenshot), and a target has no method "getIssuerSuggestionsNotifier" error in the solo client console.

To Reproduce

Steps to reproduce the behavior:

  1. Clone, install, build, and link agoric-sdk
  2. agoric init demo && cd demo && agoric install
  3. agoric start --reset -v start solo client ✅
  4. agoric deploy contract/deploy.js api/deploy.js deploy contract and api in second terminal ✅
  5. agoric open --repl open wallet interface and connect solo wallet ✅
  6. cd ui && yarn start to run dapp ✅
  7. attempt to connect dapp to wallet, observe errors in dapp console ❌

Expected behavior

Dapp should be able to connect to the Agoric Wallet

Platform Environment

Both environments are working successfully up until connecting the dapp

Solo Client Logs

2022-08-24T00:03:20.134Z SwingSet: ls: v10: TypeError#2 ERROR_NOTE: Sent as error:liveSlots:v10#70002
2022-08-24T00:03:20.142Z SwingSet: vat: v6: Temporary logging of sent error (RemoteTypeError(error:liveSlots:v10#70002)#2)
2022-08-24T00:03:20.142Z SwingSet: vat: v6: RemoteTypeError(error:liveSlots:v10#70002)#2: target has no method "getIssuerSuggestionsNotifier", has ["acceptOffer","addContact","addInstallation","addInstance","addIssuer","addOffer","addPayment","cancelOffer","declineOffer","deposit","disableAutoDeposit","enableAutoDeposit","getAccountState","getAgoricNames","getAttMaker","getAttenuatedPursesNotifier","getBoard","getBrand","getBrandPetnames","getCacheCoordinator","getContactsNotifier","getDappCacheCoordinator","getDappsNotifier","getDepositFacetId","getInboxNotifier","getInstallation","getInstallationManager","getInstallations","getInstance","getInstanceManager","getIssuer","getIssuerManager","getIssuers","getIssuersNotifier","getMarshaller","getNamesByAddress","getOfferResult","getOffers","getOffersNotifier","getPaymentsNotifier","getPublicNotifiers","getPublicSubscribers","getPurse","getPurseIssuer","getPurses","getPursesNotifier","getScopedBridge","getSeat","getSeats","getSelfContact","getUINotifier","getZoe","lookup","makeAttestationAmount","makeEmptyPurse","performAction","publishIssuer","renameInstallation","renameInstance","renameIssuer","resolveAttMaker","saveOfferResult","suggestInstallation","suggestInstance","suggestIssuer","waitForDappApproval"]
2022-08-24T00:03:20.143Z SwingSet: vat: v6: TypeError: target has no method "getIssuerSuggestionsNotifier", has ["acceptOffer","addContact","addInstallation","addInstance","addIssuer","addOffer","addPayment","cancelOffer","declineOffer","deposit","disableAutoDeposit","enableAutoDeposit","getAccountState","getAgoricNames","getAttMaker","getAttenuatedPursesNotifier","getBoard","getBrand","getBrandPetnames","getCacheCoordinator","getContactsNotifier","getDappCacheCoordinator","getDappsNotifier","getDepositFacetId","getInboxNotifier","getInstallation","getInstallationManager","getInstallations","getInstance","getInstanceManager","getIssuer","getIssuerManager","getIssuers","getIssuersNotifier","getMarshaller","getNamesByAddress","getOfferResult","getOffers","getOffersNotifier","getPaymentsNotifier","getPublicNotifiers","getPublicSubscribers","getPurse","getPurseIssuer","getPurses","getPursesNotifier","getScopedBridge","getSeat","getSeats","getSelfContact","getUINotifier","getZoe","lookup","makeAttestationAmount","makeEmptyPurse","performAction","publishIssuer","renameInstallation","renameInstance","renameIssuer","resolveAttMaker","saveOfferResult","suggestInstallation","suggestInstance","suggestIssuer","waitForDappApproval"]
 at makeError (/Users/.../agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:2717)
 at fullRevive (/Users/.../agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:6217)

Screenshots

Screen Shot 2022-08-23 at 7 27 56 PM Screen Shot 2022-08-23 at 7 03 06 PM Screen Shot 2022-08-23 at 7 51 31 PM
tgrecojs commented 2 years ago

thank you for the detailed error message!

I can confirm that I run into the same error on my machine.

# running
git describe --tags --always
# prints
7d1aef0

OS: MacOS Monterey 12.4 Browser: Brave Browser, Version 1.42.97 Chromium: 104.0.5112.102 (Official Build) (arm64)

0xpatrickdev commented 2 years ago

I am able to get rid of the front end error by bumping ses to 0.15.18, but still no luck on the getting the dapp to connect to the wallet.

Screen Shot 2022-08-23 at 8 41 30 PM
2022-08-24T00:39:55.193Z web: GET /wallet-bridge.html?suggestedDappPetname=FungibleFaucet 304 - - 0.817 ms
2022-08-24T00:39:55.834Z web: 127.0.0.1:50193[102]: new WebSocket /private/wallet-bridge?suggestedDappPetname=FungibleFaucet
2022-08-24T00:40:02.858Z web: 127.0.0.1:50193[102]: client closed
2022-08-24T00:40:03.256Z web: GET /wallet-bridge.html?suggestedDappPetname=FungibleFaucet 304 - - 1.387 ms
2022-08-24T00:40:03.796Z web: 127.0.0.1:50225[103]: new WebSocket /private/wallet-bridge?suggestedDappPetname=FungibleFaucet
2022-08-24T00:40:10.868Z web: 127.0.0.1:50225[103]: client closed
2022-08-24T00:40:11.307Z web: GET /wallet-bridge.html?suggestedDappPetname=FungibleFaucet 304 - - 0.646 ms
2022-08-24T00:40:11.856Z web: 127.0.0.1:50280[104]: new WebSocket /private/wallet-bridge?suggestedDappPetname=FungibleFaucet
2022-08-24T00:40:18.871Z web: 127.0.0.1:50280[104]: client closed

Combinations of the /wallet-bridge path and/or the suggestedDappPetname query param do not seem to resolve in either app.

tgrecojs commented 2 years ago

debug mode doesn't seem to be staying on either.... 👀