Closed Bug 1361270 Opened 7 years ago Closed 7 years ago

Avoid exception when searching in the Console panel

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(firefox55 verified)

VERIFIED FIXED
Firefox 55
Iteration:
55.5 - May 15
Tracking Status
firefox55 --- verified

People

(Reporter: Honza, Assigned: Honza)

References

Details

(Whiteboard: [console-html] )

Attachments

(3 files)

This is a follow up for bug 1307879

STR:
1) Open the Toolbox and select the Console panel
2) Make sure there are some HTTP request logs 
3) Try to search using free-text
4) Check out the following error in the Browser Console

TypeError: message.messageText is undefined
resource://devtools/client/webconsole/new-console-output/selectors/messages.js, line: 132


This happens because:

`message.messageText !== null` is true in case `typeof message.messageText == "undefined"`

Honza
Assignee: nobody → odvarko
Depends on: 1307879
Whiteboard: [console-html]
Comment on attachment 8863612 [details]
Bug 1361270 - Avoid exception when searching in the Console panel;

https://reviewboard.mozilla.org/r/135402/#review138342

Seems good to me.
Could you add a test case where we filter a message with `messageText === undefined` (e.g. a network message) to make sure we don't run into this later ? Thanks
Attachment #8863612 - Flags: review?(nchevobbe) → review+
Status: NEW → ASSIGNED
Flags: qe-verify?
Priority: -- → P1
Iteration: --- → 55.5 - May 15
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #2)
> Comment on attachment 8863612 [details]
> Bug 1361270 - Avoid exception when searching in the Console panel;
> 
> https://reviewboard.mozilla.org/r/135402/#review138342
> 
> Seems good to me.
> Could you add a test case where we filter a message with `messageText ===
> undefined` (e.g. a network message) to make sure we don't run into this
> later ? Thanks
Attached

There is also a patch that fixes search in Net events + code clean up

Honza
Comment on attachment 8863702 [details]
Bug 1361270 - Update test;

https://reviewboard.mozilla.org/r/135482/#review138470

::: devtools/client/webconsole/package.json:9
(Diff revision 1)
>    "engines": {
>      "node": ">=6.9.0"
>    },
>    "scripts": {
>      "start": "node bin/dev-server",
> -    "test": "cross-env NODE_ENV=test NODE_PATH=../../../ mocha new-console-output/test/**/*.test.js --compilers js:babel-register -r jsdom-global/register -r ./new-console-output/test/require-helper.js"
> +    "test": "cross-env NODE_ENV=test NODE_PATH=../../../ mocha new-console-output/test/**/search.test.js --compilers js:babel-register -r jsdom-global/register -r ./new-console-output/test/require-helper.js"

I think this shouldn't be commited
Attachment #8863702 - Flags: review?(nchevobbe) → review-
Comment on attachment 8863701 [details]
Bug 1361270 - Search also within net logs;

https://reviewboard.mozilla.org/r/135480/#review138472

Looks better, thanks for cleaning this up
Attachment #8863701 - Flags: review?(nchevobbe) → review+
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #6)
> > -    "test": "cross-env NODE_ENV=test NODE_PATH=../../../ mocha new-console-output/test/**/*.test.js --compilers js:babel-register -r jsdom-global/register -r ./new-console-output/test/require-helper.js"
> > +    "test": "cross-env NODE_ENV=test NODE_PATH=../../../ mocha new-console-output/test/**/search.test.js --compilers js:babel-register -r jsdom-global/register -r ./new-console-output/test/require-helper.js"
> 
> I think this shouldn't be commited
Fixed, thanks!

Honza
Flags: qe-verify? → qe-verify+
Comment on attachment 8863702 [details]
Bug 1361270 - Update test;

https://reviewboard.mozilla.org/r/135482/#review138476

Thanks, r+
Attachment #8863702 - Flags: review?(nchevobbe) → review+
QA Contact: iulia.cristescu
Pushed by jodvarko@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/70aea1eae002
Avoid exception when searching in the Console panel; r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/be7d42a610ff
Search also within net logs; r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/8726b2d0277e
Update test; r=nchevobbe
https://hg.mozilla.org/mozilla-central/rev/70aea1eae002
https://hg.mozilla.org/mozilla-central/rev/be7d42a610ff
https://hg.mozilla.org/mozilla-central/rev/8726b2d0277e
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Confirming that 55.0a1 (2017-05-17) build is verified fixed on Windows 10 x64, Ubuntu 16.04 x64 and Mac OS X 10.11.6.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: