dcrdex icon indicating copy to clipboard operation
dcrdex copied to clipboard

Login takes a long time

Open martonp opened this issue 1 year ago • 8 comments

When I login, it stays on the loading screen for a long time. If I refresh the page and enter my password, it immediately goes to the wallets page. It would be better if it was quicker after the first password entry.

martonp avatar Oct 18 '24 16:10 martonp

Can confirm, often takes longer than 5 seconds for me even on M3 pro mac (probably establishes some connections during startup in blocking manner).

norwnd avatar Oct 19 '24 09:10 norwnd

If someone could identify what part of Login is actually taking a long time, that'd be a start. I have some memory that it's taking a long time connecting to a native spv wallet, but I'm not certain.

buck54321 avatar Oct 20 '24 15:10 buck54321

Connecting wallets took the most time for me on a very good internet connection. 34 and 18 seconds respectively.

I have just 3 wallets, dcr, btc and ltc.

2024-10-23 15:10:41.400 [INF] CORE: Connecting wallets started by 2024-10-23 16:10:06.528011 +0100 WAT m=+11.695277194 and finished in 34.872953222s

....

2024-10-23 15:10:41.406 [INF] CORE: Resuming trades started by 2024-10-23 16:10:41.402306 +0100 WAT m=+46.569649780 and finished in 4.156821ms

....

2024-10-23 15:10:41.711 [INF] CORE: Connecting to dex servers started by 2024-10-23 16:10:41.407894 +0100 WAT m=+46.575237592 and finished in 303.999903ms

2024-10-23 15:13:17.810 [INF] CORE: Connecting wallets started by 2024-10-23 16:12:59.612841 +0100 WAT m=+28.132553629 and finished in 18.197418874s

...

2024-10-23 15:13:17.810 [INF] CORE: Resuming trades started by 2024-10-23 16:13:17.810252 +0100 WAT m=+46.330005168 and finished in 72.792µs

....

2024-10-23 15:13:18.081 [INF] CORE: Connecting to dex servers started by 2024-10-23 16:13:17.81034 +0100 WAT m=+46.330092941 and finished in 271.066312ms

ukane-philemon avatar Oct 23 '24 15:10 ukane-philemon

My main question is, why does it sit there loading, but if I refresh and reenter the password, it immediately goes to the wallets page.

martonp avatar Oct 24 '24 06:10 martonp

If someone could identify what part of Login is actually taking a long time, that'd be a start.

For one, "connecting to DEX servers..." seems to be a blocking operation during login because, from what I've gathered, there is some server maintenance happening at the moment and my app (at 1.0.2) is stuck (for many minutes) at the following screen:

image

It's probably better to connect to server(s) in background and redirect user to wallet(s) page as soon as they fill in their password at login page, like martonp suggests, simply because wallet data is readily available for displaying for the most part (it's not 100% fresh until wallets fully sync, but it's probably better than showing a load-screen for several seconds).

Additionally, there might be more "issues" related to connecting to server(s) during login, namely I see the following notifications that suggest my Bison app actually did connect to the server:

image

but for some reason it's still stuck at login screen. So either something isn't right with that notification message, or more likely - there isn't a proper handling (or web-page transition) for the case when

  • user tries to login into Bison wallet
  • while at the same time there is a temporary connectivity issue between Bison wallet and server (due to temporary internet blip, or server restarting or similar)

norwnd avatar Nov 19 '24 11:11 norwnd

Related issue: If I refresh and re-login before the login process completes, it will show that I am not bonded with the server, even though I am.

martonp avatar Dec 03 '24 06:12 martonp

Related issue: If I refresh and re-login before the login process completes, it will show that I am not bonded with the server, even though I am.

I also encounter this occasionally, and I noticed there is something about "expired bond" in my logs that might be related to this (perhaps previously expired bond interferes with the active one in UI ?):

