Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

404 page appears when enter a slash after the URL #1794

Open
elena-zh opened this issue Nov 5, 2021 · 5 comments
Open

404 page appears when enter a slash after the URL #1794

elena-zh opened this issue Nov 5, 2021 · 5 comments
Labels
app:CowSwap CowSwap app Bug Something isn't working Enhancement New feature or request Low Severity indicator for defects. It won't cause any major break-down of the system Protofire Handled by Protofire development team

Comments

@elena-zh
Copy link

elena-zh commented Nov 5, 2021

It might seem as an expected behavior, but, seems to me, we can do something with this.

When I enter an URL https://cowswap.exchange/#/swap/ I get the 404 error

I do not know how, but sometimes it is added automatically when we change networks in the connected wallet (reported here #1030 (comment))

It would be nice to handle this case somehow and do not show 404 page for an URL with the slash as we do for cases:
https://cowswap.exchange/#/swap?
https://cowswap.exchange/#/swap#

@elena-zh elena-zh added app:CowSwap CowSwap app Enhancement New feature or request Low Severity indicator for defects. It won't cause any major break-down of the system Bug Something isn't working labels Nov 5, 2021
@alfetopito
Copy link
Contributor

I believe this began when we introduced the 404 route.
Before it would ignore everything and always point to #swap (check uniswap)

This could be added to Protofire backlog

@alfetopito alfetopito added the Protofire Handled by Protofire development team label Nov 5, 2021
@elena-zh
Copy link
Author

elena-zh commented Dec 1, 2021

I do not know how, but sometimes it is added automatically when we change networks in the connected wallet (reported here #1030 (comment))

Sometimes slash is added automatically right after connection, so a user is redirected to the 404 page, and it isa not good UX behavior.
More often the issue happens in Firefox browser.

@elena-zh
Copy link
Author

elena-zh commented Dec 7, 2021

@alfetopito , finally, I caught the root cause of the error and why slash appears after the swap in the URL when changing networks, connecting a wallet.
More than often the issue appears when connect to XDAI.
When the network is loading, we can see Import Tokens modal, that can blink for a sec, or be displayed up to 5 sec (reported in #1061 case 1)
hanging

So when I accidentally click outside of this modal area, then the URL is changing to /swap/, and then we are redirected to the 404 page.

@alfetopito
Copy link
Contributor

Nice find!

@stale
Copy link

stale bot commented Mar 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you think it shouldn't be closed, speak now or forever hold your peace.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
app:CowSwap CowSwap app Bug Something isn't working Enhancement New feature or request Low Severity indicator for defects. It won't cause any major break-down of the system Protofire Handled by Protofire development team
Projects
None yet
Development

No branches or pull requests

2 participants