Remix SDK invariant is not captured as Issue
See original GitHub issueIs there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
SDK Version
7.5.0
Framework Version
7.5.0
Link to Sentry event
https://sentry.io/organizations/netzerorg/performance/trace/7a8e8c962aa242aabb565917ff0c891c/
Steps to Reproduce
import invariant from "tiny-invariant";
export const loader: LoaderFunction = async ({ params }) => {
const user = params["*"];
invariant(user, "user is required");
const user= await getUser({ user: user});
return json({
user,
});
};
Now, navigate to a route where the user does not exist.
Expected Result
Invariant is triggered and thrown and an issue is created in sentry dashboard
Actual Result
Invariant is triggered and thrown, however sentry only receives a transaction and doesn’t flag it as an issue.
Issue Analytics
- State:
- Created a year ago
- Comments:29 (12 by maintainers)
Top Results From Across the Web
Data Loading - Remix
While loading data it's common for a record to be "not found". As soon as you know you can't render the component as...
Read more >Invariant Violation: Element type is invalid: expected a string ...
This error can rise if you try to import a non-existent component. Make sure you have no typo and that the component indeed...
Read more >Remix IDE: How to debug a contract having a function with a ...
As in your initial question, there is no constructor, there is nothing to step through. The problem is that you are not calling...
Read more >Integrate Remix with Cloudflare Pages - Jacob Paris
Miniflare does not open the browser by default. You have to opt-in by passing the --open flag, so you can just avoid doing...
Read more >Tracking Large-Scale Video Remix in Real-World ... - IEEE Xplore
“quoting” video and tracking video reuse do not exist. ... to capture the topic theme, as well as the generally understood cause, phenomena, ......
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 FreeTop 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
Top GitHub Comments
Super quick update, after further research it seems that https://github.com/getsentry/sentry-javascript/issues/5401#issuecomment-1179791517 is definitely what the
ReferenceError: name is not defined
error is about.After patching locally not only did the name error go away, the invariant triggers in sentry correctly!
My changes:
I’m going to try test this out on the deployed version and update this comment accordingly. Fingers crossed!
Update:
After applying the above change to the deployed version the
ReferenceError: name is not defined
error does not show and the invariant gets sent correctly as an issue so it’s the same result as local!However the issue mentioned earlier
Object.captureException
still remains.@AbhiPrasad yes, received! Just saw it now thanks for the bump!!