You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a relatively small app, but have just starting getting error in my local dev when using Sentry:
helpers.js?0b5b:112 on my home page I get - Uncaught TypeError: Cannot read properties of null (reading 'useContext'), on another page I get: TypeError: Cannot read properties of null (reading 'useEffect')
Seems that Sentry isn't liking hooks in my local dev.
This points to the following:
var sentryWrapped = function () {
var args = Array.prototype.slice.call(arguments);
// tslint:disable:no-unsafe-any
try {
// tslint:disable-next-line:strict-type-predicates
if (before && typeof before === 'function') {
before.apply(this, arguments);
}
var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });
if (fn.handleEvent) {
// Attempt to invoke user-land function
// NOTE: If you are a Sentry user, and you are seeing this stack frame, it
// means the sentry.javascript SDK caught an error invoking your application code. This
// is expected behavior and NOT indicative of a bug with sentry.javascript.
return fn.handleEvent.apply(this, wrappedArguments);
}
// Attempt to invoke user-land function
// NOTE: If you are a Sentry user, and you are seeing this stack frame, it
// means the sentry.javascript SDK caught an error invoking your application code. This
// is expected behavior and NOT indicative of a bug with sentry.javascript.
return fn.apply(this, wrappedArguments);
// tslint:enable:no-unsafe-any
}
catch (ex) {
ignoreNextOnError();
withScope(function (scope) {
scope.addEventProcessor(function (event) {
var processedEvent = __assign({}, event);
if (options.mechanism) {
addExceptionTypeValue(processedEvent, undefined, undefined);
addExceptionMechanism(processedEvent, options.mechanism);
}
processedEvent.extra = __assign({}, processedEvent.extra, { arguments: args });
return processedEvent;
});
captureException(ex);
});
// THIS IS THE LINE THROWING THE ERROR.
throw ex;
}
};
It seems to only affect local dev, which means I need to switch between regular next.config and next.config with sentry - which isn't great for DX. Has anyone else seen this error and know where it comes from? I am using nextjs13, but not the app folder. Sentry was working fine for a while, so not sure what is throwing this now. I changed something in my Tailwind config (activated JIT, but not sure why that would affect anything in Sentry...)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have a relatively small app, but have just starting getting error in my local dev when using Sentry:
helpers.js?0b5b:112 on my home page I get - Uncaught TypeError: Cannot read properties of null (reading 'useContext'), on another page I get: TypeError: Cannot read properties of null (reading 'useEffect')
Seems that Sentry isn't liking hooks in my local dev.
This points to the following:
It seems to only affect local dev, which means I need to switch between regular next.config and next.config with sentry - which isn't great for DX. Has anyone else seen this error and know where it comes from? I am using nextjs13, but not the app folder. Sentry was working fine for a while, so not sure what is throwing this now. I changed something in my Tailwind config (activated JIT, but not sure why that would affect anything in Sentry...)
All reactions