"not secure" icon displayed for non-existent host (where connection attempted over https)
Categories
(DevTools :: Netmonitor, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: nawuvi, Unassigned)
Details
Attachments
(5 files)
Comment 1•7 years ago
|
||
Comment 2•6 years ago
|
||
Can I get assigned to this bug ?
How about something like this: https://imgur.com/a/lomigme
We will remove the "not secure" icon and have "FAIL" displayed instead of status 200.
Do you have any suggestions ?
Comment 3•6 years ago
|
||
(In reply to dhyey35 from comment #2)
Can I get assigned to this bug ?
How about something like this: https://imgur.com/a/lomigme
We will remove the "not secure" icon and have "FAIL" displayed instead of status 200.
Do you have any suggestions ?
@Harald, this looks better than before, what do you think?
Honza
Comment 4•6 years ago
|
||
Agreed, great first step.
Only nit to try a smaller FAIL
font to make it fit within the fixed width of the status column. I tried here with 2 font variations: https://www.figma.com/file/Vs7SyS5ELzEbiVubHnLjpvnX/Failed-Request-Status?node-id=0%3A1
Updated•6 years ago
|
Comment 6•6 years ago
|
||
Show FAIL text in status column
Comment 7•6 years ago
|
||
@Honza I have sent you a message on slack related to this bug.
Comment 8•6 years ago
|
||
Thanks for helping with this bug!
It feels a bit hacky using transferredSize == 0
and !status
props to identify failed requests. But, what's actually the difference between failed
and 404
? Could we fix this fox 404s?
Or perhaps we need better API from the platform?
Honza
Comment 9•6 years ago
|
||
Yeah I agree, I will investigate further on diff btwn failed
and 404
. I gave a look to the chromium source and it seems they are having their c++ code determine it and than use it in front-end to add error class in network panel. So maybe we need better API from the platform.
Comment 10•6 years ago
|
||
:kershaw, what is the best way to identify failed requests? Are there any platform API we could use for that? What's actually the difference between 404 and failed request?
Honza
Comment 11•6 years ago
|
||
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #10)
:kershaw, what is the best way to identify failed requests? Are there any platform API we could use for that? What's actually the difference between 404 and failed request?
Honza
I am not sure I understand correctly the definition of a "failed" request.
But, I think the best way to identify a failed request is checking the status code from OnStopRequest [1] and see if the status is NS_OK or not. Actually, a request with 404 response is also a successful request (the status code is NS_OK from OnStopRequest). It's just the response code [2] is 404.
[1] https://searchfox.org/mozilla-central/rev/486b64e4bff86b7988af8c8b80845404ad197533/netwerk/base/nsIRequestObserver.idl#36
[2] https://searchfox.org/mozilla-central/rev/486b64e4bff86b7988af8c8b80845404ad197533/netwerk/protocol/http/nsIHttpChannel.idl#258
Comment 12•6 years ago
|
||
@dhyey35: please look at the links above, does it help?
Honza
Comment 13•6 years ago
|
||
Hey Honza, that did help and I have updated the code in phab. What I am doing now is when onStopRequest
is called and status
isn't NS_OK
I am emitting an event that updates the failed
state in client. Checking manually on few urls makes it seem that this works.
Comment 14•6 years ago
|
||
Can you please share the page (online or as an attachment) you are using for testing?
Honza
Comment 15•6 years ago
|
||
I was using the test case file attached above: https://bug1469826.bmoattachments.org/attachment.cgi?id=8986431 ( screenshot of FAIL ) and a node project on my localhost.
I have found an online rest api demo service that can be used for testing
Testing links:
- http://dummy.restapiexample.com/api/v1/employees - should show
200
as it is an actual API mentioned on the page - http://dummy.restapiexample.com/api/v1/employees-FAKE - should show
404
as server send's that - http://dummy.restapiexample-FAKE.com/api/v1/employees - should show
FAIL
as no host with that URL exists
The above links worked as expected on my local build.
Comment 16•6 years ago
|
||
I am not seeing the status FAIL in the Console panel, see the attached screenshot. Can we display it there too?
Honza
Comment 17•6 years ago
|
||
I am seeing some test failures when applying this patch and also the one from re-enable netmonitor devtools tests (Bug 1258809)
Honza
Comment 18•6 years ago
|
||
The tests were failing because I had added a new prop failed
. Auto generated the new file and updated phab along with changes.
I need some guidance as how to call batchedMessageUpdates
from webconsole-wrapper.js
as when the packet for requestStatus
comes in it's 5th and there is only one packet after it, which makes them 6, while the code mentions that only after 8 packets have been received it would send update the UI. Should I update UI immediately when requestStatus
packet arrives ?
Comment 19•6 years ago
|
||
(In reply to dhyey35 from comment #18)
The tests were failing because I had added a new prop
failed
. Auto generated the new file and updated phab along with changes.I need some guidance as how to call
batchedMessageUpdates
fromwebconsole-wrapper.js
as when the packet forrequestStatus
comes in it's 5th and there is only one packet after it, which makes them 6, while the code mentions that only after 8 packets have been received it would send update the UI. Should I update UI immediately whenrequestStatus
packet arrives ?
Ah, yes, this is our old a bit hacky place. Nicolas, do you have any recommendation for what to do here?
Honza
Comment 20•6 years ago
|
||
(In reply to Dhyey Thakore [:dhyey35] from comment #18)
I need some guidance as how to call
batchedMessageUpdates
fromwebconsole-wrapper.js
as when the packet forrequestStatus
comes in it's 5th and there is only one packet after it, which makes them 6, while the code mentions that only after 8 packets have been received it would send update the UI. Should I update UI immediately whenrequestStatus
packet arrives ?
When we have a requestStatus
of failed
, are we expecting any other data? If not, we could call batchedMessagesUpdates
directly
if (res.networkInfo.updates.length === expectedLength || isFailedRequest) {
this.batchedMessageUpdates({ res, message });
}
If we are still waiting for some data, we could also check that we have all we need, for example by having an expectedFailedRequestLength
or something similar.
Comment 21•6 years ago
|
||
Thanks Nicolas.
Honza I have updated the code and also attached a screenshot. Can you please take a look at one FR:
comment in NetworkEventMessage.js
file. Also please let me know if you have any suggestions.
Comment 22•6 years ago
|
||
Nice! The FAIL
badge looks very red though :)
Could we use the same color than for the console error icon instead (var(--red-40)
)?
Comment 23•6 years ago
|
||
I have changed the color to var(--red-40)
Comment 24•6 years ago
|
||
Thanks for the update!
A comment left in Phabricator.
Honza
Comment 25•6 years ago
|
||
I am seeing test failures on try:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=c94a4b27930d30cf55456f008358cf833d4f7480
@Nicolas: it looks like we need to update the stubs (and include changes in the patch), correct?
mach test devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_update_stubs_network_event.js
Honza
Comment 26•6 years ago
|
||
yes, mach test devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_update_stubs_network_event.js --headless
will update the stubs, and you can then run mach test devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_network_event.js --headless --verify
to see if everything is okay.
Comment 27•6 years ago
|
||
@Honza I am not able to see the inline comment in phab
Comment 28•6 years ago
|
||
(In reply to Dhyey Thakore [:dhyey35] from comment #27)
@Honza I am not able to see the inline comment in phab
Should be there now, sorry.
Honza
Comment 29•6 years ago
|
||
Please see my comment in Phab (there are some test failures)
https://treeherder.mozilla.org/#/jobs?repo=try&revision=62a0789b40e7e82ed1397e512d3fbf6d74d78245&selectedJob=247745140
Honza
Comment 30•6 years ago
|
||
According to your comment in phab I created a new component and updated the code. You also mentioned using it in URL column, I couldn't find it. Can you pls help me with that ?
Comment 31•6 years ago
|
||
(In reply to Dhyey Thakore [:dhyey35] from comment #30)
According to your comment in phab I created a new component and updated the code. You also mentioned using it in URL column, I couldn't find it. Can you pls help me with that ?
Here is the RequestListColumnUrl component file:
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/src/components/RequestListColumnUrl.js#20
It's relatively new, so you might need to get the latest m-c
Honza
Comment 32•6 years ago
|
||
Hi Dhyey, I just noticed that this bug and the attached phabricator patch haven't been updated in a few months.
Do you still plan on working on this? If so and you just need more time, that's fine! If you, however, are not going to work on this anymore, please let us know so this bug can be made available for others to pick up.
Comment 33•6 years ago
|
||
Hi Patrick, A bit busy with inline preview in the Debugger tab, will take this up in a couple of weeks once it gets over.
Comment 34•5 years ago
|
||
Unassigning for now, for lack of activity over a long period of time. Feel free to re-claim the bug if you plan on picking up the work. In the meantime, someone else might be interested in picking up where this was left off.
Updated•3 years ago
|
Description
•