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'll get a TypeError: Converting circular structure to JSON sometimes when prerendering. This has been hard to debug, because this error happens inside a prerendering context and is impossible to get a traceback. However, from what I've been able to find out this happens when loading the prerendering context in Opal.
Also to note, I've never been able to reproduce this in development, only on our staging server...
That method (in Opal Ruby) returns either an instance of Context, or nil. I'm wondering if that is failing to convert to JSON (mini_racer converts whatever is returned to JSON) and breaking. I've monkey patched the method to always return true (since it doesn't like it anywhere relies on it returning a Context instance) and I haven't had that error since.
The text was updated successfully, but these errors were encountered:
I'll get a
TypeError: Converting circular structure to JSON
sometimes when prerendering. This has been hard to debug, because this error happens inside a prerendering context and is impossible to get a traceback. However, from what I've been able to find out this happens when loading the prerendering context in Opal.Also to note, I've never been able to reproduce this in development, only on our staging server...
But here's the ruby traceback
The JS being evaluated is
That method (in Opal Ruby) returns either an instance of Context, or nil. I'm wondering if that is failing to convert to JSON (mini_racer converts whatever is returned to JSON) and breaking. I've monkey patched the method to always return true (since it doesn't like it anywhere relies on it returning a Context instance) and I haven't had that error since.
The text was updated successfully, but these errors were encountered: