Using remote-ip filter flag breaks the netmonitor

VERIFIED FIXED in Firefox -esr60

Status

defect
P2
normal
VERIFIED FIXED
11 months ago
10 months ago

People

(Reporter: ntim, Assigned: Honza)

Tracking

({regression})

unspecified
Firefox 62

Firefox Tracking Flags

(firefox-esr52 unaffected, firefox-esr60 verified, firefox60 wontfix, firefox61 verified, firefox62 verified)

Details

Attachments

(1 attachment)

(Reporter)

Description

11 months ago
STR:
- Make sure the netmonitor has some requests
- Type "remote-ip:"
- Pick the first autocomplete result (with an IP)

AR:
- The netmonitor turns blank

TypeError: "getFormattedIPAndPort(...) is undefined" isFlagFilterMatchresource://devtools/client/netmonitor/src/utils/filter-text-utils.js:131:15
@ntim: I can't reproduce this. Can you past the string (free text) you have in the filter after autocompletion?

Going to google.com and picking the first IP from the autocomplete popup generates this string for me:

remote-ip:172.217.16.68

...which nicely filters panel content. No blank panel for me.

(tested on Win10)

Honza
Priority: -- → P4
(Reporter)

Comment 2

11 months ago
This seems to happen when the result of `getFormattedIPAndPort(item.remoteAddress, item.remotePort)` is undefined.

Which can happen happen if both the port and address are undefined: https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/src/utils/format-utils.js#88-90

This makes: https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/src/utils/filter-text-utils.js#131-132

fail.

This is more likely to happen if you haven't opened the panes (maybe because the data is lazy loaded ?)

Comment 3

11 months ago
Hi guys i managed to reproduce this issue on Windows 10 , here are the results from mozregression :

INFO: Last good revision: 0a524900f4f4066164c1bfe61344c717d8915806
INFO: First bad revision: 879aa8e4a7abc87eb2053d07666e92a38afbb674
INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=0a524900f4f4066164c1bfe61344c717d8915806&tochange=879aa8e4a7abc87eb2053d07666e92a38afbb674

I used ign.com to reproduce this issue.
Comment hidden (mozreview-request)
Assignee: nobody → odvarko
Has STR: --- → yes
Priority: P4 → P2
(In reply to Rares Doghi from comment #3)
> Hi guys i managed to reproduce this issue on Windows 10 , here are the
> results from mozregression :
> 
> INFO: Last good revision: 0a524900f4f4066164c1bfe61344c717d8915806
> INFO: First bad revision: 879aa8e4a7abc87eb2053d07666e92a38afbb674
> INFO: Pushlog:
> https://hg.mozilla.org/integration/autoland/
> pushloghtml?fromchange=0a524900f4f4066164c1bfe61344c717d8915806&tochange=879a
> a8e4a7abc87eb2053d07666e92a38afbb674
> 
> I used ign.com to reproduce this issue.
Thanks for the help!

I was able to reproduce the issue on my machine now. Patch attached.

Honza

Comment 7

11 months ago
mozreview-review
Comment on attachment 8979438 [details]
Bug 1462882 - Avoid NPE when filtering using remote-ip;

https://reviewboard.mozilla.org/r/245624/#review251912

Thanks, looks good! :)
Attachment #8979438 - Flags: review?(jryans) → review+

Comment 8

11 months ago
Pushed by jodvarko@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/764a847c0f34
Avoid NPE when filtering using remote-ip; r=jryans

Comment 9

11 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/764a847c0f34
Status: NEW → RESOLVED
Last Resolved: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
Is this something we should consider for backport, or can it ride the trains?
Flags: needinfo?(odvarko)
Comment on attachment 8979438 [details]
Bug 1462882 - Avoid NPE when filtering using remote-ip;

Approval Request Comment
[Feature/Bug causing the regression]: n/a
[User impact if declined]: Users of DevTools Network panel can't filter HTTP requests using IP address
[Is this code covered by automated tests?]: n/a
[Has the fix been verified in Nightly?]: yes
[Needs manual test from QE? If yes, steps to reproduce]:  no
[List of other uplifts needed for the feature/fix]: n/a
[Is the change risky?]: low risk
[Why is the change risky/not risky?]: feature only for developers, small patch (2 lines), tested
[String changes made/needed]: n/a
Flags: needinfo?(odvarko)
Attachment #8979438 - Flags: approval-mozilla-beta?
Comment on attachment 8979438 [details]
Bug 1462882 - Avoid NPE when filtering using remote-ip;

Allows the NetMonitor to filter requests using IP addresses. Approved for 61.0b10.
Attachment #8979438 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Managed to reproduce the issue using Fx 62.0a1 (buildID: 20180518222751).

I have verified the fix on using Fx 61.0b10 (buildID: 20180529221115) and Fx 62.0a1 (buildID: 20180529220039) on Win 10 x64, macOS 10.13 and Ubuntu 16.04 LTS. The network tool correctly displays the appropriate result when choosing the first IP from the 'remote-ip' search.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Comment on attachment 8979438 [details]
Bug 1462882 - Avoid NPE when filtering using remote-ip;

I'm told there are people who use devtools on ESR as well. This grafts cleanly and is verified on 61/62, so let's take it for ESR 60.1 also.
Attachment #8979438 - Flags: approval-mozilla-esr60+

Updated

10 months ago
Product: Firefox → DevTools
I have verified the fix on Fx 60.1.0ESR (buildID: 20180621121604) on Win 10 x64, macOS 10.12 and Ubuntu 16.04 LTS.

The network tool correctly displays the appropriate result when choosing the first IP from the 'remote-ip' search.
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.