Skip to content

Commit

Permalink
Add errors 510-529
Browse files Browse the repository at this point in the history
  • Loading branch information
omrilotan committed Jun 5, 2024
1 parent c346872 commit 98e80e1
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG

## 2.0.7

- Add: 510-529
- Update existing error messages

## 2.0.6

- Add: 501-509
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-error-decoder",
"version": "2.0.6",
"version": "2.0.7",
"description": "⚛︎ Decode React minified error message",
"keywords": [
"react",
Expand Down
46 changes: 41 additions & 5 deletions src/__snapshots__/test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ Try: expect(ReactTestRenderer).unstable_toHaveYielded(expectedYields)",
"309": "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref",
"31": "Objects are not valid as a React child (found: %s). If you meant to render a collection of children, use an array instead.",
"310": "Rendered more hooks than during the previous render.",
"311": "Should have a queue. This is likely a bug in React. Please file an issue.",
"311": "Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)",
"312": "Rendered more hooks than during the previous render",
"313": "Unknown priority level. This error is likely caused by a bug in React. Please file an issue.",
"314": "Pinged unknown suspense boundary type. This is probably a bug in React.",
Expand Down Expand Up @@ -366,14 +366,24 @@ Add a <Suspense fallback=...> component higher in the tree to provide a loading
"415": "Error parsing the data. It's probably an error code or network corruption.",
"416": "This environment don't support binary chunks.",
"417": "React currently only supports piping to one writable stream.",
"418": "Hydration failed because the initial UI does not match what was rendered on the server.",
"418": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
- A server/client branch \`if (typeof window !== 'undefined')\`.
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
- Date formatting in a user's locale which doesn't match the server.
- External changing data without sending a snapshot of it along with the HTML.
- Invalid HTML tag nesting.
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
https://react.dev/link/hydration-mismatch%s",
"419": "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.",
"42": "You're trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:
%s",
"420": "ServerContext: %s already defined",
"421": "This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition.",
"422": "There was an error while hydrating this Suspense boundary. Switched to client rendering.",
"423": "There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.",
"422": "There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",
"423": "There was an error while hydrating but React was able to recover by instead client rendering the entire root.",
"424": "This root received an early update, before anything was able hydrate. Switched the entire root to client rendering.",
"425": "Text content does not match server-rendered HTML.",
"426": "A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.",
Expand Down Expand Up @@ -438,7 +448,7 @@ To handle async errors, wrap your component in an error boundary, or call the pr
"478": "Thenable should have already resolved. This is a bug in React.",
"479": "Cannot update optimistic state while rendering.",
"48": "You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.",
"480": "File/Blob fields are not yet supported in progressive forms. It probably means you are closing over binary data or FormData in a Server Action.",
"480": "File/Blob fields are not yet supported in progressive forms. Will fallback to client hydration.",
"481": "Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.",
"482": "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding \`'use client'\` to a module that was originally written for the server.",
"483": "Hooks are not supported inside an async component. This error is often caused by accidentally adding \`'use client'\` to a module that was originally written for the server.",
Expand Down Expand Up @@ -472,7 +482,33 @@ To handle async errors, wrap your component in an error boundary, or call the pr
"508": "The first argument must be a React class instance. Instead received: %s.",
"509": "ReactDOM: Unsupported Legacy Mode API.",
"51": "Cannot render markup in a worker thread. Make sure \`window\` and \`document\` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString for server rendering.",
"510": "React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options.%s",
"511": "Missing a temporary reference set but the RSC response returned a temporary reference. Pass a temporaryReference option with the set that was used with the reply.",
"512": "The RSC response contained a reference that doesn't exist in the temporary reference set. Always pass the matching set that was used to create the reply when parsing its response.",
"513": "Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider.",
"514": "Cannot access %s on the server. You cannot dot into a temporary client reference from a server component. You can only pass the value through to the client.",
"515": "Cannot assign to a temporary client reference from a server module.",
"516": "Attempted to call a temporary Client Reference from the server but it is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.",
"517": "Symbols cannot be passed to a Server Function without a temporary reference set. Pass a TemporaryReferenceSet to the options.%s",
"518": "Saw multiple hydration diff roots in a pass. This is a bug in React.",
"519": "Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React.",
"52": "Missing markup.",
"520": "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",
"521": "flushSyncWork should not be called from builds that support legacy mode. This is a bug in React.",
"522": "Invalid form element. requestFormReset must be passed a form that was rendered by React.",
"523": "The render was aborted due to being postponed.",
"524": "Values cannot be passed to next() of AsyncIterables passed to Client Components.",
"525": "A React Element from an older version of React was rendered. This is not supported. It can happen if:
- Multiple copies of the "react" package is used.
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
- A compiler tries to "inline" JSX instead of using the runtime.",
"526": "Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server.",
"527": "Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
- react: %s
- react-dom: %s
Learn more: https://react.dev/warnings/version-mismatch",
"528": "Expected <link> not to update to be updated to a stylesheet with precedence. Check the \`rel\`, \`href\`, and \`precedence\` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key.%s",
"529": "Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the \`rel\`, \`href\`, and \`precedence\` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key.%s",
"53": "Danger: Assigning to an already-occupied result index.",
"54": "Danger: Did not assign to every index of resultList.",
"55": "Danger: Expected markup to render %s nodes, but rendered %s.",
Expand Down

0 comments on commit 98e80e1

Please sign in to comment.