metamask-mobile
metamask-mobile copied to clipboard
Add browser cookies support on Android
Description
At the moment users are not able to use cookies on Android since the HTTP client (OkHttp) is rejecting cookies by default, this PR implements an interface that saves and loads cookies accordingly.
This PR also fixes clearing cookies on iOS and improves the "Clear Cookies" section structure.
Test Cases
Case 1 (Android):
- Access a website that has cookies or login into one that has session cookies (ex.: Go to https://notareal.club/shop)
- Add a product to your cart.
- Click view cart or navigate to the cart page.
- You should see an item in the cart
Cases 2 (iOS):
- Access a website that has cookies or login into one that has session cookies (ex.: Go to https://notareal.club/shop)
- Go to Settings -> Security & Privacy -> Clear Browser Cookies
- Clear cookies button should be disabled
- Navigate to the browser you should have no cookies
Checklist
- [x] There is a related GitHub issue
- [ ] Tests are included if applicable
- [ ] Any added code is fully documented
Screenshots/Recordings
https://user-images.githubusercontent.com/575479/178604012-9db220e4-f3a1-4aca-8f98-f2a10269f9a3.mp4
https://user-images.githubusercontent.com/575479/178604025-0a7f9f5d-cc4d-4a1f-bf00-5ba84a17dae2.mp4
https://user-images.githubusercontent.com/575479/178604034-9f017d65-fa62-450d-b80f-d7318dcf36e8.mp4
Issue
Progresses #4245, #2954, #2544, #4190
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.
The priority and severity labels should be used in issues and not PRs
Reviewed during meeting. Once the comments are addressed the PR looks good.
Please resolve conversations, changes and conflicts. Once resolved please removed needs-dev-review label and add Mobile QA Board label.
Add as draft in favour of merging https://github.com/MetaMask/metamask-mobile/pull/3905 first
@Fatxx A couple of things:
I am using the URL mentioned in this comment to test and I can still reproduce the issue. that is, I switch to polygon > open https://matic.art/ > tap connect > connect my wallet > I am taken back to the dapp home screen and my wallet is still not connected. see here: http://recordit.co/nxXZBUUsqc
this link doesn't work: https://notareal.club/shop I am taken to a blank page.
I am unable to log into a WordPress site
@Fatxx The issues I reported here were fixed…. BUT I noticed you merged a commit from 3905 into your PR (correct me if I made the wrong assumption here). This prompted me to test the sites listed in this issue: https://github.com/MetaMask/metamask-mobile/issues/3857
My findings are both Android-specific:
1/ Using this WebSocket website: https://www.hawku.com/ I am unable to get to the connect wallet view. I am stuck on the Recaptcha page. It seems as if the page keeps on refreshing even though I completed the Recaptcha.
see here: http://recordit.co/qdztA4bc1Z
2/ Using this WebSocket website: https://fly.io/launch/livebook
I am prompted with an oops something went wrong view after signing up making the browser feel a bit unstable.
See here: http://recordit.co/Rm28GuxA4I