e2b-dev / e2b Goto Github PK
View Code? Open in Web Editor NEWSecure cloud runtime for AI apps & AI agents. Fully open-source.
Home Page: https://e2b.dev/docs
License: Apache License 2.0
Secure cloud runtime for AI apps & AI agents. Fully open-source.
Home Page: https://e2b.dev/docs
License: Apache License 2.0
Fix lights
Originally posted by @Alaaryad in https://github.com/Alaaryad/scaling-engine/issues/7#issuecomment-1553859489
We investigated this with @ValentaTomas and found a race condition in our infrastructure in the envd
.
There are 3 goroutines on the backend:
The last goroutine sometimes finishes faster than the first two and unsubscribes all the frontend listeners to the process.
Solved by waitgroup for the stdout and stderr → then wait for process (should not be called before pipes finish).
From SyncLinear.com | E2B-396
From SyncLinear.com | E2B-363
Describe the bug
Installing
[ ] info - Generating static pages (0/4)Error: either NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY env variables or supabaseUrl and supabaseKey are required!
To Reproduce
git clone [email protected]:e2b-dev/e2b.git
cd e2b/
nvm use 16
yarn build
warn - You have enabled experimental feature (swcPlugins) in next.config.js.
warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
info - Linting and checking validity of types
info - Creating an optimized production build
info - Compiled successfully
info - Collecting page data
[ ] info - Generating static pages (0/4)Error: either NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY env variables or supabaseUrl and supabaseKey are required!
at createBrowserSupabaseClient (/home/ubuntu/repo/e2b/node_modules/@supabase/auth-helpers-nextjs/dist/index.js:306:11)
at /home/ubuntu/repo/e2b/.next/server/pages/_app.js:197:115
at Ic (/home/ubuntu/repo/e2b/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:59:265)
at Object.useState (/home/ubuntu/repo/e2b/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:62:268)
at exports.useState (/home/ubuntu/repo/e2b/node_modules/react/cjs/react.production.min.js:25:394)
at App (/home/ubuntu/repo/e2b/.next/server/pages/_app.js:197:58)
at Wc (/home/ubuntu/repo/e2b/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44)
at Zc (/home/ubuntu/repo/e2b/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253)
at Z (/home/ubuntu/repo/e2b/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
at Zc (/home/ubuntu/repo/e2b/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:481)
Expected behavior
A build
Desktop (please complete the following information):
Environment:
We have code examples only for Python SDK and need to add the JS SDK examples
Hi there,
is it possible for this to be ran locally? I'm aware of the horrors/dangers of it but that's entirely why I want to!
thanks
I cloned and tried to start the project on my computer.
➜ projects git clone https://github.com/e2b-dev/e2b
Cloning into 'e2b'...
remote: Enumerating objects: 12039, done.
remote: Counting objects: 100% (1218/1218), done.
remote: Compressing objects: 100% (386/386), done.
remote: Total 12039 (delta 871), reused 1009 (delta 818), pack-reused 10821
Receiving objects: 100% (12039/12039), 43.44 MiB | 16.75 MiB/s, done.
Resolving deltas: 100% (8167/8167), done.
➜ projects cd e2b
➜ e2b git:(main) npm start
> [email protected] start /Users/stepo/projects/e2b
> docker compose build && (npm run db:reset || cd . && npm run db:start && docker compose up)
[+] Building 144.5s (27/38)
=> [e2b/api:latest internal] load build definition from Dockerfile 0.6s
=> => transferring dockerfile: 1.21kB 0.1s
=> [e2b/app:latest internal] load build definition from Dockerfile 1.0s
=> => transferring dockerfile: 1.04kB 0.0s
=> [e2b/api:latest internal] load .dockerignore 0.6s
=> => transferring context: 186B 0.0s
=> [e2b/app:latest internal] load .dockerignore 0.7s
=> => transferring context: 389B 0.0s
=> [e2b/api:latest internal] load metadata for docker.io/nikolaik/pyt 2.0s
=> [e2b/app:latest internal] load metadata for docker.io/library/node 1.8s
=> [e2b/app:latest internal] load build context 0.5s
=> => transferring context: 1.25MB 0.3s
=> [e2b/app:latest runner 1/5] FROM docker.io/library/node:lts-slim@ 27.4s
=> => resolve docker.io/library/node:lts-slim@sha256:77618f025144304c 0.0s
=> => sha256:77618f025144304c1e678fe27b3d67072da8ace6 1.21kB / 1.21kB 0.0s
=> => sha256:a555bf35be0a0fdc9d4ef8218b7bbeb05397a498 1.37kB / 1.37kB 0.0s
=> => sha256:47ca254e63dac631ffa3e92d51feb5d16e3fa477 7.01kB / 7.01kB 0.0s
=> => sha256:5b5fe70539cd6989aa19f25826309f9715a948 29.12MB / 29.12MB 6.6s
=> => sha256:b6b4ba8b66ef938dd20faab2757750e25471dfc6 3.35kB / 3.35kB 0.6s
=> => sha256:7164ad7f664d1f7a4fefd5edc6593037851ab9 45.99MB / 45.99MB 9.8s
=> => sha256:4aeac8a60b3be152c11cf56047295f20b19f35c4 2.74MB / 2.74MB 2.1s
=> => sha256:50cd09dcd0ffe4eebed48019bc297a4b651aedc256d1 448B / 448B 2.4s
=> => extracting sha256:5b5fe70539cd6989aa19f25826309f9715a9489cf1c05 3.7s
=> => extracting sha256:b6b4ba8b66ef938dd20faab2757750e25471dfc664924 0.0s
=> => extracting sha256:7164ad7f664d1f7a4fefd5edc6593037851ab996515c 12.7s
=> => extracting sha256:4aeac8a60b3be152c11cf56047295f20b19f35c4646ae 0.5s
=> => extracting sha256:50cd09dcd0ffe4eebed48019bc297a4b651aedc256d10 0.0s
=> [e2b/api:latest stage-1 1/12] FROM docker.io/nikolaik/python-nod 49.5s
=> => resolve docker.io/nikolaik/python-nodejs:python3.10-nodejs18-sl 0.1s
=> => sha256:5b5fe70539cd6989aa19f25826309f9715a948 29.12MB / 29.12MB 6.4s
=> => sha256:e0d8d1d843a38c15dfff43d7ed49a026aaddf62e 1.63kB / 1.63kB 0.0s
=> => sha256:f4c2cb1de449ee6c658d1035cd8cc93aa485fb47 8.95kB / 8.95kB 0.0s
=> => sha256:5e3d92572cc1017d354a178c0de533cbb05b414c 1.61kB / 1.61kB 0.0s
=> => sha256:f4b0e4004dc04711a8993bf16c12de46a97fb445 3.50MB / 3.50MB 3.3s
=> => sha256:c5424f0ac885ec615efbbae35449ca925b901c 17.43MB / 17.43MB 7.6s
=> => sha256:9d21fe1624ec14a17704060db0113fad2195119f1d4a 244B / 244B 7.7s
=> => sha256:de0194aa1c2187a0cf3ac9af8347bf734597fc25 3.37MB / 3.37MB 9.7s
=> => extracting sha256:5b5fe70539cd6989aa19f25826309f9715a9489cf1c05 3.7s
=> => sha256:6ebdd436fb631389bf78d63bf7458ef4503 123.86MB / 123.86MB 21.7s
=> => sha256:99b418d33008c6f307dbd7d5722201d2eb30500 3.31kB / 3.31kB 10.1s
=> => extracting sha256:f4b0e4004dc04711a8993bf16c12de46a97fb4451c82e 0.9s
=> => extracting sha256:c5424f0ac885ec615efbbae35449ca925b901ca2b5803 3.8s
=> => extracting sha256:9d21fe1624ec14a17704060db0113fad2195119f1d4a9 0.0s
=> => extracting sha256:de0194aa1c2187a0cf3ac9af8347bf734597fc253d3de 3.8s
=> => extracting sha256:99b418d33008c6f307dbd7d5722201d2eb30500bee385 0.0s
=> => extracting sha256:6ebdd436fb631389bf78d63bf7458ef45033c38dbf4e 22.0s
=> [e2b/api:latest internal] load build context 0.4s
=> => transferring context: 673.12kB 0.3s
=> [e2b/api:latest playground 2/9] WORKDIR /playground 12.6s
=> [e2b/app:latest runner 2/5] WORKDIR /app 12.6s
=> [e2b/api:latest playground 3/9] COPY playground/package.json playg 0.4s
=> [e2b/app:latest builder 3/7] COPY package.json package-lock.json* 0.4s
=> [e2b/api:latest playground 4/9] RUN npm ci 80.8s
=> [e2b/app:latest builder 4/7] COPY prisma/schema.prisma ./prisma/sc 0.2s
=> CANCELED [e2b/app:latest builder 5/7] RUN npm ci 100.0s
=> [e2b/api:latest stage-1 2/12] RUN poetry config virtualenvs.in-pr 4.0s
=> [e2b/api:latest stage-1 3/12] WORKDIR /app 0.1s
=> [e2b/api:latest stage-1 4/12] COPY pyproject.toml poetry.lock ./ 0.1s
=> [e2b/api:latest stage-1 5/12] RUN --mount=type=cache,target=/hom 52.8s
=> ERROR [e2b/api:latest stage-1 6/12] RUN poetry run opentelemetry 31.8s
=> [e2b/api:latest playground 5/9] COPY playground/tsconfig.json ./ 0.1s
=> [e2b/api:latest playground 6/9] COPY playground/tsoa.json ./ 0.1s
=> [e2b/api:latest playground 7/9] COPY playground/scripts/build.js . 0.1s
=> [e2b/api:latest playground 8/9] COPY playground/src ./src 0.1s
=> [e2b/api:latest playground 9/9] RUN npm run build 2.3s
------
> [e2b/api:latest stage-1 6/12] RUN poetry run opentelemetry-bootstrap -a install:
#24 3.248 instrumentation for package httpx<=0.23.0,>=0.18.0 is available but version httpx==0.23.3 is installed. Skipping.
#24 3.526 instrumentation for package starlette~=0.13.0 is available but version starlette==0.27.0 is installed. Skipping.
#24 7.510 Collecting opentelemetry-instrumentation-aws-lambda==0.39b0
#24 7.732 Downloading opentelemetry_instrumentation_aws_lambda-0.39b0-py3-none-any.whl (11 kB)
#24 7.756 Requirement already satisfied: opentelemetry-instrumentation==0.39b0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation-aws-lambda==0.39b0) (0.39b0)
#24 7.924 Collecting opentelemetry-propagator-aws-xray==1.0.1 (from opentelemetry-instrumentation-aws-lambda==0.39b0)
#24 7.965 Downloading opentelemetry_propagator_aws_xray-1.0.1-py3-none-any.whl (10 kB)
#24 7.979 Requirement already satisfied: opentelemetry-semantic-conventions==0.39b0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation-aws-lambda==0.39b0) (0.39b0)
#24 7.999 Requirement already satisfied: opentelemetry-api~=1.4 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation==0.39b0->opentelemetry-instrumentation-aws-lambda==0.39b0) (1.18.0)
#24 8.002 Requirement already satisfied: setuptools>=16.0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation==0.39b0->opentelemetry-instrumentation-aws-lambda==0.39b0) (67.8.0)
#24 8.004 Requirement already satisfied: wrapt<2.0.0,>=1.0.0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation==0.39b0->opentelemetry-instrumentation-aws-lambda==0.39b0) (1.15.0)
#24 8.022 Requirement already satisfied: deprecated>=1.2.6 in ./.venv/lib/python3.10/site-packages (from opentelemetry-api~=1.4->opentelemetry-instrumentation==0.39b0->opentelemetry-instrumentation-aws-lambda==0.39b0) (1.2.14)
#24 8.024 Requirement already satisfied: importlib-metadata~=6.0.0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-api~=1.4->opentelemetry-instrumentation==0.39b0->opentelemetry-instrumentation-aws-lambda==0.39b0) (6.0.1)
#24 8.236 Requirement already satisfied: zipp>=0.5 in ./.venv/lib/python3.10/site-packages (from importlib-metadata~=6.0.0->opentelemetry-api~=1.4->opentelemetry-instrumentation==0.39b0->opentelemetry-instrumentation-aws-lambda==0.39b0) (3.15.0)
#24 9.573 Installing collected packages: opentelemetry-propagator-aws-xray, opentelemetry-instrumentation-aws-lambda
#24 9.783 Successfully installed opentelemetry-instrumentation-aws-lambda-0.39b0 opentelemetry-propagator-aws-xray-1.0.1
#24 11.28 Collecting opentelemetry-instrumentation-dbapi==0.39b0
#24 11.50 Downloading opentelemetry_instrumentation_dbapi-0.39b0-py3-none-any.whl (10 kB)
#24 11.58 Requirement already satisfied: opentelemetry-api~=1.12 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation-dbapi==0.39b0) (1.18.0)
#24 11.58 Requirement already satisfied: opentelemetry-instrumentation==0.39b0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation-dbapi==0.39b0) (0.39b0)
#24 11.59 Requirement already satisfied: opentelemetry-semantic-conventions==0.39b0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation-dbapi==0.39b0) (0.39b0)
#24 11.60 Requirement already satisfied: wrapt<2.0.0,>=1.0.0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation-dbapi==0.39b0) (1.15.0)
#24 11.62 Requirement already satisfied: setuptools>=16.0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation==0.39b0->opentelemetry-instrumentation-dbapi==0.39b0) (67.8.0)
#24 11.65 Requirement already satisfied: deprecated>=1.2.6 in ./.venv/lib/python3.10/site-packages (from opentelemetry-api~=1.12->opentelemetry-instrumentation-dbapi==0.39b0) (1.2.14)
#24 11.65 Requirement already satisfied: importlib-metadata~=6.0.0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-api~=1.12->opentelemetry-instrumentation-dbapi==0.39b0) (6.0.1)
#24 11.82 Requirement already satisfied: zipp>=0.5 in ./.venv/lib/python3.10/site-packages (from importlib-metadata~=6.0.0->opentelemetry-api~=1.12->opentelemetry-instrumentation-dbapi==0.39b0) (3.15.0)
#24 13.30 Installing collected packages: opentelemetry-instrumentation-dbapi
#24 13.42 Successfully installed opentelemetry-instrumentation-dbapi-0.39b0
#24 15.23 Collecting opentelemetry-instrumentation-logging==0.39b0
#24 15.42 Downloading opentelemetry_instrumentation_logging-0.39b0-py2.py3-none-any.whl (12 kB)
#24 15.44 Requirement already satisfied: opentelemetry-api~=1.12 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation-logging==0.39b0) (1.18.0)
#24 15.44 Requirement already satisfied: opentelemetry-instrumentation==0.39b0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation-logging==0.39b0) (0.39b0)
#24 15.45 Requirement already satisfied: setuptools>=16.0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation==0.39b0->opentelemetry-instrumentation-logging==0.39b0) (67.8.0)
#24 15.45 Requirement already satisfied: wrapt<2.0.0,>=1.0.0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation==0.39b0->opentelemetry-instrumentation-logging==0.39b0) (1.15.0)
#24 15.47 Requirement already satisfied: deprecated>=1.2.6 in ./.venv/lib/python3.10/site-packages (from opentelemetry-api~=1.12->opentelemetry-instrumentation-logging==0.39b0) (1.2.14)
#24 15.47 Requirement already satisfied: importlib-metadata~=6.0.0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-api~=1.12->opentelemetry-instrumentation-logging==0.39b0) (6.0.1)
#24 15.57 Requirement already satisfied: zipp>=0.5 in ./.venv/lib/python3.10/site-packages (from importlib-metadata~=6.0.0->opentelemetry-api~=1.12->opentelemetry-instrumentation-logging==0.39b0) (3.15.0)
#24 16.87 Installing collected packages: opentelemetry-instrumentation-logging
#24 16.93 Successfully installed opentelemetry-instrumentation-logging-0.39b0
#24 18.59 Collecting opentelemetry-instrumentation-sqlite3==0.39b0
#24 18.79 Downloading opentelemetry_instrumentation_sqlite3-0.39b0-py3-none-any.whl (8.7 kB)
#24 18.83 Requirement already satisfied: opentelemetry-api~=1.12 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation-sqlite3==0.39b0) (1.18.0)
#24 18.83 Requirement already satisfied: opentelemetry-instrumentation-dbapi==0.39b0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation-sqlite3==0.39b0) (0.39b0)
#24 18.84 Requirement already satisfied: opentelemetry-instrumentation==0.39b0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation-sqlite3==0.39b0) (0.39b0)
#24 18.87 Requirement already satisfied: setuptools>=16.0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation==0.39b0->opentelemetry-instrumentation-sqlite3==0.39b0) (67.8.0)
#24 18.88 Requirement already satisfied: wrapt<2.0.0,>=1.0.0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation==0.39b0->opentelemetry-instrumentation-sqlite3==0.39b0) (1.15.0)
#24 18.90 Requirement already satisfied: opentelemetry-semantic-conventions==0.39b0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation-dbapi==0.39b0->opentelemetry-instrumentation-sqlite3==0.39b0) (0.39b0)
#24 18.92 Requirement already satisfied: deprecated>=1.2.6 in ./.venv/lib/python3.10/site-packages (from opentelemetry-api~=1.12->opentelemetry-instrumentation-sqlite3==0.39b0) (1.2.14)
#24 18.92 Requirement already satisfied: importlib-metadata~=6.0.0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-api~=1.12->opentelemetry-instrumentation-sqlite3==0.39b0) (6.0.1)
#24 19.03 Requirement already satisfied: zipp>=0.5 in ./.venv/lib/python3.10/site-packages (from importlib-metadata~=6.0.0->opentelemetry-api~=1.12->opentelemetry-instrumentation-sqlite3==0.39b0) (3.15.0)
#24 20.28 Installing collected packages: opentelemetry-instrumentation-sqlite3
#24 20.35 Successfully installed opentelemetry-instrumentation-sqlite3-0.39b0
#24 21.65 Collecting opentelemetry-instrumentation-urllib==0.39b0
#24 21.82 Downloading opentelemetry_instrumentation_urllib-0.39b0-py3-none-any.whl (11 kB)
#24 21.88 Requirement already satisfied: opentelemetry-api~=1.12 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation-urllib==0.39b0) (1.18.0)
#24 21.90 Requirement already satisfied: opentelemetry-instrumentation==0.39b0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation-urllib==0.39b0) (0.39b0)
#24 21.91 Requirement already satisfied: opentelemetry-semantic-conventions==0.39b0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation-urllib==0.39b0) (0.39b0)
#24 22.12 Collecting opentelemetry-util-http==0.39b0 (from opentelemetry-instrumentation-urllib==0.39b0)
#24 22.15 Downloading opentelemetry_util_http-0.39b0-py3-none-any.whl (6.7 kB)
#24 22.16 Requirement already satisfied: setuptools>=16.0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation==0.39b0->opentelemetry-instrumentation-urllib==0.39b0) (67.8.0)
#24 22.16 Requirement already satisfied: wrapt<2.0.0,>=1.0.0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-instrumentation==0.39b0->opentelemetry-instrumentation-urllib==0.39b0) (1.15.0)
#24 22.18 Requirement already satisfied: deprecated>=1.2.6 in ./.venv/lib/python3.10/site-packages (from opentelemetry-api~=1.12->opentelemetry-instrumentation-urllib==0.39b0) (1.2.14)
#24 22.18 Requirement already satisfied: importlib-metadata~=6.0.0 in ./.venv/lib/python3.10/site-packages (from opentelemetry-api~=1.12->opentelemetry-instrumentation-urllib==0.39b0) (6.0.1)
#24 22.25 Requirement already satisfied: zipp>=0.5 in ./.venv/lib/python3.10/site-packages (from importlib-metadata~=6.0.0->opentelemetry-api~=1.12->opentelemetry-instrumentation-urllib==0.39b0) (3.15.0)
#24 23.43 Installing collected packages: opentelemetry-util-http, opentelemetry-instrumentation-urllib
#24 29.49 ERROR: Could not install packages due to an OSError: [Errno 5] Input/output error
#24 29.49
#24 29.70 Traceback (most recent call last):
#24 29.70 File "/app/.venv/lib/python3.10/site-packages/opentelemetry/instrumentation/bootstrap.py", line 37, in wrapper
#24 29.70 return func(package)
#24 29.70 File "/app/.venv/lib/python3.10/site-packages/opentelemetry/instrumentation/bootstrap.py", line 53, in _sys_pip_install
#24 29.70 subprocess.check_call(
#24 29.70 File "/usr/local/lib/python3.10/subprocess.py", line 369, in check_call
#24 29.70 raise CalledProcessError(retcode, cmd)
#24 29.70 subprocess.CalledProcessError: Command '['/app/.venv/bin/python', '-m', 'pip', 'install', '-U', '--upgrade-strategy', 'only-if-needed', 'opentelemetry-instrumentation-urllib==0.39b0']' returned non-zero exit status 1.
#24 29.70
#24 29.70 During handling of the above exception, another exception occurred:
#24 29.70
#24 29.70 Traceback (most recent call last):
#24 29.70 File "/app/.venv/bin/opentelemetry-bootstrap", line 8, in <module>
#24 29.70 sys.exit(run())
#24 29.70 File "/app/.venv/lib/python3.10/site-packages/opentelemetry/instrumentation/bootstrap.py", line 161, in run
#24 29.70 cmd()
#24 29.70 File "/app/.venv/lib/python3.10/site-packages/opentelemetry/instrumentation/bootstrap.py", line 123, in _run_install
#24 29.70 _sys_pip_install(lib)
#24 29.70 File "/app/.venv/lib/python3.10/site-packages/opentelemetry/instrumentation/bootstrap.py", line 45, in wrapper
#24 29.70 raise RuntimeError(msg)
#24 29.70 RuntimeError: Error calling system command "/app/.venv/bin/python -m pip install -U --upgrade-strategy only-if-needed opentelemetry-instrumentation-urllib==0.39b0" for package "opentelemetry-instrumentation-urllib==0.39b0"
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c poetry run opentelemetry-bootstrap -a install]: exit code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 17
npm ERR! [email protected] start: `docker compose build && (npm run db:reset || cd . && npm run db:start && docker compose up)`
npm ERR! Exit status 17
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/stepo/.npm/_logs/2023-07-02T17_21_24_436Z-debug.log
Log of the incident in .npm/logs folder.
➜ _logs cat 2023-07-02T17_21_24_436Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/local/Cellar/node/20.3.0_1/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'start'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/stepo/projects/e2b/node_modules/.bin:/Users/stepo/.pyenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/stepo/.local/bin:/Users/stepo/Library/Python/3.7/bin:/usr/local/texlive/2020/bin/x86_64-darwin:/Library/TeX/texbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin
9 verbose lifecycle [email protected]~start: CWD: /Users/stepo/projects/e2b
10 silly lifecycle [email protected]~start: Args: [
10 silly lifecycle '-c',
10 silly lifecycle 'docker compose build && (npm run db:reset || cd . && npm run db:start && docker compose up)'
10 silly lifecycle ]
11 silly lifecycle [email protected]~start: Returned: code: 17 signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `docker compose build && (npm run db:reset || cd . && npm run db:start && docker compose up)`
13 verbose stack Exit status 17
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (node:events:511:28)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (node:events:511:28)
13 verbose stack at maybeClose (node:internal/child_process:1098:16)
13 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:304:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/stepo/projects/e2b
16 verbose Darwin 20.6.0
17 verbose argv "/usr/local/Cellar/node/20.3.0_1/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v20.3.0
19 verbose npm v6.14.8
20 error code ELIFECYCLE
21 error errno 17
22 error [email protected] start: `docker compose build && (npm run db:reset || cd . && npm run db:start && docker compose up)`
22 error Exit status 17
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 17, true ]
Describe the bug
Build error
To Reproduce
Steps to reproduce the behavior:
Computer: MacBook Pro (13-inch, 2018, Four Thunderbolt 3 Ports)
2,3 GHz Čtyřjádrový Intel Core i5
16 GB 2133 MHz LPDDR3
Intel Iris Plus Graphics 655 1536 MB
{"code":400,"msg":"Unsupported provider: provider is not enabled"}
Not working GitHub signin button after install and first visit.
The latest versions of both the Python and JS SDK require users to pass the API key. Our docs don't show the latest code snippets and users are confused how to pass the API key.
We need to update the docs code snippets so it's up to date with the latest SDK versions
This happens when I try to use the E2B SDK in the client component
Module not found: Can't resolve 'bufferutil' in '/Users/mlejva/Developer/oss-v0/node_modules/ws/lib'
Import trace for requested module:
./node_modules/ws/lib/buffer-util.js
./node_modules/ws/lib/websocket.js
./node_modules/ws/index.js
./node_modules/isomorphic-ws/node.js
./node_modules/rpc-websocket-client/dist/rpc-websocket-client.umd.js
./node_modules/@e2b/sdk/dist/cjs/index.js
./components/Playground.tsx
Here code of my component
'use client'
import { useEffect, useState } from 'react'
import { Session } from '@e2b/sdk'
const logger = {
debug: console.debug, // log debug messages, in default logger this is noop
info: console.info, // log info messages, in default logger this is noop
// don't forget to also specify warn & error handlers, otherwise they won't be logged when overriding the logger
warn: console.warn,
error: console.error,
}
function Playground() {
const [playground, setPlayground] = useState<Session | null>(null)
const [url, setURL] = useState<string>('')
console.log('process.env', process.env)
async function initPlayground() {
const session = await Session.create({
id: 'pTqrJ3prLCDI', // Custom env made for generating react/nextjs code
apiKey: process.env.NEXT_PUBLIC_E2B_API_KEY!,
logger,
})
setURL('https://' + session.getHostname(3000))
setPlayground(session)
}
useEffect(function init() {
initPlayground()
}, [])
return (
<div className="w-[300px] h-[150px] bg-red-500">
{url && (
<iframe
src={url}
/>
)}
</div>
)
}
export default Playground
From SyncLinear.com | E2B-345
Is your feature request related to a problem? Please describe.
I think build e2b
from source code is not easy, would you like to build an AppImage or docker image to easily run e2b
?
Describe the solution you'd like
Build AppImage and docker image, and put them on e2b repo's Release page.
Describe alternatives you've considered
None
Additional context
None
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Browser console output
Console logs from your browser's developer tool console.
Terminal commands & output
Commands you used to start the app and the terminal output.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
I asked the agent to build a Laravel model and a laravel controller for me (only for testing purposes).
His answer:
I apologize for the confusion. My main goal is to assist you in creating an Express server with a REST API. I can create a POST handler that receives a JSON request body and responds accordingly. However, I cannot create a Laravel application. If you still want me to proceed with creating an Express server, please let me know.I will proceed with creating an Express server with a REST API and a POST handler that receives a JSON request body. I will use the provided template and implement the POST handler on the route `/`.
So this is an API builder with Node, right? Maybe the readme file should be more explicit about it.
To see all bounties and learn everything about the bounty program, go HERE.
AutoGen is a framework that enables the development of LLM applications using multiple agents that can converse with each other to solve tasks. Integrating E2B means using E2B sandboxes as a runtime environment for the agents created with AutoGen.
Each integration works differently, and it's up to you to think of the necessary steps. These resources might help you better understand AutoGen and E2B.
For inspiration and to understand how the integrations may work, see:
Got a few errors from yarn during the initial clean install. Not familiar with yarn, looking for help.
Here is what I did incl. terminal output. Running on a M1
I checked the requirements first, seems fine:
Docker -v
Docker version 20.10.23, build 7155243
poetry -V
Poetry (version 1.4.2)
node -v
v18.12.1
python -V
Python 3.11.2
yarn -v
3.5.0
Then I fetch a fresh clone of the repo.
gh repo clone e2b-dev/e2b
Cloning into 'e2b'...
remote: Enumerating objects: 5913, done.
remote: Counting objects: 100% (577/577), done.
remote: Compressing objects: 100% (298/298), done.
remote: Total 5913 (delta 289), reused 522 (delta 271), pack-reused 5336
Receiving objects: 100% (5913/5913), 3.20 MiB | 9.78 MiB/s, done.
Resolving deltas: 100% (3920/3920), done.
cd e2b
Starting with the first yarn command. It has a problem and recommends to run "yarn install instead" which I did.
yarn install:all
Internal Error: ai-api@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
at q0.getCandidates (/Users/martin/.cache/node/corepack/yarn/3.5.0/yarn.js:435:5145)
at xf.getCandidates (/Users/martin/.cache/node/corepack/yarn/3.5.0/yarn.js:391:1264)
at /Users/martin/.cache/node/corepack/yarn/3.5.0/yarn.js:439:7693
at ff (/Users/martin/.cache/node/corepack/yarn/3.5.0/yarn.js:390:11070)
at ge (/Users/martin/.cache/node/corepack/yarn/3.5.0/yarn.js:439:7673)
at async Promise.allSettled (index 0)
at async to (/Users/martin/.cache/node/corepack/yarn/3.5.0/yarn.js:390:10398)
at async /Users/martin/.cache/node/corepack/yarn/3.5.0/yarn.js:439:8205
at async ti.startProgressPromise (/Users/martin/.cache/node/corepack/yarn/3.5.0/yarn.js:390:47579)
at async je.resolveEverything (/Users/martin/.cache/node/corepack/yarn/3.5.0/yarn.js:439:6233)
It has a problem and recommends to run "yarn install instead" which I did.
yarn install
➤ YN0070: Migrating from Yarn 1; automatically enabling the compatibility node-modules linker 👍
➤ YN0000: ┌ Resolution step
➤ YN0061: │ stable@npm:0.1.8 is deprecated: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
➤ YN0032: │ fsevents@npm:2.3.2: Implicit dependencies on node-gyp are discouraged
➤ YN0061: │ @npmcli/move-file@npm:2.0.1 is deprecated: This functionality has been moved to @npmcli/fs
➤ YN0032: │ bufferutil@npm:4.0.7: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ utf-8-validate@npm:5.0.10: Implicit dependencies on node-gyp are discouraged
➤ YN0002: │ @tiptap/starter-kit@npm:2.0.0-beta.220 doesn't provide @tiptap/pm (pb8aea), requested by @tiptap/core
➤ YN0002: │ @tiptap/starter-kit@npm:2.0.0-beta.220 doesn't provide @tiptap/pm (pec51a), requested by @tiptap/extension-code-block
➤ YN0002: │ @tiptap/starter-kit@npm:2.0.0-beta.220 doesn't provide @tiptap/pm (p15c05), requested by @tiptap/extension-dropcursor
➤ YN0002: │ @tiptap/starter-kit@npm:2.0.0-beta.220 doesn't provide @tiptap/pm (p4a73e), requested by @tiptap/extension-gapcursor
➤ YN0002: │ @tiptap/starter-kit@npm:2.0.0-beta.220 doesn't provide @tiptap/pm (p84589), requested by @tiptap/extension-history
➤ YN0002: │ @tiptap/starter-kit@npm:2.0.0-beta.220 doesn't provide @tiptap/pm (pc2d7d), requested by @tiptap/extension-horizontal-rule
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements for details, where is the six-letter p-prefixed code
➤ YN0000: └ Completed in 10s 470ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ yaml@npm:1.10.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs-parser@npm:21.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:17.7.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yocto-queue@npm:0.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ zustand@npm:4.3.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 0s 440ms
➤ YN0000: ┌ Link step
➤ YN0007: │ supabase@npm:1.46.5 must be built because it never has been before or the last one failed
➤ YN0007: │ @prisma/engines@npm:4.11.0 must be built because it never has been before or the last one failed
➤ YN0007: │ bufferutil@npm:4.0.7 must be built because it never has been before or the last one failed
➤ YN0007: │ es5-ext@npm:0.10.62 must be built because it never has been before or the last one failed
➤ YN0007: │ utf-8-validate@npm:5.0.10 must be built because it never has been before or the last one failed
➤ YN0007: │ prisma@npm:4.11.0 must be built because it never has been before or the last one failed
➤ YN0007: │ @prisma/client@npm:4.11.0 [556c3] must be built because it never has been before or the last one failed
➤ YN0007: │ ai-api@workspace:. must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 9s 298ms
➤ YN0000: Done with warnings in 20s 277ms
Trying to use install:all again to make sure nothing was missed.
yarn install:all
➤ YN0000: ┌ Resolution step
➤ YN0002: │ @tiptap/starter-kit@npm:2.0.0-beta.220 doesn't provide @tiptap/pm (pb8aea), requested by @tiptap/core
➤ YN0002: │ @tiptap/starter-kit@npm:2.0.0-beta.220 doesn't provide @tiptap/pm (pec51a), requested by @tiptap/extension-code-block
➤ YN0002: │ @tiptap/starter-kit@npm:2.0.0-beta.220 doesn't provide @tiptap/pm (p15c05), requested by @tiptap/extension-dropcursor
➤ YN0002: │ @tiptap/starter-kit@npm:2.0.0-beta.220 doesn't provide @tiptap/pm (p4a73e), requested by @tiptap/extension-gapcursor
➤ YN0002: │ @tiptap/starter-kit@npm:2.0.0-beta.220 doesn't provide @tiptap/pm (p84589), requested by @tiptap/extension-history
➤ YN0002: │ @tiptap/starter-kit@npm:2.0.0-beta.220 doesn't provide @tiptap/pm (pc2d7d), requested by @tiptap/extension-horizontal-rule
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements for details, where is the six-letter p-prefixed code
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed
➤ YN0000: Done with warnings in 0s 387ms
Installing dependencies from lock file
No dependencies to install or update
Installing the current project: codegen (0.1.0)
➤ YN0000: ┌ Resolution step
➤ YN0032: │ fsevents@npm:2.3.2: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ utf-8-validate@npm:5.0.10: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ bufferutil@npm:4.0.7: Implicit dependencies on node-gyp are discouraged
➤ YN0061: │ @npmcli/move-file@npm:2.0.1 is deprecated: This functionality has been moved to @npmcli/fs
➤ YN0061: │ uuid@npm:3.4.0 is deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
➤ YN0000: └ Completed in 7s 761ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ yaeti@npm:0.0.6 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yallist@npm:4.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yamljs@npm:0.3.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs-parser@npm:21.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:17.7.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 0s 267ms
➤ YN0000: ┌ Link step
➤ YN0007: │ esbuild@npm:0.17.11 must be built because it never has been before or the last one failed
➤ YN0007: │ bufferutil@npm:4.0.7 must be built because it never has been before or the last one failed
➤ YN0007: │ es5-ext@npm:0.10.62 must be built because it never has been before or the last one failed
➤ YN0007: │ utf-8-validate@npm:5.0.10 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 3s 281ms
➤ YN0000: Done with warnings in 11s 351ms
Ok, seems fine now. Let's try the next step.
yarn db:start
node:internal/errors:484
ErrorCaptureStackTrace(err);
^
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for /Users/martin/Code/e2b/node_modules/supabase/bin/supabase. Loading extensionless files is not supported inside of "type":"module" package.json contexts. The package.json file /Users/martin/Code/e2b/node_modules/supabase/package.json caused this "type":"module" context. Try changing /Users/martin/Code/e2b/node_modules/supabase/bin/supabase to have a file extension. Note the "bin" field of package.json can point to a file with an extension, for example {"type":"module","bin":{"supabase":"./bin/supabase.js"}}
at new NodeError (node:internal/errors:393:5)
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:79:11)
at defaultGetFormat (node:internal/modules/esm/get_format:121:38)
at defaultLoad (node:internal/modules/esm/load:81:20)
at nextLoad (node:internal/modules/esm/loader:163:28)
at ESMLoader.load (node:internal/modules/esm/loader:605:26)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:457:22)
at new ModuleJob (node:internal/modules/esm/module_job:63:26)
at #createModuleJob (node:internal/modules/esm/loader:480:17)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:434:34) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
Node.js v18.12.1
Got a stacktrace and no idea where I went wrong ...
Anyone got a idea how to solve this?
When you open the docs website on a mobile view with not enough vertical space and open the side menu, the "API Key", email, and "Send feedback" button overlaps the menu elements
C:\docker\e2b>yarn dev
yarn run v1.22.4
$ npx concurrently -p none "next dev" "yarn start:api" "yarn start:playground"
$ cd api-service && QUART_APP=app:app PYTHONUNBUFFERED=1 poetry run quart --debug run --reload --port 49155
$ cd api-service/playground && yarn dev
'QUART_APP' n'est pas reconnu en tant que commande interne
ou externe, un programme ex�cutable ou un fichier de commandes.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
yarn start:api exited with code 1
$ nodemon -q
'export' n'est pas reconnu en tant que commande interne
ou externe, un programme ex�cutable ou un fichier de commandes.
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from C:\docker\e2b.env
Process on port 49160 killed
warn - You have enabled experimental feature (swcPlugins) in next.config.js.
warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
event - compiled client and server successfully in 4.8s (1187 modules)
The reason is that every re-render will cause a creation of a new session
From SyncLinear.com | E2B-417
Currently we read or write all the bytes. We should change it so it writes and reads bytes in chunks
Additionally, we should consider if something like upload/download file abstraction would make sense
From SyncLinear.com | E2B-418
Several users have reported that running on Python at least 3.11.10 even the basic example
import asyncio
from os import getenv
from e2b import Session
E2B_API_KEY = getenv("E2B_API_KEY")
async def main():
session = await Session.create(id="Nodejs", api_key=E2B_API_KEY)
await session.close()
asyncio.run(main())
Produces SSL certificate error "can't validate the local issuer"
All of them were running macOS
From SyncLinear.com | E2B-359
From SyncLinear.com | E2B-365
Describe the bug
Starting the app with the README docker instructions or the local development instructions leads to "failed to fetch" on login attempts or when submitting any form like the registration form as well. Ubuntu 20, python3.11, node 16.15
No error output on chrome dev tools console
To Reproduce
Steps to reproduce the behavior:
Start the app and attempt to login
Expected behavior
Login form to be submitted correctly
This is the current message
throw new AuthenticationError('API key is required, please visit https://e2b.dev/docs to get your API key');
AuthenticationError: API key is required, please visit https://e2b.dev/docs to get your API key
We should mention that users can either pass the API key or set an environment variable. This is how OpenAI does it when you don't specify the API key
in JS SDK:
throw new Error("The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'my apiKey' }).");
^
Error: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'my apiKey' }).
in Python SDK:
No API key provided. You can set your API key in code using 'openai.api_key = <API-KEY>', or you can set the environment variable OPENAI_API_KEY=<API-KEY>). If your API key is stored in a file, you can point the openai module at it with 'openai.api_key_path = <PATH>'. You can generate API keys in the OpenAI web interface. See https://platform.openai.com/account/api-keys for details.
From SyncLinear.com | E2B-402
How do i add into the chatgpt plugins i see a E2B Server URL field when i try to install the plugin but where do i get my url? i don't see how in the docs
From SyncLinear.com | E2B-403
Describe the bug
TypeError: Failed to fetch
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
Additional context
I think this error is related with command difference between OS
'export' is not recognized as an internal or external command,
operable program or batch file.
Process on port 49160 killed
Describe the bug
Currently, API keys are stored in plain text in the browser LocalStorage API.
Concerns
Chrome extensions have access to the LocalStorage API. This means API keys can be taken and users having requests made without their knowledge. Not to mention any other data that may be stored in LocalStorage.
See: Chrome Extensions - LocalStorage
Recommendation
I would recommend storing the sensitive data in supabase since you already have an instance running. The user doesn't have to do anything on their side and you can easily use the npm package crypto similarly to this example I made below.
import crypto from 'crypto';
const algorithm = 'aes-256-ctr'
const secretKey = process?.env?.DB_ENCRYPTION_SECRET_KEY!;
export interface Hash {
iv: string;
content: string;
}
export function encrypt(text: string) {
const iv = crypto.randomBytes(16)
const cipher = crypto.createCipheriv(algorithm, secretKey, iv)
const encrypted = Buffer.concat([cipher.update(text), cipher.final()])
return {
iv: iv.toString('hex'),
content: encrypted.toString('hex')
}
}
export function decrypt(hash: Hash) {
const decipher = crypto.createDecipheriv(algorithm, secretKey, Buffer.from(hash.iv, 'hex'))
const decrypted = Buffer.concat([decipher.update(Buffer.from(hash.content, 'hex')), decipher.final()])
return decrypted.toString()
}
module.exports = {
encrypt,
decrypt
}
In order to not expose environmental variables such as the signing private key you could use a service like Doppler which has E2E encryption. This means you wouldn't need to ship the private key with the software and it would be retrieved at runtime. As long as there is an initial connection and it is retrieved it also works for future scenarios when there is no internet connection.
This is especially useful for debugging and reproducing issues
Describe the bug
I was generating an endpoint for Stripe checkout which requires relatively a lot of work. The agent was working correctly but after a while it timed out
app.listen(port, () =>DELETE /sessions/sc5lwio6-2dd8205d 204 - - 153.751 ms
[2023-04-07 21:56:47,524] ERROR in app: Exception on request POST /generate
Traceback (most recent call last):
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/quart/app.py", line 1650, in handle_request
return await self.full_dispatch_request(request_context)
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/quart/app.py", line 1675, in full_dispatch_request
result = await self.handle_user_exception(error)
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/quart/app.py", line 1107, in handle_user_exception
raise error
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/quart/app.py", line 1673, in full_dispatch_request
result = await self.dispatch_request(request_context)
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/quart/app.py", line 1718, in dispatch_request
return await self.ensure_async(handler)(**request_.view_args)
File "/Users/vasekmlejnsky/Developer/e2b/api-service/app.py", line 84, in generate
await cg.generate(
File "/Users/vasekmlejnsky/Developer/e2b/api-service/codegen/codegen.py", line 220, in generate
await self._agent_executor.arun(
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/langchain/chains/base.py", line 237, in arun
return (await self.acall(kwargs))[self.output_keys[0]]
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/langchain/chains/base.py", line 154, in acall
raise e
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/langchain/chains/base.py", line 148, in acall
outputs = await self._acall(inputs)
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/langchain/agents/agent.py", line 667, in _acall
next_step_output = await self._atake_next_step(
File "/Users/vasekmlejnsky/Developer/e2b/api-service/codegen/agent/base.py", line 90, in _atake_next_step
output = await self.agent.aplan(intermediate_steps, **inputs)
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/langchain/agents/agent.py", line 305, in aplan
action = await self._aget_next_action(full_inputs)
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/langchain/agents/agent.py", line 260, in _aget_next_action
full_output = await self.llm_chain.apredict(**full_inputs)
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/langchain/chains/llm.py", line 167, in apredict
return (await self.acall(kwargs))[self.output_key]
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/langchain/chains/base.py", line 154, in acall
raise e
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/langchain/chains/base.py", line 148, in acall
outputs = await self._acall(inputs)
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/langchain/chains/llm.py", line 135, in _acall
return (await self.aapply([inputs]))[0]
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/langchain/chains/llm.py", line 123, in aapply
response = await self.agenerate(input_list)
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/langchain/chains/llm.py", line 67, in agenerate
return await self.llm.agenerate_prompt(prompts, stop)
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/langchain/chat_models/base.py", line 106, in agenerate_prompt
raise e
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/langchain/chat_models/base.py", line 100, in agenerate_prompt
output = await self.agenerate(prompt_messages, stop=stop)
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/langchain/chat_models/base.py", line 63, in agenerate
results = await asyncio.gather(
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/langchain/chat_models/openai.py", line 287, in _agenerate
async for stream_resp in await acompletion_with_retry(
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 230, in <genexpr>
return (
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/openai/api_requestor.py", line 319, in wrap_resp
async for r in resp:
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/openai/api_requestor.py", line 633, in <genexpr>
return (
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/openai/api_requestor.py", line 114, in parse_stream_async
async for line in rbody:
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/aiohttp/streams.py", line 35, in __anext__
rv = await self.read_func()
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/aiohttp/streams.py", line 311, in readline
return await self.readuntil()
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/aiohttp/streams.py", line 343, in readuntil
await self._wait("readuntil")
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/aiohttp/streams.py", line 303, in _wait
with self._timer:
File "/Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/aiohttp/helpers.py", line 721, in __exit__
raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError
Executing <Task pending name='Task-18' coro=<ASGIHTTPConnection.handle_request() running at /Users/vasekmlejnsky/Developer/e2b/api-service/.venv/lib/python3.10/site-packages/quart/asgi.py:102> wait_for=<Future pending cb=[Task.task_wakeup()] created at /usr/local/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py:429> cb=[_wait.<locals>._on_completion() at /usr/local/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/tasks.py:475] created at /usr/local/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/tasks.py:636> took 0.394 seconds
[2023-04-07 21:56:47 +0200] [34713] [INFO] 127.0.0.1:61539 POST /generate 1.1 500 422915 214393211
Expected behavior
It shouldn't time out
Desktop (please complete the following information):
To help with documentation in the future, please use "WCAG 3" (instead of "WCAG 3.0") in most places.
Use "WCAG 3" in most cases; e.g., WCAG 3 Introduction.
Can use WCAG 3.0 for references to the TR doc.
https://www.w3.org/WAI/EO/wiki/Style#Referring_to_xxAG_.28WCAG_2.3B_singular.29
Let me know if questions or suggestions for amending that. Thanks!
Originally posted by @shawna-slh in w3c/silver#692
Model name
John Danny smith
Link
Not sure if this happens only in JS SDK or also in Python
Testing code
const session = await Session.create({
// We're working on custom environments
id: 'Nodejs', // or 'Bash', 'Python3', 'Java', 'Go', 'Rust', 'PHP', 'Perl', 'DotNET'
apiKey: process.env.E2B_API_KEY,
})
// npm init
const proc = await session.process.start({
cmd: 'playwright --version'
})
await proc.finished
console.log(proc.output.stdout)
console.log(proc.output.stderr)
await session.close()
From SyncLinear.com | E2B-328
From SyncLinear.com | E2B-366
I've been running the following script which contains for loop that starts a new sandbox, do a few operations inside the sandbox, and closes the sandbox in every iteration.
import os
from e2b import Sandbox
import time
import logging
import sys
# Set to `logging.INFO` to see less logs
logging.basicConfig(level=logging.DEBUG)
# logging.basicConfig(level=logging.INFO)
# Create logs dir
logs_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "crash_logs_" + time.strftime("%Y%m%d-%H%M%S"))
if not os.path.exists(logs_dir):
os.makedirs(logs_dir)
for i in range(0, 100):
# For every new iteration, create a new log file named `log_{i}` inside the `logs_dir` and redirect `print()` to write into that file
log_file = os.path.join(logs_dir, f"run_{i}")
print(f"\n---------------------------------------------------------------------\n\n🔸 Running iteration {i}")
f = open(log_file, "w")
sys.stdout = f
print(f"++++ ITERATION {i} ++++")
sbx = Sandbox(
on_stdout=print,
on_stderr=print,
)
print("================================================================")
print(f"SANDBOX ID = {sbx.id}")
print("================================================================\n\n")
sbx.process.start_and_wait("echo [debug test] run after potential crash")
content = sbx.filesystem.read("/etc/hosts")
print("[debug test] filesystem read", content)
print("Waiting 5 seconds...")
time.sleep(5)
sbx.close()
Note that I've been originally testing it with a sandbox template that has start_cmd
set and not the base
template I'm using here. Not sure if it affects reproducibility.
I cannot share the 100% same Python script as it's private (please ping me, I'll send it in DMs).
I've never managed to go through all 100 iterations because I keep stumbling on bugs that might be related to WebSocket and/or Python asyncio.
Here I share 3 (perhaps) different errors:
WebSocket received error while receiving messages: no close frame received or sent
Sometimes the script just hangs and prints
WebSocket received error while receiving messages: no close frame received or sent
There's no stack trace or anything else until I interrupt the execution.
WebSocket received error while receiving messages: no close frame received or sent
^CTraceback (most recent call last):
File "/Users/mlejva/Developer/multion-test/multion_test/remote_with_cmd.py", line 59, in <module>
# For every new iteration, create a new log file named `log_{i}` inside the `logs_dir` and redirect `print()` to write into that file
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mlejva/Developer/multion-test/.venv/lib/python3.11/site-packages/e2b/sandbox/process.py", line 415, in start_and_wait
).wait()
^^^^^^
File "/Users/mlejva/Developer/multion-test/.venv/lib/python3.11/site-packages/e2b/sandbox/process.py", line 172, in wait
return self._finished.result()
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mlejva/Developer/multion-test/.venv/lib/python3.11/site-packages/e2b/utils/future.py", line 22, in result
return self._future.result(timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mlejva/.pyenv/versions/3.11.4/lib/python3.11/concurrent/futures/_base.py", line 451, in result
self._condition.wait(timeout)
File "/Users/mlejva/.pyenv/versions/3.11.4/lib/python3.11/threading.py", line 320, in wait
waiter.acquire()
KeyboardInterrupt
^CException ignored in: <module 'threading' from '/Users/mlejva/.pyenv/versions/3.11.4/lib/python3.11/threading.py'>
Traceback (most recent call last):
File "/Users/mlejva/.pyenv/versions/3.11.4/lib/python3.11/threading.py", line 1553, in _shutdown
atexit_call()
File "/Users/mlejva/.pyenv/versions/3.11.4/lib/python3.11/concurrent/futures/thread.py", line 31, in _python_exit
t.join()
File "/Users/mlejva/.pyenv/versions/3.11.4/lib/python3.11/threading.py", line 1112, in join
self._wait_for_tstate_lock()
File "/Users/mlejva/.pyenv/versions/3.11.4/lib/python3.11/threading.py", line 1132, in _wait_for_tstate_lock
if lock.acquire(block, timeout):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt:
sandbox_rpc.py
process.py
in the start_and_wait()
methodDEBUG:websockets.client:< TEXT '{"jsonrpc":"2.0","method":"process_subscription...700932076337185831}}}\n' [214 bytes]
DEBUG:e2b.sandbox.websocket_client:WebSocket received message: {"jsonrpc":"2.0","method":"process_subscription","params":{"subscription":"0x29779dcdad6290f742b75a951016d4b","result":{"type":"Stdout","line":"\u003e [email protected] start","timestamp":1700932076337185831}}}
DEBUG:e2b.sandbox.sandbox_rpc:WebSocket received message: {"jsonrpc":"2.0","method":"process_subscription","params":{"subscription":"0x29779dcdad6290f742b75a951016d4b","result":{"type":"Stdout","line":"\u003e [email protected] start","timestamp":1700932076337185831}}}
DEBUG:e2b.sandbox.sandbox_rpc:Processing message: {"jsonrpc":"2.0","method":"process_subscription","params":{"subscription":"0x29779dcdad6290f742b75a951016d4b","result":{"type":"Stdout","line":"\u003e [email protected] start","timestamp":1700932076337185831}}}
DEBUG:e2b.sandbox.sandbox_rpc:Current waiting handlers: []
DEBUG:e2b.sandbox.sandbox_connection:Notification method='process_subscription' params={'subscription': '0x29779dcdad6290f742b75a951016d4b', 'result': {'type': 'Stdout', 'line': '> [email protected] start', 'timestamp': 1700932076337185831}}
> [email protected] start
DEBUG:websockets.client:< TEXT '{"jsonrpc":"2.0","method":"process_subscription...700932076342490572}}}\n' [206 bytes]
DEBUG:e2b.sandbox.websocket_client:WebSocket received message: {"jsonrpc":"2.0","method":"process_subscription","params":{"subscription":"0x29779dcdad6290f742b75a951016d4b","result":{"type":"Stdout","line":"\u003e node src/server.js","timestamp":1700932076342490572}}}
DEBUG:e2b.sandbox.sandbox_rpc:WebSocket received message: {"jsonrpc":"2.0","method":"process_subscription","params":{"subscription":"0x29779dcdad6290f742b75a951016d4b","result":{"type":"Stdout","line":"\u003e node src/server.js","timestamp":1700932076342490572}}}
DEBUG:e2b.sandbox.sandbox_rpc:Processing message: {"jsonrpc":"2.0","method":"process_subscription","params":{"subscription":"0x29779dcdad6290f742b75a951016d4b","result":{"type":"Stdout","line":"\u003e node src/server.js","timestamp":1700932076342490572}}}
DEBUG:e2b.sandbox.sandbox_rpc:Current waiting handlers: []
DEBUG:e2b.sandbox.sandbox_connection:Notification method='process_subscription' params={'subscription': '0x29779dcdad6290f742b75a951016d4b', 'result': {'type': 'Stdout', 'line': '> node src/server.js', 'timestamp': 1700932076342490572}}
> node src/server.js
DEBUG:websockets.client:< TEXT '{"jsonrpc":"2.0","method":"process_subscription...700932076344906377}}}\n' [270 bytes]
DEBUG:e2b.sandbox.websocket_client:WebSocket received message: {"jsonrpc":"2.0","method":"process_subscription","params":{"subscription":"0x29779dcdad6290f742b75a951016d4b","result":{"type":"Stdout","line":"Error loading browser polyfill: This script should only be loaded in a browser extension.","timestamp":1700932076344906377}}}
DEBUG:e2b.sandbox.sandbox_rpc:WebSocket received message: {"jsonrpc":"2.0","method":"process_subscription","params":{"subscription":"0x29779dcdad6290f742b75a951016d4b","result":{"type":"Stdout","line":"Error loading browser polyfill: This script should only be loaded in a browser extension.","timestamp":1700932076344906377}}}
DEBUG:e2b.sandbox.sandbox_rpc:Processing message: {"jsonrpc":"2.0","method":"process_subscription","params":{"subscription":"0x29779dcdad6290f742b75a951016d4b","result":{"type":"Stdout","line":"Error loading browser polyfill: This script should only be loaded in a browser extension.","timestamp":1700932076344906377}}}
DEBUG:e2b.sandbox.sandbox_rpc:Current waiting handlers: []
DEBUG:e2b.sandbox.sandbox_connection:Notification method='process_subscription' params={'subscription': '0x29779dcdad6290f742b75a951016d4b', 'result': {'type': 'Stdout', 'line': 'Error loading browser polyfill: This script should only be loaded in a browser extension.', 'timestamp': 1700932076344906377}}
Error loading browser polyfill: This script should only be loaded in a browser extension.
DEBUG:websockets.client:! failing connection with code 1006
DEBUG:websockets.client:= connection is CLOSED
ERROR:e2b.sandbox.websocket_client:WebSocket received error while receiving messages: no close frame received or sent
DEBUG:e2b.sandbox.sandbox_connection:Refreshed sandbox iwt6buod9j5q04hxuawch
DEBUG:e2b.sandbox.sandbox_connection:Refreshed sandbox iwt6buod9j5q04hxuawch
DEBUG:e2b.sandbox.sandbox_connection:Refreshed sandbox iwt6buod9j5q04hxuawch
DEBUG:e2b.sandbox.sandbox_connection:Refreshed sandbox iwt6buod9j5q04hxuawch
DEBUG:e2b.sandbox.sandbox_connection:Refreshed sandbox iwt6buod9j5q04hxuawch
200
{"result":{"url":"https://www.google.com/maps/reserve/v/dine/c/jMYMLG1gaPs?source=pa&opi=79508299&hl=en-US&gei=9CliZfWPAYLz0PEP66qDsAI&sourceurl=http://www.google.com/service/MapsSearchService/Search?authuser%3D0%26gl%3Dus%26hl%3Den%26q%3DRoma%2BMenlo%2BPark%26tbm%3Dmap","screenshot":"","message":"COMMANDS:\nCLICK 25\n\nEXPLANATION: I am clicking on the \"Reserve a table\" link for the restaurant \"Roma\" at Menlo Park on Google Maps.\n\nSTATUS: DONE","status":"DONE","spots":{"status":"Not in google reserve page"},"bookingUrl":""}}
DEBUG:e2b.sandbox.sandbox_connection:Refreshed sandbox iwt6buod9j5q04hxuawch
INFO:e2b.sandbox.process:Starting process: echo run after potential crash
DEBUG:e2b.sandbox.sandbox_rpc:WebSocket queueing message: {"jsonrpc": "2.0", "method": "process_subscribe", "params": ["onExit", "2o1JSOe54yv6"], "id": 5}
DEBUG:e2b.sandbox.sandbox_rpc:WebSocket waiting for reply: {"jsonrpc": "2.0", "method": "process_subscribe", "params": ["onExit", "2o1JSOe54yv6"], "id": 5}
DEBUG:e2b.sandbox.websocket_client:WebSocket message to send: {"jsonrpc": "2.0", "method": "process_subscribe", "params": ["onExit", "2o1JSOe54yv6"], "id": 5}
DEBUG:e2b.sandbox.sandbox_connection:Refreshed sandbox iwt6buod9j5q04hxuawch
DEBUG:e2b.sandbox.sandbox_connection:Refreshed sandbox iwt6buod9j5q04hxuawch
DEBUG:e2b.sandbox.sandbox_connection:Refreshed sandbox iwt6buod9j5q04hxuawch
DEBUG:e2b.sandbox.sandbox_connection:Refreshed sandbox iwt6buod9j5q04hxuawch
INFO:e2b.sandbox.sandbox_connection:Stopped refreshing sandbox (id: iwt6buod9j5q04hxuawch)
INFO:e2b.sandbox.sandbox_connection:Closing sandbox dgsjmz6k2iw0l8w8hkwo (id: iwt6buod9j5q04hxuawch)
INFO:e2b.sandbox.websocket_client:WebSocket stopped
DEBUG:e2b.sandbox.sandbox_rpc:WebSocket received sign to stop.
ERROR:e2b.sandbox.sandbox_rpc:WebSocket received error while waiting for: {"jsonrpc": "2.0", "method": "process_subscribe", "params": ["onExit", "2o1JSOe54yv6"], "id": 5}
DEBUG:e2b.sandbox.sandbox_rpc:WebSocket removed waiting handler for 5
Traceback (most recent call last):
File "/Users/mlejva/Developer/multion-test/multion_test/remote.py", line 72, in <module>
ERROR:asyncio:Task was destroyed but it is pending!
task: <Task pending name='Task-17' coro=<<async_generator_athrow without __name__>()>>
sbx.process.start_and_wait("echo run after potential crash")
File "/Users/mlejva/Developer/multion-test/.venv/lib/python3.11/site-packages/e2b/sandbox/process.py", line 406, in start_and_wait
return self.start(
^^^^^^^^^^^
File "/Users/mlejva/Developer/multion-test/.venv/lib/python3.11/site-packages/e2b/sandbox/process.py", line 298, in start
self._sandbox._subscribe(
File "/Users/mlejva/Developer/multion-test/.venv/lib/python3.11/site-packages/e2b/sandbox/sandbox_connection.py", line 337, in _subscribe
sub_id = self._call(service, "subscribe", [method, *params], timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mlejva/Developer/multion-test/.venv/lib/python3.11/site-packages/e2b/sandbox/sandbox_connection.py", line 287, in _call
return self._rpc.send_message(f"{service}_{method}", params, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mlejva/Developer/multion-test/.venv/lib/python3.11/site-packages/e2b/sandbox/sandbox_rpc.py", line 147, in send_message
raise e
File "/Users/mlejva/Developer/multion-test/.venv/lib/python3.11/site-packages/e2b/sandbox/sandbox_rpc.py", line 138, in send_message
r = future_reply.result(timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mlejva/Developer/multion-test/.venv/lib/python3.11/site-packages/e2b/utils/future.py", line 22, in result
return self._future.result(timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mlejva/.pyenv/versions/3.11.4/lib/python3.11/concurrent/futures/_base.py", line 454, in result
raise CancelledError()
concurrent.futures._base.CancelledError
From SyncLinear.com | E2B-435
I enabled debug logs for the JS SDK as written here https://e2b.dev/docs/getting-started/sdk-logging but because I don't know how the debug logs look like I'm not sure if they're just not working or nothing should being logged
From SyncLinear.com | E2B-346
From SyncLinear.com | E2B-361
Describe the bug
I followed the setup instructions. When running on localhost /settings
works but /
doesn't.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I'm expecting to see some sort of welcome UI instead of a 500
Browser console output
A client-side exception has occurred, see here for more info
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Terminal commands & output
e2b-app-1 | prisma:warn Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-1.1.x".
e2b-app-1 | Please manually install OpenSSL via apt-get update -y && apt-get install -y openssl
and try installing Prisma again. If you're running Prisma on Docker, you may also try to replace your base image with node:lts-slim
, which already ships with OpenSSL installed.
e2b-app-1 | Error: Command failed with exit code 127: /app/node_modules/.prisma/client/query-engine-debian-openssl-1.1.x --enable-raw-queries cli dmmf
e2b-app-1 | /app/node_modules/.prisma/client/query-engine-debian-openssl-1.1.x: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
e2b-app-1 | at makeError (/app/node_modules/@prisma/client/runtime/binary.js:14:57)
e2b-app-1 | at handlePromise (/app/node_modules/@prisma/client/runtime/binary.js:14:11276)
e2b-app-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
e2b-app-1 | at async Wi._getDmmf (/app/node_modules/@prisma/client/runtime/binary.js:160:2387)
e2b-app-1 | at async /app/node_modules/@prisma/client/runtime/binary.js:235:2875
e2b-app-1 | at async /app/node_modules/@prisma/client/runtime/binary.js:235:3305
e2b-app-1 | at async t._executeRequest (/app/node_modules/@prisma/client/runtime/binary.js:235:10764)
e2b-app-1 | at async t._request (/app/node_modules/@prisma/client/runtime/binary.js:235:10493)
e2b-app-1 | at async /app/.next/server/pages/index.js:217:18 {
e2b-app-1 | shortMessage: 'Command failed with exit code 127: /app/node_modules/.prisma/client/query-engine-debian-openssl-1.1.x --enable-raw-queries cli dmmf',
Screenshots
https://github.com/e2b-dev/e2b/assets/8325094/86f5667c-1164-444c-890a-605c05aa42ae
Desktop (please complete the following information):
Additional context
I did change my Supabase keys to the ones generated after running npm run db:start
Describe the bug
The build process stops at step 7 out of 7, which is running the command "npm run build". The error message indicates that the build process failed because of a Webpack error.
The specific error message indicates that the module 'components/Editor/Template/NodeJSExpressTemplate/useInstruction' cannot be resolved. This suggests that there may be an issue with the file path or module installation.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Docker file built successfully.
Browser console output
docker build -t code_agent .
[+] Building 78.4s (11/14)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 307B 0.0s
=> [internal] load metadata for docker.io/library/node:lts-slim 1.0s
=> [runner 1/5] FROM docker.io/library/node:lts-slim@sha256:b8a9ad50d8833a2aede22170a517e64c79776e9145811d7f6649 0.0s
=> [internal] load build context 0.2s
=> => transferring context: 8.22MB 0.1s
=> CACHED [runner 2/5] WORKDIR /app 0.0s
=> [builder 3/7] COPY package.json package-lock.json* ./ 0.1s
=> [builder 4/7] COPY prisma/schema.prisma ./prisma/schema.prisma 0.0s
=> [builder 5/7] RUN npm ci 66.6s
=> [builder 6/7] COPY . . 0.1s
=> ERROR [builder 7/7] RUN npm run build 10.3s
------
> [builder 7/7] RUN npm run build:
#11 0.902
#11 0.902 > [email protected] build
#11 0.902 > next build
#11 0.902
#11 1.489 warn - You have enabled experimental feature (swcPlugins) in next.config.js.
#11 1.490 warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
#11 1.490
#11 1.618 info - Skipping validation of types
#11 1.618 info - Skipping linting
#11 2.023 info - Creating an optimized production build...
#11 10.22 Failed to compile.
#11 10.22
#11 10.22 ./components/Editor/Template/NodeJSExpressTemplate/Instructions.tsx
#11 10.22 Module not found: Can't resolve 'components/Editor/Template/NodeJSExpressTemplate/useInstruction'
#11 10.22
#11 10.22 https://nextjs.org/docs/messages/module-not-found
#11 10.22
#11 10.22 Import trace for requested module:
#11 10.22 ./components/Editor/Template/NodeJSExpressTemplate/index.tsx
#11 10.22 ./state/template.tsx
#11 10.22 ./state/store.ts
#11 10.22 ./state/StoreProvider.tsx
#11 10.22 ./pages/[projectID].tsx
#11 10.22
#11 10.22
#11 10.22 > Build failed because of webpack errors
Terminal commands & output
See "steps to reproduce"
Screenshots
n/a
Desktop (please complete the following information):
Smartphone (please complete the following information):
n/a
Additional context
Add any other context about the problem here.
Hey guys,
first of all thank you for the work.
I´ve tried it out but i´m getting some errors after starting everything with yarn dev:
When i´m trying to login i´ll get the message: Failed to fetch
yarn run v1.22.19
$ npx concurrently -p none "next dev" "yarn start:api" "yarn start:playground"
$ cd api-service && QUART_APP=app:app PYTHONUNBUFFERED=1 poetry run quart --debug run --reload --port 49155
$ cd api-service/playground && yarn dev
$ concurrently "nodemon -q" "nodemon --config nodemon-tsoa.json "
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from /home/debian-dev/e2b/e2b/.env
warn - You have enabled experimental feature (swcPlugins) in next.config.js.
warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
[1] [nodemon] 2.0.21
[1] [nodemon] to restart at any time, enter `rs`
[1] [nodemon] watching path(s): src/**/*Controller.ts
[1] [nodemon] watching extensions: ts
[1] [nodemon] starting `tsoa spec-and-routes`
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/codegen-gAr6YSV0-py3.9/bin/quart", line 8, in <module>
sys.exit(main())
File "/root/.cache/pypoetry/virtualenvs/codegen-gAr6YSV0-py3.9/lib/python3.9/site-packages/quart/cli.py", line 771, in main
cli.main()
File "/root/.cache/pypoetry/virtualenvs/codegen-gAr6YSV0-py3.9/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/root/.cache/pypoetry/virtualenvs/codegen-gAr6YSV0-py3.9/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/root/.cache/pypoetry/virtualenvs/codegen-gAr6YSV0-py3.9/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/root/.cache/pypoetry/virtualenvs/codegen-gAr6YSV0-py3.9/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/root/.cache/pypoetry/virtualenvs/codegen-gAr6YSV0-py3.9/lib/python3.9/site-packages/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/root/.cache/pypoetry/virtualenvs/codegen-gAr6YSV0-py3.9/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/root/.cache/pypoetry/virtualenvs/codegen-gAr6YSV0-py3.9/lib/python3.9/site-packages/quart/cli.py", line 656, in run_command
app = info.load_app()
File "/root/.cache/pypoetry/virtualenvs/codegen-gAr6YSV0-py3.9/lib/python3.9/site-packages/quart/cli.py", line 245, in load_app
app = locate_app(import_name, name)
File "/root/.cache/pypoetry/virtualenvs/codegen-gAr6YSV0-py3.9/lib/python3.9/site-packages/quart/cli.py", line 175, in locate_app
module = import_module(module_name)
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/home/debian-dev/e2b/e2b/api-service/app.py", line 11, in <module>
from codegen import Codegen
File "/home/debian-dev/e2b/e2b/api-service/codegen/__init__.py", line 1, in <module>
from .codegen import Codegen
File "/home/debian-dev/e2b/e2b/api-service/codegen/codegen.py", line 19, in <module>
from session.env import EnvVar
File "/home/debian-dev/e2b/e2b/api-service/session/__init__.py", line 1, in <module>
from .playground.nodejs import NodeJSPlayground
File "/home/debian-dev/e2b/e2b/api-service/session/playground/__init__.py", line 1, in <module>
from .base import Playground
File "/home/debian-dev/e2b/e2b/api-service/session/playground/base.py", line 18, in <module>
class Playground(Session):
File "/home/debian-dev/e2b/e2b/api-service/session/playground/base.py", line 47, in Playground
timeout: float | None = None,
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
yarn start:api exited with code 1
[0] Listening at http://localhost:49160
event - compiled client and server successfully in 5.1s (1189 modules)
[1] [nodemon] clean exit - waiting for changes before restart
wait - compiling /_error (client and server)...
event - compiled client and server successfully in 993 ms (1190 modules)
warn - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
wait - compiling /sign (client and server)...
event - compiled client and server successfully in 1443 ms (1199 modules)
warn - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
[0] Listening at http://localhost:49160
wait - compiling /[projectID] (client and server)...
event - compiled client and server successfully in 2.4s (1765 modules)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.