Closed Bug 1540741 Opened 5 years ago Closed 5 years ago

Warning: Each child in an array or iterator should have a unique "key" prop.

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(firefox68 fixed)

RESOLVED FIXED
Firefox 68
Tracking Status
firefox68 --- fixed

People

(Reporter: Honza, Assigned: Honza)

Details

Attachments

(2 files)

The sub error messages are:

  1. Check the render method of SourcesTree.
  2. Check the render method of Accordion

STR:

  1. Load http://janodvarko.cz/tests/bugzilla/1539142/
  2. Open the Toolbox (in my case the Debugger panel is the default panel)
  3. Click the Start Worker button
  4. The worker should appear in the Sources tree and you should see the first warning in the Browser Console
  5. Create BP on line 17 in Webpack/src/worker.js file
  6. Wait for break and check the Browser Console for the second warning

Honza

Priority: -- → P2
Summary: I am seeing `Warning: Each child in an array or iterator should have a unique "key" prop.` → Warning: Each child in an array or iterator should have a unique "key" prop.
Attached image FollowedSteps.png

Thank you for reporting this Honza! Unfortunately I can't reproduce with your steps. I even added a few workers in the hopes it would trigger the key problem.

I don't understand why you can't repro that, but the attached patch fixes that for me.

Honza

Assignee: nobody → odvarko
Status: NEW → ASSIGNED
Pushed by jodvarko@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/04537ce859c9
Warning: Each child in an array or iterator should have a unique "key" prop. r=davidwalsh

Dang; looks like we needed to add a yarn jest -u update for the snapshots.

(In reply to David Walsh :davidwalsh from comment #6)

Dang; looks like we needed to add a yarn jest -u update for the snapshots.

David, what exactly should I do to fix the patch?

Honza

Flags: needinfo?(odvarko) → needinfo?(dwalsh)

cd devtools/client/debugger/new/ and run yarn jest -u; doing so should update the out of date Jest snapshots. The test fails because those snapshots (rendered elements) don't have the key attributes you've added in your patch. After running yarn jest -u, run hg status and you should see a few changed .snap files. Add those to the patch and we should be good!

Flags: needinfo?(dwalsh)
Pushed by jodvarko@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/650ab6bfa91a
Warning: Each child in an array or iterator should have a unique "key" prop. r=davidwalsh
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: