Hey guys,
I am having trouble getting setup with local development. I have the emulator running locally (latest version as of 2021-May-16) and I cloned the “Harness” repo to tryout signing in/out locally.
I can run scripts from the Harness page, but signing in does not work. See errors below.
I did update the config in the root.js file to reflect the output of the Dev Wallet start log.
From root.js
fcl.config()
.put("env", "local")
.put("accessNode.api", "http://localhost:8080")
.put("discovery.wallet", " http://localhost:8701/flow/authenticate")
.put("challenge.handshake", " http://localhost:8701/flow/authenticate")
Output when starting local wallet
$ yarn run dev-wallet
yarn run v1.22.4
$ FLOW_ACCOUNT_ADDRESS=0xf8d6e0586b0a20c7 PK=f8e188e8af0b8b414be59c4a1a15cc666c898fb34d94156e9b51e18bfde754a5 fcl-wallet
@onflow/[email protected]
*** *** *** *** *** *** ***
🎉 FCL Dev Wallet has started:
* Origin: http://localhost:8701
* FCL Authn: http://localhost:8701/flow/authenticate
* GraphiQL: http://localhost:8701/graphql
* Access Node: http://localhost:8080
* Service Address: 01
* Private Key: f8e188e8af0b8b414be59c4a1a15cc666c898fb34d94156e9b51e18bfde754a5
Include this code in development to configure fcl:
import * as fcl from "@onflow/fcl"
fcl.config()
.put("challenge.handshake", "http://localhost:8701/flow/authenticate")
*** *** *** *** *** *** ***
GQL -- query/config
GQL -- mutation/authenticate { email: '[email protected]', pass: 'abc123' }
GQL -- query/config
GQL -- mutation/authenticate { email: '[email protected]', pass: 'abc123' }
Repo: https://github.com/orodio/harness
Error
* could not find account with address 0000000000000001
In the browser console (Chrome, on MacOSX) I get the following error
Uncaught (in promise) TypeError: Cannot read property 'sessionId' of null
at Object.authenticate [as click] (flow-authenticate.js:44)