-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invariant Violation: 16 #5730
Comments
@developdeez I'm assuming you're using react hooks(useQuery, useMutation)? I've run into this before and it was due to having conflicting versions of react and/or react-dom. I was important a component which used |
I'm seeing this error reported via through our Sentry instance. We're not using React. Instead, we're using the Apollo Client directly. Our versions are…
|
Bumped our libs and still seeing this issue. From our package.json
Error Details
|
Also seeing this. Not using |
Invariant Violation: 47 rarely but systematically occurs since update to the latest apollo (3.1.0) |
When an invariant fails in production, a cryptic numeric error of the form `Invariant Violation: 42` is thrown, with a reference to the error codes section of invariant-packages README.md: https://github.com/apollographql/invariant-packages#error-codes This vague guidance has not proven adequate in many cases, to say the least: see apollographql/invariant-packages#18, apollographql/invariant-packages#19, #6604, However, this vague guidance (which was intended to suggest searching your installed node_modules/@apollo/client package for the error code) has not proven adequate in many cases, to say the least: see apollographql/invariant-packages#18, apollographql/invariant-packages#19, #6604, #5730, #5291, and #5975, to cite just a few of the many issues we've seen since #4521. Using error codes instead of error strings remains important for production bundle sizes, but I think we can make it substantially easier to look up the error string corresponding to each error code, by generating a single file containing all the invariant error codes for each @apollo/client release. Starting with Apollo Client 3.1.0, this manifest file can be found in @apollo/client/invariantErrorCodes.js (using an npm/yarn-installed copy of @apollo/client, since this file is generated in the ./dist directory, not checked into the repository). The file contains an explanatory comment, the @apollo/client version, and a sequential map from error numbers to the { file, node } responsible for the error.
…llographql#6665) When an invariant fails in production, a cryptic numeric error of the form `Invariant Violation: 42` is thrown, with a reference to the error codes section of invariant-packages README.md: https://github.com/apollographql/invariant-packages#error-codes This vague guidance has not proven adequate in many cases, to say the least: see apollographql/invariant-packages#18, apollographql/invariant-packages#19, apollographql#6604, However, this vague guidance (which was intended to suggest searching your installed node_modules/@apollo/client package for the error code) has not proven adequate in many cases, to say the least: see apollographql/invariant-packages#18, apollographql/invariant-packages#19, apollographql#6604, apollographql#5730, apollographql#5291, and apollographql#5975, to cite just a few of the many issues we've seen since apollographql#4521. Using error codes instead of error strings remains important for production bundle sizes, but I think we can make it substantially easier to look up the error string corresponding to each error code, by generating a single file containing all the invariant error codes for each @apollo/client release. Starting with Apollo Client 3.1.0, this manifest file can be found in @apollo/client/invariantErrorCodes.js (using an npm/yarn-installed copy of @apollo/client, since this file is generated in the ./dist directory, not checked into the repository). The file contains an explanatory comment, the @apollo/client version, and a sequential map from error numbers to the { file, node } responsible for the error.
having
|
#6665 was merged to help with troubleshooting errors like this. Thanks! |
Not much data on these types of error. Not sure why they keep happening.
The text was updated successfully, but these errors were encountered: