leather-io / extension

Leather browser extension
https://leather.io
MIT License
293 stars 140 forks source link

Minting on Gamma.io and Sending pre-order for BNS name on btc.us fails with Ledger and Brave #2820

Closed 314159265359879 closed 1 year ago

314159265359879 commented 1 year ago

The user goes through these steps:

  1. Connect wallet extension with ledger
  2. Login to btc.us with ledger
  3. Picks a name
  4. goes through step, 1, 2 at 3 there is a loading screen but it doesn't get through to ledger.

Here is a copy of the console:

main.js:1 A preload for 'https://btc.us/client/d60363202e64454d3085/index.3.js' is found, but is not used because the request mode does not match. Consider taking a look at crossorigin attribute.
i.e @ main.js:1
inject.js:381 [yoroi/prod] dapp-connector is successfully injected into js.stripe.com
inject.js:381 [yoroi/prod] dapp-connector is successfully injected into m.stripe.network
main.js:10 [DEBUG] connectToGaiaHub: https://hub.blockstack.org/hub_info
gaia.blockstack.org/hub/1EZeo1YCQrgzhMhiwz7KUK5jVzbByRUpt2/btc_domain_SP11NVNM575QF4JM0XKCHGK21FX0DV6XKGC8927CB.json:1          Failed to load resource: the server responded with a status of 404 ()
gaia.blockstack.org/hub/1EZeo1YCQrgzhMhiwz7KUK5jVzbByRUpt2/btc_domain_SP11NVNM575QF4JM0XKCHGK21FX0DV6XKGC8927CB.json:1          Failed to load resource: the server responded with a status of 404 ()
pay.btc.us/v1/coinbase-refund-eligible:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
pay.btc.us/v1/coinbase-refund-eligible:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
38The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
main.js:45 [Connect] Error during auth request cancel
(anonymous) @ main.js:45
pay.btc.us/v1/domain-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at U (main.js:10:10017)
U @ main.js:10
pay.btc.us/v1/domain-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at U (main.js:10:10017)
U @ main.js:10
pay.btc.us/v1/domain-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at U (main.js:10:10017)
U @ main.js:10
pay.btc.us/v1/domain-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at U (main.js:10:10017)
U @ main.js:10
pay.btc.us/v1/domain-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at U (main.js:10:10017)
U @ main.js:10
pay.btc.us/v1/payment-option-info:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 [DEBUG] connectToGaiaHub: https://hub.blockstack.org/hub_info
pay.btc.us/v1/check-payment-pending-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
pay.btc.us/v1/coinbase-refund-eligible:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
pay.btc.us/v1/coinbase-refund-eligible:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
pay.btc.us/v1/domain-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at M (main.js:10:76745)
    at l (main.js:10:287998)
    at get_$domain_name.2.js:1:52820
M @ main.js:10
main.js:10 [DEBUG] connectToGaiaHub: https://hub.blockstack.org/hub_info
pay.btc.us/v1/domain-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at U (main.js:10:10017)
    at async get_$domain_name.2.js:1:52867
U @ main.js:10
pay.btc.us/v1/domain-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at U (main.js:10:10017)
U @ main.js:10
pay.btc.us/v1/domain-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at U (main.js:10:10017)
U @ main.js:10
main.js:10 [DEBUG] connectToGaiaHub: https://hub.blockstack.org/hub_info
pay.btc.us/v1/payment-option-info:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
pay.btc.us/v1/check-payment-pending-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
pay.btc.us/v1/domain-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at M (main.js:10:76745)
    at l (main.js:10:287998)
    at get_$domain_name.2.js:1:52820
M @ main.js:10
main.js:10 [DEBUG] connectToGaiaHub: https://hub.blockstack.org/hub_info
pay.btc.us/v1/domain-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at U (main.js:10:10017)
    at async get_$domain_name.2.js:1:52867
