Using Firefox and Safari, jwt.verify raises Error.capturestacktrace is not a function
See original GitHub issueI’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:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
PR was merged. It’s on v8.1.0
Thanks!