InertiaJS NS_ERROR_ILLEGAL_VALUE
- 1 Min. Read.
When developing a web app in InertiaJS I encountered an NS_ERROR_ILLEGAL_VALUE
error in the console of Firefox. This issue had me baffled, as it didn’t occur in other browsers.
I dug into the source code of Inertia to find exactly which method had been throwing this exception, and found out that the culprit was the hard limit of 640k characters in pushState / replaceState.
When you encounter this issue you get a vague NS_ERROR_ILLEGAL_VALUE
error in your console, nothing more.
Intertia could handle this exception in the setState method, and provide the developer with some insights on what could have been the issue, so I created a PR that does exactly that.
Related issues: