question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrade to 0.7.26 breaks d3-drag

See original GitHub issue

After upgrading from 0.7.25, our tests started failing. It was really difficult to track down, but it seems to be related to changes in this addon.

Basically, we started getting a lot of errors like this:

Uncaught TypeError: Cannot read property \'document\' of null at http://localhost:7357/assets/vendor.js, line 78363'

This seems to be tied to the click helper and https://github.com/d3/d3-drag.

Which somehow failed here: (it’s hard to say exactly since this was always minified in our app, but we tried to trace the steps as good as possible): https://github.com/d3/d3-drag/blob/ec20d5e35bfc6ad2b4266494aef475c94cc2e6c3/src/nodrag.js#L16

Which is called here: https://github.com/d3/d3-drag/blob/ec20d5e35bfc6ad2b4266494aef475c94cc2e6c3/src/drag.js#L74 (or, I guess it could also have been this code: https://github.com/d3/d3-drag/blob/ec20d5e35bfc6ad2b4266494aef475c94cc2e6c3/src/drag.js#L55)

Basically, our test just did this:

await click('[data-test-d3-circle-element]');

Which lead it to blow up. It works if I do it manually, it seems the click listener has somehow changed to break d3. This used to work fine in 0.7.25.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
rwjbluecommented, Oct 15, 2018

Hmm. This is a tad tricky to quickly debug since there are so many changes included between 0.7.25 and 0.7.26.

My guess (from the symptoms reported) is that its related to #387 somehow. I’ll try to clone the reproduction and step through…

0reactions
rwjbluecommented, Oct 16, 2018

@ember/test-helpers 0.7.27 published 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

d3/CHANGES.md at main · d3/d3 - GitHub
Change drag.on to pass the event directly to listeners. d3-force. Add iterations argument to simulation.tick.
Read more >
7 D3 | Visualization in D3 - GitHub Pages
3 Breaking chains. We don't have to use method chaining. Here is a similar example without method chaining. (It's enough different that you...
Read more >
Updating React state prevents subsequent d3-drag touch ...
I'm using the d3-drag abstraction on a globe world map to set the rotation of the map itself, which is an svg element....
Read more >
Read D3 Tips and Tricks v3.x | Leanpub
So, we can break the file down into component parts. I'm going to play kind of fast and loose here, but never fear,...
Read more >
d3-drag - npm
Drag and drop SVG, HTML or Canvas using mouse or touch input.. Latest version: 3.0.0, last published: 2 years ago. Start using d3-drag...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found