U @ main.js:10
main.js:10 [DEBUG] connectToGaiaHub: https://hub.blockstack.org/hub_info
pay.btc.us/v1/check-payment-pending-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 [DEBUG] connectToGaiaHub: https://hub.blockstack.org/hub_info
pay.btc.us/v1/check-payment-pending-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
2main.js:10 [DEBUG] connectToGaiaHub: https://hub.blockstack.org/hub_info
pay.btc.us/v1/check-payment-pending-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
pay.btc.us/v1/check-payment-pending-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
pay.btc.us/v1/domain-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at U (main.js:10:10017)
    at async Object.g [as stx] (main.js:10:290260)
U @ main.js:10
2main.js:10 [DEBUG] connectToGaiaHub: https://hub.blockstack.org/hub_info
3main.js:8 Uncaught (in promise) TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
    at main.js:8:1610
    at h (main.js:8:1710)
    at u.from (main.js:8:6548)
    at f (main.js:10:94576)
    at D (main.js:43:10373)
    at main.js:43:11431
    at h (main.js:43:3586)
    at Generator._invoke (main.js:43:3339)
    at Generator.next (main.js:43:3945)
    at v (main.js:43:2009)
pay.btc.us/v1/domain-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at U (main.js:10:10017)
    at async Object.g [as stx] (main.js:10:290260)
U @ main.js:10
2main.js:10 [DEBUG] connectToGaiaHub: https://hub.blockstack.org/hub_info
3main.js:8 Uncaught (in promise) TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
    at main.js:8:1610
    at h (main.js:8:1710)
    at u.from (main.js:8:6548)
    at f (main.js:10:94576)
    at D (main.js:43:10373)
    at main.js:43:11431
    at h (main.js:43:3586)
    at Generator._invoke (main.js:43:3339)
    at Generator.next (main.js:43:3945)
    at v (main.js:43:2009)
DevTools failed to load source map: Could not load content for chrome-extension://sdfasdfasdfasdfasdfasdf/browser-polyfill.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://sdfasdfasdfasdfasdfasdf/content-script.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://sdfasdfasdfasdfasdfasdf/inpage.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://sdfasdfasdfasdfasdfasdf/browser-polyfill.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://sdfasdfasdfasdfasdfasdf/content-script.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://sdfasdfasdfasdfasdfasdf/inpage.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://sdfasdfasdfasdfasdfasdf/browser-polyfill.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://sdfasdfasdfasdfasdfasdf/content-script.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://sdfasdfasdfasdfasdfasdf/inpage.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
314159265359879 commented 1 year ago

This was tested on the latest release 3.23 Latest Brave version with all blockers turned off.

314159265359879 commented 1 year ago

@bilalanees98 would you mind having a look here too. I am not sure if this is wallet extension related or it could be the btc.us dapp.

bilalanees98 commented 1 year ago

@314159265359879 Sure I'll take a look.

314159265359879 commented 1 year ago

It looks like this is a more general problem tigs just reported that she is having the same issue when trying to mint an NFT on gamma.io

image

@kyranjamie

markmhendrickson commented 1 year ago

@kyranjamie is your sense this issue originates with the wallet or Stacks app for Ledger?

314159265359879 commented 1 year ago

@kyranjamie is your sense this issue originates with the wallet or Stacks app for Ledger?

It looks like it is more general then just btc.us, another user reported the same issue minting an NFT on gamma.io I have changed the title to reflect this.

314159265359879 commented 1 year ago

One more report from Jason: This time for 2 apps that support stacking. image

kyranjamie commented 1 year ago

Investigated this, and am able to replicate.

There is some onus on the apps themselves to make sure Ledger works. In this instance, it looks like btc.us needs to upgrade their packages, or make sure they're not dependent on properties inaccessible on a Ledger.

The best thing to do here is to reach out to btc.us and offer assistance in getting them working with Ledger. We're happy to help. But as there's nothing we can do wallet side to fix this, I'll close the issue.

markmhendrickson commented 1 year ago

