3box-js icon indicating copy to clipboard operation
3box-js copied to clipboard

box.auth hangs or takes a very long time

Open dkent600 opened this issue 5 years ago • 3 comments

Since upgrading to the latest in 3box, I've been seeing very long wait times or an outright hang when called box.auth.

I often see this exception which comes from the "p-some" package which is pulled in by [email protected].

This is on rinkeby. Haven't tried mainnet.

AggregateError: 
    TypeError: socket.terminate is not a function
        at Object.stream.destroy (webpack-internal:///./node_modules/it-ws/client.js:21:12)
        at Object.close (webpack-internal:///./node_modules/libp2p-websockets/src/socket-to-conn.js:59:16)
        at async Upgrader.upgradeOutbound (webpack-internal:///./node_modules/libp2p/src/upgrader.js:178:7)
        at async ClassIsWrapper.dial (webpack-internal:///./node_modules/libp2p-websockets/src/index.js:45:18)
        at async TransportManager.dial (webpack-internal:///./node_modules/libp2p/src/transport-manager.js:87:14)
        at async eval (webpack-internal:///./node_modules/libp2p/src/dialer/dial-request.js:58:18)
        at async eval (webpack-internal:///./node_modules/p-some/index.js:53:19)
    at maybeSettle (webpack-internal:///./node_modules/p-some/index.js:31:11)
    at eval (webpack-internal:///./node_modules/p-some/index.js:69:23)

Steps to reproduce

  1. const box = await Box.create(web3Provider)
  2. await box.auth(["DAOstack"], { address }).

Expect box.auth should complete, and do so quickly, ideally in maximum 2 seconds.

Desktop (please complete the following information):

  • OS: Windows 10e.g. iOS]
  • Browser: chromium

dkent600 avatar Jun 22 '20 13:06 dkent600

Thanks for reporting @dkent600. Does this just cause box.auth to hang or does it throw an error and exit?

Note: this is likely related to the infrasturcture problems we are seeing currently.

oed avatar Jun 22 '20 13:06 oed

Thanks for reporting @dkent600. Does this just cause box.auth to hang or does it throw an error and exit?

Note: this is likely related to the infrasturcture problems we are seeing currently.

When the exception is thrown auth hangs.

[UPDATE:] But frankly it often hangs even without the exception.

dkent600 avatar Jun 22 '20 13:06 dkent600

@dkent600 We've had some service degradation of our infrastructure recently that was fixed last week. Would you mind trying this again and seeing if it's still an issue?

oed avatar Jul 01 '20 13:07 oed