2024-12-04 09:43:01.484 [INF] CORE: Starting Bison Wallet core
2024-12-04 09:43:02.337 [DBG] CORE: notify: |POKE| (conn) Server connected - dex.decred.org:7232 is connected
2024-12-04 09:43:02.534 [INF] CORE: Server dex.decred.org:7232 supports API version 2.
2024-12-04 09:43:02.534 [DBG] CORE: Server dex.decred.org:7232 broadcast timeout 22m0s. Tick interval 2m45s
2024-12-04 09:43:02.534 [INF] CORE: Loaded active bond 4a30e00766af8ac8de9f0cfd285b2d73d46bd0905a77d488dd2d228ce6bcac4f:0. BACKUP refund tx: 01000000014facbce68c222ddd88d4775a90d06bd4732d5b28fd0c9fdec88aaf6607e0304a0000000000feffffff01b28c98000000000000001976a9144a78a714f0d50f40069dc286ad13215f968740cf88ac9cb986670000000001809698000000000000000000ffffffff8c483045022100e30f00b7a31c3227ced7e6b42a66c6ff6a6fad80adb12a765212f95153834522022023739f635353e7a79c3b22f488aa3cb6989bcc4279773539369f148f707fc84401210212e960edeaee639046b2fd190dc9a4fad4d38bcb1c79e677d1a861b764c3b60f20049cb98667b17576a91406ce2560725a26edbcac021dab773360e32033ed88ac
2024-12-04 09:43:02.534 [INF] CORE: Loaded expired bond fd1ab26343470be4e74f08e6914b75f22736bda1ca40683922ca4b85e1e3decb:0. Refund tx: 0100000001cbdee3e1854bca22396840caa1bd3627f2754b91e6084fe7e40b474363b21afd0000000000feffffff01b28c98000000000000001976a914c056b30f42f9ab7efb209ce45672dac41a0f025488acc5575e670000000001809698000000000000000000ffffffff8c483045022100fb84a3f659537aaa949521c623ab82825c8505d9709294a26c15e07129890efd0220358cc8ef43b2dbf3b60702090c1822881479f44dfd373659ea208909feb074fd012102cc16a1042d56bba3350100fdd46e4258d3099f9e5f4d0d92090e0e4a097f30b62004c5575e67b17576a914a611b5534913879fdf4b77ec0c8067233da3f43e88ac
2024-12-04 09:43:02.534 [INF] CORE: Connected to DEX server at dex.decred.org:7232 and listening for messages.
2024-12-04 09:43:02.534 [INF] CORE: Connected to 1 of 1 DEX servers
2024-12-04 09:43:02.535 [TRC] CORE: Loaded btc wallet configuration.
2024-12-04 09:43:02.538 [TRC] CORE[dcr]: Fallback fees set at 20 atoms/byte
2024-12-04 09:43:02.538 [TRC] CORE[dcr]: Fees rate limit set at 100 atoms/byte
2024-12-04 09:43:02.539 [TRC] CORE[dcr]: Redeem conf target set to 1 blocks
2024-12-04 09:43:02.539 [TRC] CORE: Loaded dcr wallet configuration.
2024-12-04 09:43:02.553 [DBG] CORE[eth]: ETH wallet will support a maximum of 28 swaps and 63 redeems per transaction.
2024-12-04 09:43:02.554 [TRC] CORE: Loaded eth wallet configuration.
2024-12-04 09:43:02.554 [DBG] CORE[polygon]: ETH wallet will support a maximum of 28 swaps and 64 redeems per transaction.
2024-12-04 09:43:02.554 [TRC] CORE: Loaded polygon wallet configuration.
2024-12

norwnd avatar Dec 04 '24 09:12 norwnd

Related issue: If I refresh and re-login before the login process completes, it will show that I am not bonded with the server, even though I am.

Perhaps also somewhat related to this ^ I've seen negative values shown on bond-view

image

norwnd avatar Dec 16 '24 15:12 norwnd