Do we have more specific guidance we can give BTC.us and Gamma here (e.g. which packages to which versions, which properties are not accessible)?

cc @bilalanees98 @Jamil

kyranjamie commented 1 year ago

It's difficult to give more specific guidance without knowing exactly what the problem is, which could be specific to each app—I don't know how they're built.

For package versions, I'd recommend the latest.

Developers can reach out on the #wallet channel on Discord, or to me directly if they need any assistance diagnosing the problem kyranjamie#4323

frankchen07 commented 1 year ago

I have a similar experience. I'm using Chrome and Ledger Nano S on btc.us. The Hiro extension app is the latest 3.23. The console errors below occur on step two when I hit "continue", and the third step shows a loading signal, then nothing. No pop up, no additional CTAs. Not sure how to get the error logs formatted better, but let me know if it's completely useless and I can post a screenshot instead.

main.js:1 A preload for 'https://btc.us/client/d60363202e64454d3085/index.3.js' is found, but is not used because the request mode does not match. Consider taking a look at crossorigin attribute.
i.e @ main.js:1
m.stripe.com/6:1          Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
pay.btc.us/v1/domain-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at U (main.js:10:10017)
U @ main.js:10
pay.btc.us/v1/domain-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at U (main.js:10:10017)
U @ main.js:10
pay.btc.us/v1/payment-option-info:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 [DEBUG] connectToGaiaHub: https://hub.blockstack.org/hub_info
pay.btc.us/v1/check-payment-pending-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
pay.btc.us/v1/domain-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at M (main.js:10:76745)
    at l (main.js:10:287998)
    at get_$domain_name.2.js:1:52820
M @ main.js:10
main.js:10 [DEBUG] connectToGaiaHub: https://hub.blockstack.org/hub_info
pay.btc.us/v1/domain-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at U (main.js:10:10017)
    at async get_$domain_name.2.js:1:52867
U @ main.js:10
main.js:10 [DEBUG] connectToGaiaHub: https://hub.blockstack.org/hub_info
pay.btc.us/v1/check-payment-pending-status:1          Failed to load resource: net::ERR_EMPTY_RESPONSE
DevTools failed to load source map: Could not load content for chrome-extension://efabpnahpkdbpejgekahfnecclbepmee/contentscript.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://efabpnahpkdbpejgekahfnecclbepmee/vessel.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/browser-polyfill.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/content-script.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/inpage.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://efabpnahpkdbpejgekahfnecclbepmee/contentscript.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://efabpnahpkdbpejgekahfnecclbepmee/vessel.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/browser-polyfill.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/content-script.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/inpage.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://efabpnahpkdbpejgekahfnecclbepmee/contentscript.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://efabpnahpkdbpejgekahfnecclbepmee/vessel.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/browser-polyfill.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/content-script.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
DevTools failed to load source map: Could not load content for chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/inpage.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
main.js:10 [DEBUG] connectToGaiaHub: https://hub.blockstack.org/hub_info
main.js:10          POST https://pay.btc.us/v1/check-payment-pending-status net::ERR_EMPTY_RESPONSE
y @ main.js:10
O @ main.js:10
d @ main.js:10
B @ get_$domain_name.2.js:1
await in B (async)
Z @ get_$domain_name.2.js:1
(anonymous) @ main.js:1
(anonymous) @ main.js:1
(anonymous) @ main.js:25
main.js:10 [DEBUG] connectToGaiaHub: https://hub.blockstack.org/hub_info
main.js:10          POST https://pay.btc.us/v1/domain-status net::ERR_EMPTY_RESPONSE
y @ main.js:10
U @ main.js:10
await in U (async)
g @ main.js:10
F @ get_$domain_name.2.js:1
Z @ get_$domain_name.2.js:1
await in Z (async)
(anonymous) @ main.js:1
(anonymous) @ main.js:1
(anonymous) @ main.js:25
main.js:10 TypeError: Failed to fetch
    at y (main.js:10:75897)
    at U (main.js:10:10017)
    at async Object.g [as stx] (main.js:10:290260)
