-
Notifications
You must be signed in to change notification settings - Fork 870
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
[Builder.io]: Failed code evaluation: Cannot read properties of undefined (reading 'Isolate') #3048
Comments
Where are you deploying Remix? Remix encourages you to deploy to an edge runtime, which inherently does not support the If you are deploying to an edge runtime, you need to update your imports to |
I'm seeing a similar issue after moving to Gen 2 React SDK, but I'm running on Next.js v14.1 and I'm only seeing these errors locally. I'm using Node 18, so At least I'm only seeing issues locally, our preview builds on Vercel (haven't pushed Gen 2 to production yet) seem to be performing just as well as on Gen 1. @tgaribal ☝️ This is the same issue I emailed you about yesterday. |
We are deploying on fly.io using node20. I just tried to deploy the Remix project on Vercel Edge using the Vercel preset for Remix and @builder.io/sdk-react/edge. However, the result was an error: [GET] /en reason=EDGE_FUNCTION_INVOCATION_TIMEOUT, status=504, user_error=true. |
Same on Cloudflare page, with |
In my side e undefined, I think it's because of this I tried to add
inside the loader of my root.tsx but now I can't deploy to the edge :
|
We are also facing this issue with remix sdk when we migrate from 1 to 2 |
Hey folks. I wanted to provide some updates:
We are still investigating further and will let you know when we have a solution |
Hey @samijaber , I just deploy on our staging server on fly (performance@2x) the new sdk without the So, now the server is not crashing! but the performance are still not acceptable in a seo pespective... The output of the log is still the same : |
Hello, Any idea on how we can help you on this? |
Hello, any news about this? |
hey @MaximeGratens, we are currently investigating the problem and will update this issue when we have found a resolution. |
We have released v1.0.21 of the React Gen 2 SDK with a fix regarding this issue. Read the changelog carefully for details: https://github.com/BuilderIO/builder/blob/main/packages/sdks/output/react/CHANGELOG.md#1021 There is also a documentation page up explaining how to use the workaround: https://www.builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments @MaximeGratens The timeouts you were seeing were a separate issue tied to the usage of a global import { fetch as webFetch } from "@remix-run/web-fetch";
export const loader = async ({ params, request }: LoaderFunctionArgs) => {
const page = await fetchOneEntry({
/***/
fetch: webFetch,
});
//...
}; This will be thoroughly explained in our integration docs for Remix soon. I am closing this issue, but feel free to update it with any relevant information if the problem persists on your end. |
Hello @samijaber , Thank for all we migrated all our projects with the new sdk and it's far better. In production since the migration, our apps are crashing because the ram and cpu is used at 100% Also, we are still having this log and it's killing our log output : 2024-04-24T08:51:21.766 app[9080292a0d4518] cdg [info] [Builder.io]: Skipping evaluation of empty code block. EDIT: I just saw the 1.0.23 ahah! |
Hello,
For the past few weeks, we've been working with Manish to resolve an issue, but we haven't been able to determine the cause. We are using Remix.js with Node.js version 20. Locally, the performance is optimal because we're running on macOS, and the SDK does not utilize an isolated VM. The following log message appears:
[Builder.io]: Skipping the use of
isolated-vmto avoid crashes on an arm64 machine with Node v20.
However, in production, whenever Builder attempts to run in an isolated VM, it logs an error:
[Builder.io]: Failed code evaluation: Cannot read properties of undefined (reading 'Isolate') { code: 'var _virtual_index=state.resourceDropdown; return _virtual_index' }
This results in significantly slower performance on our production server.
To reproduce this issue locally, you can simulate it by replacing
const isArm64 = process.arch === 'arm64';
with
const isArm64 = process.arch === 'test';
You will observe that performance deteriorates and the error message changes. Using the NODE_OPTIONS=--no-node-snapshot flag does not mitigate the issue.
The only workaround we've found for running Builder in production involves modifying the architecture flag during deployment:
RUN grep -rli 'arm64' * | xargs -i@ sed -i 's/arm64/x64/g' @
We believe there is an incompatibility between the isolated VM and Remix.js.
We have been struggling with this issue for weeks alongside Manish...
The text was updated successfully, but these errors were encountered: