Skip to content

Instantly share code, notes, and snippets.

@dantrevino
Last active June 6, 2019 08:07
Show Gist options
  • Save dantrevino/b0cc9124de892ede436113d817c89c8d to your computer and use it in GitHub Desktop.
Save dantrevino/b0cc9124de892ede436113d817c89c8d to your computer and use it in GitHub Desktop.
blockstack chrome ext
== chrome ext code ==
document.getElementById('sign-in').addEventListener('click', function() {
var scopes = ['storage']
console.log(chrome.runtime.getURL('popup.html'))
console.log(chrome.runtime.getURL('manifest.json'))
blockstack.redirectToSignIn(chrome.runtime.getURL('popup.html'), chrome.runtime.getURL('manifest.json'), scopes)
})
== chrome ext console ==
chrome-extension://oeefncdoafcekbikbcfnicnlhkcolneh/popup.html
options.js:5 chrome-extension://oeefncdoafcekbikbcfnicnlhkcolneh/manifest.json
blockstack.js:344 blockstack.js: generating v1.1.0 auth request
blockstack.js:31088 openUriWithTimeoutHack
blockstack.js:96 protocol handler detected
== blockstack browser console error ==
2018-02-05T11:00:02.658-0800 TRACE index.js: NODE_ENV is not production
main.js:195601 2018-02-05T11:00:02.659-0800 DEBUG index.js: Enabling React devtools
main.js:195601 2018-02-05T11:00:02.675-0800 DEBUG App.js: EXISTING_VERSION: 12; CURRENT_VERSION: 12
main.js:195601 2018-02-05T11:00:02.676-0800 TRACE App.js: componentWillMount
main.js:195601 2018-02-05T11:00:02.783-0800 TRACE App.js: performSanityChecks
main.js:195601 2018-02-05T11:00:02.783-0800 DEBUG store/sanity/actions.js: isCoreRunning: http://localhost:6270/v1/node/ping
main.js:195601 2018-02-05T11:00:02.784-0800 DEBUG utils/api-utils.js: isCoreApiRunning: http://localhost:6270/v1/node/ping
main.js:195601 2018-02-05T11:00:02.786-0800 DEBUG store/sanity/actions.js: isCoreApiPasswordValid: http://localhost:6270/v1/wallet/payment_address
main.js:195601 2018-02-05T11:00:02.787-0800 DEBUG utils/api-utils.js: isApiPasswordValid: http://localhost:6270/v1/wallet/payment_address
main.js:195601 2018-02-05T11:00:02.791-0800 DEBUG App.js: Sanity check: Core API endpoint is running!
main.js:195601 2018-02-05T11:00:02.792-0800 DEBUG App.js: Sanity check: Core API password is valid!
main.js:195601 2018-02-05T11:00:03.069-0800 TRACE utils/api-utils.js: isCoreApiRunning? Yes!
chrome-extension://invalid/ Failed to load resource: net::ERR_FAILED
main.js:47168 TypeError: Failed to fetch
:8888/auth?authRequest=eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJqdGkiOiJjNjRiNTE4Yy1hODU4LTQ2MmQtOGIxOS0zNjg4ZTc2MjVlODciLCJpYXQiOjE1MTc4NTcyMDAsImV4cCI6MTUxNzg2MDgwMCwiaXNzIjoiZGlkOmJ0Yy1hZGRyOjFQY2lRVUdhUjZmbUttUGlEZWdpbmF1QmZQdkpuZmV6UmkiLCJwdWJsaWNfa2V5cyI6WyIwM2ZlNDM2MjZiNjBmZjZhY2I3NTI2NGFiZGFlMDRhMDhhOWZiNjNiZGNkOGYxYWI0NWQyYThiZjM3M2U1OGFjMjIiXSwiZG9tYWluX25hbWUiOiJjaHJvbWUtZXh0ZW5zaW9uOi8vb2VlZm5jZG9hZmNla2Jpa2JjZm5pY25saGtjb2xuZWgiLCJtYW5pZmVzdF91cmkiOiJjaHJvbWUtZXh0ZW5zaW9uOi8vb2VlZm5jZG9hZmNla2Jpa2JjZm5pY25saGtjb2xuZWgvbWFuaWZlc3QuanNvbiIsInJlZGlyZWN0X3VyaSI6ImNocm9tZS1leHRlbnNpb246Ly9vZWVmbmNkb2FmY2VrYmlrYmNmbmljbmxoa2NvbG5laC9wb3B1cC5odG1sIiwidmVyc2lvbiI6IjEuMS4wIiwiZG9fbm90X2luY2x1ZGVfcHJvZmlsZSI6dHJ1ZSwic3VwcG9ydHNfaHViX3VybCI6dHJ1ZSwic2NvcGVzIjpbInN0b3JhZ2UiXX0.1XD_s3HPKgMOTefRpC9k3UjBrHIP-s5kFRYlZuLl9mL3kC2EeLEOtpYKzZppqzOktxnCBOFpO_CVKo4ICQdXSw#coreAPIPassword=off&logServerPort=off:1 Uncaught (in promise) URI request couldn't be completed
main.js:195601 2018-02-05T11:00:03.197-0800 TRACE utils/api-utils.js: isCoreApiPasswordValid? Yes!
main.js:195601 2018-02-05T11:00:03.197-0800 DEBUG store/sanity/actions.js: isCoreApiPasswordValid? Yes!
main.js:195601 2018-02-05T11:00:03.477-0800 DEBUG App.js: Sanity check: Core API endpoint is running!
main.js:195601 2018-02-05T11:00:03.478-0800 DEBUG App.js: Sanity check: Core API password is valid!
@dantrevino
Copy link
Author

screen shot 2018-02-05 at 10 50 45 am

@marsrobertson
Copy link

@dantrevino - did it ever worked? I'm having some trouble now: hirosystems/stacks.js#518 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment