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.

Regression: Error when matching message body

See original GitHub issue

What is the expected behavior? To not crash on message body matching if body doesn’t match.

What is the actual behavior? Crashing on message body matching if message body has same count of keys, but different keys.

Possible solution Go back to using deep-equal npm package. There was a PR here that introduced custom deepEqual logic that is not good enough. If two objects have the same count of keys but not the same keys, it tries to extract the keys on undefined and crashes, making debugging hard to impossible.

How to reproduce the issue

Runkit: Link

Having problem producing a test case? Try and ask the community for help. If the test case cannot be reproduced, the Nock community might not be able to help you.

Does the bug have a test case?

Versions

Software Version(s)
Nock 11.3.2
Node 10.15.3

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
paulmelnikowcommented, Sep 12, 2019

On one hand I agree it’s better to pull in a library rather than solve problems over and over again. On the other side, a lot of what makes deep-equal complicated seems to be its focus on performance, which is not a big consideration in nock.

This particular bug was very shallow, though I’d say we should consider reverting to deep-equal if we find more subtle edge-case bugs.

/cc @mastermatt, I’d be curious your thoughts.

0reactions
nockbotcommented, Sep 12, 2019

🎉 This issue has been resolved in version 11.3.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Simple Linear Regression Error no matching methods
I am attempting to mess around with a simple autoregressive model and need to perform a simple linear regression in julia and am...
Read more >
Incorrect output is returned when you use the Linear ...
Discusses a problem in which the incorrect output is returned when you use Linear Regression (LINEST) function in Excel.
Read more >
Standard Error of the Regression vs. R-squared
The standard error of the regression and R-squared are two key goodness-of-fit measures for regression analysis. I compare these two statistics.
Read more >
Error Messages
When the TI‑84 Plus CE detects an error, it returns an error message as a menu ... MISMATCH error because the number of...
Read more >
Matching and Regression to the Mean in Difference‐in ... - NCBI
To demonstrate regression to the mean bias introduced by matching on preperiod variables in difference‐in‐differences studies.
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