Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make network throttle wait if IPFS node is in the process of being installed #13177

Closed
bbondy opened this issue Dec 12, 2020 · 6 comments · Fixed by brave/brave-core#7818
Closed

Comments

@bbondy
Copy link
Member

bbondy commented Dec 12, 2020

Currently it's possible to install and get an interstitial page or page not load error after you install IPFS local node. During that period we should use the network throttle to continue loading .

@LaurenWags
Copy link
Member

@spylogsster or @bbondy could one of you help with a test plan for this one since it's marked QA/Yes?

@spylogsster
Copy link

spylogsster commented Mar 5, 2021

@LaurenWags please try this way:

  1. Setup IPFS method as local node
  2. Block requests to [local host]/api/v0/swarm/peers in sniffer (wireshark/fiddler/any other).
  3. Start browser with several IPFS tabs
  4. Tabs navigations should wait until you unblock requests

@stephendonner stephendonner added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Mar 9, 2021
@stephendonner
Copy link

stephendonner commented Mar 9, 2021

I've gotten thus far:

In the browser, they are accessed using http://ipv4.fiddler:48083/ipfs/bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi/ and http://ipv4.fiddler:48083/ipfs/bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/wiki/Vincent_van_Gogh.html, with the IPFS Peers URL at http://127.0.0.1:45004/ipfs/bafybeianwe4vy7sprht5sm3hshvxjeqhwcmvbzq73u55sdhqngmohkjgs4/#/peers working to display real-time connection status.

Screen Shot 2021-03-09 at 5 42 46 PM

Screen Shot 2021-03-09 at 5 43 01 PM

And although I'm able to see traffic to the API endpoint, it also returns HTTP 403 for http://127.0.0.1:48083/api/v0/stats/bw

Presumable, figuring out that latter part should be all that's required to see -- and then, block/step-through easily -- the actual API calls we want to [local host]/api/v0/swarm/peers as mentioned by @spylogsster. Sergey, do you have any pointers on how to do this inside Fiddler/something else? Thanks!

cc:ing @brave/legacy_qa for both visibility into my status, as well as in the hopes one of you has a suggestion; thanks!

@spylogsster
Copy link

spylogsster commented Mar 10, 2021

I use older version of Fiddler and it works well out of the box for me:
image
I added ipfs tabs to start pages and just started the browser, my hosts file is empty. @stephendonner , there is also autoresponder feature where I can add custom response, this is my IPFS settings:
image

@srirambv
Copy link
Contributor

I am able to verify the issue on Windows with Fiddler

image image

However on macOS, I run into the same issue as @stephendonner as mentioned in #13177 (comment)

Unable to get 200 for swam peers or for status

Screenshot 2021-03-15 at 05 41 17 Screenshot 2021-03-15 at 05 41 23

Peers show up when using localhost but the moment its switched to ipv4.fiddler redirect it automatically redirects to ipfs:// which fails to load the peers list

Screenshot 2021-03-15 at 05 41 56 Screenshot 2021-03-15 at 05 42 10

I gives unable to resolve method. Even when I try to manually change the config path to use ipv4.fiddler instead of 127.0.0.1 so that fiddler can capture it still doesn't work and says unable to resolve method.
Screenshot 2021-03-15 at 05 42 38

Tried with Charles proxy as well but ran into the same issue. Maybe we are missing a specific setting for macOS which is causing the issue.

cc: @lidel or @autonome may have some pointers on this one

@stephendonner
Copy link

stephendonner commented Mar 15, 2021

Verified PASSED on beta using build

Brave 1.22.58 Chromium: 89.0.4389.86 (Official Build) beta (x86_64)
Revision 0c2dac31bc21e806a791641316e99920f84ea52c-refs/branch-heads/4389@{#1472}
OS macOS Version 11.2.3 (Build 20D91)

Steps used to verify were:

  1. clean profile
  2. started browser, set a bunch of ipfs and ipns URLs as tabs; used were: ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/wiki/Vincent_van_Gogh.html, ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi/, ipns://brantly.eth, and ipns://en.wikipedia-on-ipfs.org
  3. connected to Ethernet
  4. clicked Use a local node on one of the tabs, which installed and configured the local ipfs node
  5. once it got to Waiting for peers, unplugged Ethernet cable; waited at least 10 seconds or so
  6. saw Try again button with We have exceeded the limit of attempts. Try again later. message text, below it
  7. plugged Ethernet cable back in
  8. waited until tabs automatically reloaded their content

The DNS-lookup failures seen in two of the tabs in my animated-gif screencast are unrelated "failures," which is just a timing issue - the real verification is after the DNS-lookup happens, when we connect to peers, which I conferred and verified with @spylogsster 👍

Thanks again to Sergey, @LaurenWags and @srirambv for help and verification attempts!

ipfs-retry


Verification passed on

Brave 1.22.58 Chromium: 89.0.4389.86 (Official Build) beta (x86_64)
Revision 0c2dac31bc21e806a791641316e99920f84ea52c-refs/branch-heads/4389@{#1472}
OS Windows 10 OS Version 2009 (Build 19042.867)
  • Verified IFPS tabs don't load until request is blocked via network tools
image image

Verification passed on

Brave 1.22.58 Chromium: 89.0.4389.86 (Official Build) beta (64-bit)
Revision 0c2dac31bc21e806a791641316e99920f84ea52c-refs/branch-heads/4389@{#1472}
OS Ubuntu 18.04 LTS
  • Verified IFPS tab doesn't load until request is blocked
  • Verified when unblocked, the tab loads
    13177

@stephendonner stephendonner added QA Pass-macOS and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants