Closed Bug 1463057 Opened 2 years ago Closed 2 years ago

Can't expand an object logged in a console.error call

Categories

(DevTools :: Console, defect, P1, major)

defect

Tracking

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

VERIFIED FIXED
Firefox 62
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox60 --- unaffected
firefox61 --- verified
firefox62 --- verified

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

(Keywords: regression)

Attachments

(1 file)

**Steps to reproduce**
1. Open the console
2. Evaluate `console.error({a: 1})`
3. Click on the `Object` word, or on the second arrow


**Expected results**

The object gets expanded

**Actual results**

The object isn't expanded, and the stacktrace is shown.

---
Firefox 61 is affected, 60 is not. 
The fix, when done, should be uplifted to beta
Priority: -- → P1
Comment on attachment 8979428 [details]
Bug 1463057 - Fix expanding object in console.error message; .

https://reviewboard.mozilla.org/r/245612/#review251790

Looks good to me (just one minor comment)

R+ assuming try is green

Thanks!

Honza

::: commit-message-a23b4:8
(Diff revision 2)
> +There was a race between the fetching of the object properties and the
> +expansion of the stacktrace of the console.error message. In the end, the
> +message was re-rendered, without the object being expanded.
> +To prevent such thing, we stop the propagation of the click on the Tree
> +node. Here the fix is done directly in the Reps bundle so it can be applied
> +on beta, without extra changes we'd have if doing a full bundle release.

> "without extra changes we'd have if doing a full bundle release."


Should this be reworded?

...without extra changes we'd have to make if doing a full bundle release.
Attachment #8979428 - Flags: review?(odvarko) → review+
Comment on attachment 8979428 [details]
Bug 1463057 - Fix expanding object in console.error message; .

https://reviewboard.mozilla.org/r/245612/#review251790

> > "without extra changes we'd have if doing a full bundle release."
> 
> 
> Should this be reworded?
> 
> ...without extra changes we'd have to make if doing a full bundle release.

I changed it to `Here the fix is done directly in the Reps bundle so it can be applied on beta, without unrelated code changes we'd have if doing a full bundle release.`
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/de791ece9ee0
Fix expanding object in console.error message; r=Honza.
https://hg.mozilla.org/mozilla-central/rev/de791ece9ee0
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
Has Regression Range: --- → yes
Has STR: --- → yes
Comment on attachment 8979428 [details]
Bug 1463057 - Fix expanding object in console.error message; .

Approval Request Comment
[Feature/Bug causing the regression]:Changes in ObjectInspector code
[User impact if declined]: Can't inspect an object logged in a console.error call
[Is this code covered by automated tests?]: Yes
[Has the fix been verified in Nightly?]: Yes
[Needs manual test from QE? If yes, steps to reproduce]:  Yes
1. Open the console
2. Evaluate `console.error({a: 1})`
3. Click on the "Object" text
-> The object should be expanded
[List of other uplifts needed for the feature/fix]: -
[Is the change risky?]: No
[Why is the change risky/not risky?]: We only stop the propagation of a click event that should never be caught by a parent element
[String changes made/needed]:
Attachment #8979428 - Flags: approval-mozilla-beta?
Comment on attachment 8979428 [details]
Bug 1463057 - Fix expanding object in console.error message; .

Simple fix with a new test included. Approved for 61.0b8.
Attachment #8979428 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
We tested on OS: Windows 10x64, Ubuntu 17.10 and Mac OSX 10.13

Verified as fixed on latest 
 - Beta 61.0b8
 - Nightly 62.0a1 


ESR channel is affected 
 - 52.8.0esr  
 - 60.0.1esr
(In reply to Damira Akh from comment #13)
> We tested on OS: Windows 10x64, Ubuntu 17.10 and Mac OSX 10.13
> 
> Verified as fixed on latest 
>  - Beta 61.0b8
>  - Nightly 62.0a1 
> 
> 
> ESR channel is affected 
>  - 52.8.0esr  
>  - 60.0.1esr

I tested 60.0.1 again (osx) and found it is not affected (the patch introducing the issue landed in 61).
Could you confirm me you are reproducing this issue in 60, and tell me the exact steps you're taking ?
Flags: needinfo?(dakhmedova)
Hey Nicolas, 
I was able to reproduce on:

Version 60.0.1 
Build ID: 20180516032417
Channel: esr
User Agent: Mozilla/5.0(Macintosh;Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Firefox/60.0

I taking exact following steps. 
**Steps to reproduce**
1. Open the console
2. Evaluate `console.error({a: 1})`
3. Click on the `Object` word, or on the second arrow

And getting this result: The object isn't expanding.
Flags: needinfo?(dakhmedova)
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Nicolas, how do you want to proceed here?
Flags: needinfo?(nchevobbe)
We tried to reproduce on windows on 60 but couldn't. The original observed regression was introduced in 61 so I don't know what is going on.
Damira, could you post a screencast (with mouse capturing) ? Also, do you see any logs in the Browser Console ?
Flags: needinfo?(nchevobbe) → needinfo?(dakhmedova)
Hi Nicolas,
Are you testing it in "ESR" channel? 
Only in ESR channel we are able to reproduce this bug.
Flags: needinfo?(dakhmedova) → needinfo?(nchevobbe)
(In reply to Damira Akh from comment #18)
> Hi Nicolas,
> Are you testing it in "ESR" channel? 
> Only in ESR channel we are able to reproduce this bug.

Tried on ESR 60.0.2 (64-bit) and it does work as expected. I'm really curious what is going on.
Damira, could you add a screencast here with mouse capture so I can spot if there's anything I do wrong trying to reproduce this ?
Flags: needinfo?(nchevobbe) → needinfo?(dakhmedova)
Tested on ESR 60.0.2 the issue is no more reproducible.
Flags: needinfo?(dakhmedova)
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.