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.

Using Firefox and Safari, jwt.verify raises Error.capturestacktrace is not a function

See original GitHub issue

I’ve started testing my application outside of Chrome and started receiving the error regarding Error.capturestacktrace is not a function.

I have both the latest Firefox and Safari. The token verification works fine on the latest version of Chrome. This error occurs specifically after the token is expired and I attempt to verify it.

The token verification below is executed during specific route transitions on the client side. The error caused prevents me from logging inside of the verification callback.

 jwt.verify(
      token,
      secret,
      function(err, verifiedJwt) {
        if (err) {
          if (
            err.name === "TokenExpiredError" ||
            err.name === "JsonWebTokenError"
            ) {
            next("/logout");
        }
      } else {
          //Refresh token if it is not expired
          store.dispatch("REFRESH_TOKEN", token);
        }
      }
  );

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ziluvatarcommented, Oct 17, 2017

PR was merged. It’s on v8.1.0

0reactions
tsetenl2commented, Oct 18, 2017

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Error.captureStackTrace is not a function. - Wix.com
In my website, after update function, it is returning (console.log) an error - TypeError: Error.captureStackTrace is not a function.
Read more >
ERROR.captureStackTrace is not a function - Bugzilla@Mozilla
toDataURL() function is called on a canvas, a JavaScript error is generated stating: "TypeError: ERROR.captureStackTrace is not a function".
Read more >
Load serialport module in browser using browserify
In Node, the Error.captureStackTrace is a function: > typeof Error.captureStackTrace 'function'. In the browser it may also be the case:
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