U @ main.js:10
await in U (async)
g @ main.js:10
F @ get_$domain_name.2.js:1
Z @ get_$domain_name.2.js:1
await in Z (async)
(anonymous) @ main.js:1
(anonymous) @ main.js:1
(anonymous) @ main.js:25
main.js:10 [DEBUG] connectToGaiaHub: https://hub.blockstack.org/hub_info
main.js:10          POST https://pay.btc.us/v1/check-payment-pending-status net::ERR_EMPTY_RESPONSE
y @ main.js:10
O @ main.js:10
d @ main.js:10
B @ get_$domain_name.2.js:1
await in B (async)
U @ get_$domain_name.2.js:1
await in U (async)
e.$$.update @ get_$domain_name.2.js:1
wt @ main.js:1
yt @ main.js:1
Promise.then (async)
pt @ main.js:1
(anonymous) @ main.js:1
(anonymous) @ main.js:1
F @ get_$domain_name.2.js:1
Z @ get_$domain_name.2.js:1
await in Z (async)
(anonymous) @ main.js:1
(anonymous) @ main.js:1
(anonymous) @ main.js:25
main.js:10 [DEBUG] connectToGaiaHub: https://hub.blockstack.org/hub_info
main.js:8 Uncaught (in promise) TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
    at main.js:8:1610
    at h (main.js:8:1710)
    at u.from (main.js:8:6548)
    at f (main.js:10:94576)
    at D (main.js:43:10373)
    at main.js:43:11431
    at h (main.js:43:3586)
    at Generator._invoke (main.js:43:3339)
    at Generator.next (main.js:43:3945)
    at v (main.js:43:2009)
(anonymous) @ main.js:8
h @ main.js:8
u.from @ main.js:8
f @ main.js:10
D @ main.js:43
(anonymous) @ main.js:43
h @ main.js:43
(anonymous) @ main.js:43
(anonymous) @ main.js:43
v @ main.js:43
a @ main.js:43
await in a (async)
Z @ get_$domain_name.2.js:1
await in Z (async)
(anonymous) @ main.js:1
(anonymous) @ main.js:1
(anonymous) @ main.js:25
main.js:8 Uncaught (in promise) TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
    at main.js:8:1610
    at h (main.js:8:1710)
    at u.from (main.js:8:6548)
    at f (main.js:10:94576)
    at D (main.js:43:10373)
    at main.js:43:11431
    at h (main.js:43:3586)
    at Generator._invoke (main.js:43:3339)
    at Generator.next (main.js:43:3945)
    at v (main.js:43:2009)
(anonymous) @ main.js:8
h @ main.js:8
u.from @ main.js:8
f @ main.js:10
D @ main.js:43
(anonymous) @ main.js:43
h @ main.js:43
(anonymous) @ main.js:43
(anonymous) @ main.js:43
v @ main.js:43
a @ main.js:43
Promise.then (async)
e.$$.update @ get_$domain_name.2.js:1
wt @ main.js:1
yt @ main.js:1
Promise.then (async)
pt @ main.js:1
(anonymous) @ main.js:1
(anonymous) @ main.js:1
F @ get_$domain_name.2.js:1
Z @ get_$domain_name.2.js:1
await in Z (async)
(anonymous) @ main.js:1
(anonymous) @ main.js:1
(anonymous) @ main.js:25
main.js:8 Uncaught (in promise) TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
    at main.js:8:1610
    at h (main.js:8:1710)
    at u.from (main.js:8:6548)
    at f (main.js:10:94576)
    at D (main.js:43:10373)
    at main.js:43:11431
    at h (main.js:43:3586)
    at Generator._invoke (main.js:43:3339)
    at Generator.next (main.js:43:3945)
    at v (main.js:43:2009)
