explorer icon indicating copy to clipboard operation
explorer copied to clipboard

Surfacing faucet error in the UI

Open markmhendrickson opened this issue 2 years ago • 14 comments

It seems to always say "Failed to fetch" 😢

Screenshot 2023-03-27 at 09 56 43

markmhendrickson avatar Mar 27 '23 07:03 markmhendrickson

I think this title should be changed because the faucet is broken for any amount. the Console is showing a CORS error.

https://user-images.githubusercontent.com/33360391/230711909-415fd7d3-6986-4abd-971c-e5420277c0df.mp4

image

314159265359879 avatar Apr 08 '23 08:04 314159265359879

Workaround: Use the Hiro Desktop wallet for testnet, that still has a faucet button that works (for small amounts). https://github.com/hirosystems/desktop-wallet/releases/tag/v4.8.0

314159265359879 avatar Apr 08 '23 08:04 314159265359879

@markmhx @314159265359879 Thanks for the heads up! I just tested a fix and it seems to be working for me now. Can you try again?

CharlieC3 avatar Apr 10 '23 14:04 CharlieC3

We tested it and it's working, Thanks @CharlieC3. I'll close the issue

andresgalante avatar Apr 10 '23 16:04 andresgalante

I just tried again and the request for regular amounts worked but then my subsequent request for Stacking amounts failed:

Screenshot 2023-04-11 at 13 00 23 Screenshot 2023-04-11 at 13 01 31

markmhendrickson avatar Apr 11 '23 10:04 markmhendrickson

@markmhx A 429 status code means you're being rate-limited by the faucet. You can make a faucet request once every minute. So if you wait long enough, you should be able to make another request. I think this is working as intended.

CharlieC3 avatar Apr 11 '23 13:04 CharlieC3

Ideally if the Explorer received a 429 on this page, it would be a better UX if it could display a message saying you're being rate-limited, and to wait a minute before sending another request. cc @He1DAr

CharlieC3 avatar Apr 11 '23 13:04 CharlieC3

You're right, that was the issue – I tried for Stacking amounts again today and it worked 🥳

Screenshot 2023-04-12 at 12 46 02

markmhendrickson avatar Apr 12 '23 10:04 markmhendrickson

If the API is giving us the correct status code, then we can improve the UX. Thanks @CharlieC3 for the suggestion

andresgalante avatar Apr 24 '23 16:04 andresgalante

@shamim-io would this be something you are willing to take?

andresgalante avatar May 28 '23 16:05 andresgalante

@andresgalante I think this section is visible only in testnet but not in mainnet. When I am viewing it from the mainnet I can't reproduce the section. The screenshot is as under. Screenshot 2023-05-31 at 12 31 44 AM

If I am right. Can you please provide me a valid URL to create a test network ? Thanks!

shamim-io avatar May 30 '23 19:05 shamim-io

@shamim-io That's right, the faucet only works on testnet since it proves "free" testnet STX 😄

andresgalante avatar May 30 '23 19:05 andresgalante

Awesome! Can you please provide me an URL to create a test network? @andresgalante

shamim-io avatar May 30 '23 19:05 shamim-io

@shamim-io you just need to select the testnet from the menu image

He1DAr avatar May 31 '23 13:05 He1DAr