On mobile device browsers, an error gets raised from within Next on every page navigation
Unanswered
Southern African anchovy posted this in #help-forum
Southern African anchovyOP
On page load in many cases, Sentry is reporting the error "Cannot read properties of undefined (reading 'digest')" with stack trace showing this at ../../node_modules/next/dist/client/on-recoverable-error.js in the stack trace:
...
value: true
});
exports.default = onRecoverableError;
var _noSsrError = require("../shared/lib/no-ssr-error");
function onRecoverableError(err, errorInfo) {
const digest = err.digest || errorInfo.digest;
// Using default react onRecoverableError
// x-ref: https://github.com/facebook/react/blob/d4bc16a7d69eb2ea38a88c8ac0b461d5f72cdcab/packages/react-dom/src/client/ReactDOMRoot.js#L83
const defaultOnRecoverableError = typeof reportError === 'function' ? // emulating an uncaught JavaScript error.
reportError : (error)=>{
window.console.error(error);
...
It does not look like we have any control over this on the implementation side of things, so we are a little powerless here with how often it gets reported.
This has been happening since updating to Next 13
It appears that an undefined error is somehow being passed to
...
value: true
});
exports.default = onRecoverableError;
var _noSsrError = require("../shared/lib/no-ssr-error");
function onRecoverableError(err, errorInfo) {
const digest = err.digest || errorInfo.digest;
// Using default react onRecoverableError
// x-ref: https://github.com/facebook/react/blob/d4bc16a7d69eb2ea38a88c8ac0b461d5f72cdcab/packages/react-dom/src/client/ReactDOMRoot.js#L83
const defaultOnRecoverableError = typeof reportError === 'function' ? // emulating an uncaught JavaScript error.
reportError : (error)=>{
window.console.error(error);
...
It does not look like we have any control over this on the implementation side of things, so we are a little powerless here with how often it gets reported.
This has been happening since updating to Next 13
It appears that an undefined error is somehow being passed to
onRecoverableError, but it does not seem like I am able to override that behavior.