(anonymous) @ main.js:8
h @ main.js:8
u.from @ main.js:8
f @ main.js:10
D @ main.js:43
(anonymous) @ main.js:43
h @ main.js:43
(anonymous) @ main.js:43
(anonymous) @ main.js:43
v @ main.js:43
a @ main.js:43
Promise.then (async)
It @ main.js:1
$ @ get_$domain_name.2.js:1
p @ get_$domain_name.2.js:1
wt @ main.js:1
yt @ main.js:1
Promise.then (async)
pt @ main.js:1
(anonymous) @ main.js:1
(anonymous) @ main.js:1
F @ get_$domain_name.2.js:1
Z @ get_$domain_name.2.js:1
await in Z (async)
(anonymous) @ main.js:1
(anonymous) @ main.js:1
(anonymous) @ main.js:25
bilalanees98 commented 1 year ago

I took a look into this.

Packages versions:

    "@stacks/connect": "^7.0.0",
    "@stacks/storage": "^5.0.3",
    "@stacks/transactions": "^5.0.2",

These are my findings. It seems that when connecting with hiro wallet, without a ledger the userData object in the userSession is as follows:

{ "profile": { "@type": "Person", "@context": "http://schema.org", "apps": { "https://pool.xverse.app": "https://gaia.blockstack.org/hub/1DrPYenDwf2u2JkTVTBcGvmM5gC1R3ujiF/" }, "appsMeta": { "https://pool.xverse.app": { "storage": , "publicKey": } }, "stxAddress": { "testnet": "ST3QJKVMNZJ897FBDJT7YRQR0AJAS77C6N04SVV51", "mainnet": "SP3QJKVMNZJ897FBDJT7YRQR0AJAS77C6N2WKNVGP" } }, "email": null, "decentralizedID": , "identityAddress": , "appPrivateKey": , "coreSessionToken": null, "authResponseToken": , "hubUrl": "https://hub.blockstack.org", "appPrivateKeyFromWalletSalt": null, "coreNode": null, "gaiaAssociationToken": , "gaiaHubConfig": { "url_prefix": , "max_file_upload_size_megabytes": , "address": , "token": "server": }, "username": "", "profile_url": }

When connecting with the hiro wallet, using a ledger the userData object inside userSession object is as follows:

{ "profile": { "stxAddress": { "testnet": "ST1TA24KDEVPSJPC7K6Q41MF5PBYMGRAYGH88M07T", "mainnet": "SP1TA24KDEVPSJPC7K6Q41MF5PBYMGRAYGKQH20CN" } }, "decentralizedID": "identityAddress": "authResponseToken": "hubUrl": "username": "" }

btc.us uses @stacks/storage to store data on GAIA. For ledger the required args for the connectToGaiaHub fn in @stacks/storage are not present in the userData object. The fn call inside @stacks/storage:

    const gaiaConfig = await connectToGaiaHub(
      userData.hubUrl,
      userData.appPrivateKey,
      userData.gaiaAssociationToken
    );

^ In ledgers case the appPrivateKey and gaiaAssociationToken is missing.

I am not sure if the data from ledger is the expected data (and btc.us needs to cater to it differently) or if the ledger app misses some data in its response or if its an issue with stacks.js Hoping for some input on this. Thanks!

Also side-note: for btc.us this is not brave specific, its happening on chrome as well.

kyranjamie commented 1 year ago

In ledgers case the appPrivateKey and gaiaAssociationToken is missing.

The appPrivateKey is derived from a user's private key. As Ledgers, rightly, do not allow private key export, Ledger wallets and Gaia are incompatible. This is a limitation there's little we can do about.

I'd suggest that app developers do not rely on Gaia, and use it only as an optional extra when the appPrivateKey is available (software wallets only).

There is a discussion about how we might be able to remedy this for Ledger users https://github.com/hirosystems/stacks-wallet-web/discussions/2352 and is also described in the ledger preview announcement https://github.com/hirosystems/stacks-wallet-web/discussions/2451