SuperAGI
SuperAGI copied to clipboard
SuperAGI Stuck at "Initializing.." in browser
Can you check if you've enabled "ENV: DEV" in your config.yaml? Also try refreshing once, if you haven't.
Neither work
I realize that's not helpful. Neither dev nor prod work, as both cases seems to result in it getting stuck at the file webpack-hmr
, where the dev console says something about websocket.js(76)
, double clicking on it to see stack trace:
<div id="mount"><div class="network-monitor"><div><div class="monitor-panel"><span id="netmonitor-toolbar-container"><span class="devtools-toolbar devtools-input-toolbar"></span></span></div></div></div></div><span id="netmonitor-toolbar-container"><span class="devtools-toolbar devtools-input-toolbar"><span class="devtools-separator"></span><div class="devtools-searchbox"><input class="devtools-filterinput" placeholder="Filter URLs" type="search" value=""><a class="devtools-button learn-more-link" title="Learn more about filtering"></a></div><span class="devtools-separator"></span></span></span><span id="netmonitor-toolbar-container"><span class="devtools-toolbar devtools-input-toolbar"><span class="devtools-separator"></span><div class="requests-list-filter-buttons"></div></span></span><span id="netmonitor-toolbar-container"><span class="devtools-toolbar devtools-input-toolbar"><span class="devtools-separator"></span><label class="devtools-checkbox-label devtools-cache-checkbox" title="Disable HTTP cache"><input id="devtools-cache-checkbox" class="devtools-checkbox" type="checkbox">Disable Cache</label><span class="devtools-separator"></span></span></span><span id="netmonitor-toolbar-container"><span class="devtools-toolbar devtools-input-toolbar"><span class="devtools-separator"></span></span></span><div class="uncontrolled" role="presentation"><div class="split-box vert devtools-responsive-container" style="--split-box-controlled-panel-size: 550;"><div class="uncontrolled" role="presentation"><div class="request-list-container"><div class="requests-list-scroll" style="width: 1070px; height: 241px;">
<div class="requests-list-scroll" style="width: 1070px; height: 241px;"><div class="requests-list-anchor"></div></div><div class="devtools-toolbar devtools-toolbar-bottom"></div><div class="uncontrolled" role="presentation"><div class="split-box vert devtools-responsive-container" style="--split-box-controlled-panel-size: 550;"><div class="uncontrolled" role="presentation"><div class="request-list-container"><div class="devtools-toolbar devtools-toolbar-bottom"><div class="status-bar-label requests-list-network-summary-count" title="Number of requests">18 requests</div><div class="status-bar-label requests-list-network-summary-transfer" title="Size/transferred size of all requests">10.29 MB / 2.30 MB transferred</div><div class="status-bar-label requests-list-network-summary-finish" title="Total time needed to load all requests">Finish: 42.93 s</div><div class="status-bar-label dom-content-loaded" title="Time when “DOMContentLoad” event occurred">DOMContentLoaded: 581 ms</div><div class="status-bar-label load" title="Time when “load” event occurred">load: 1.83 s</div></div></div></div></div></div><div role="presentation" style="flex: 0 0 1px;" class="splitter"></div><div class="controlled" style="max-width: 80%; min-width: 50px; width: 550px;" role="presentation"><div class="network-details-bar"><div class="devtools-sidebar-tabs"><div class="tabs "><nav class="tabs-navigation"></nav></div></div></div></div><li class="tabs-menu-item panel-with-code " role="presentation"><span class="devtools-tab-line"></span></li><span class="devtools-tab-line"></span><span class="devtools-tab-line"></span><span class="devtools-tab-line"></span><span class="devtools-tab-line"></span><span class="devtools-tab-line"></span><div id="mount"><div class="network-monitor"><div><div class="monitor-panel"><div class="split-box vert devtools-responsive-container" style="--split-box-controlled-panel-size: 550;"><div class="controlled" style="max-width: 80%; min-width: 50px; width: 550px;" role="presentation"><div class="network-details-bar"><div class="devtools-sidebar-tabs"><div class="tabs "><div class="panels"><div id="stack-trace-panel" style="visibility: visible; height: 100%;" class="tab-panel-box" role="tabpanel" aria-labelledby="stack-trace-tab"><div class="tab-panel panel-with-code"><div class="panel-container"><div class="stack-trace"> <span data-url="webpack://_N_E/node_modules/next/dist/client/dev/error-overlay/websocket.js" class="frame-link" data-line="80" data-column="17"><span class="frame-link-function-display-name">init</span> <a class="frame-link-source" title="View source in Debugger → webpack://_N_E/node_modules/next/dist/client/dev/error-overlay/websocket.js:80:17" href="webpack://_N_E/node_modules/next/dist/client/dev/error-overlay/websocket.js?a9be" draggable="false"><span class="frame-link-filename">websocket.js</span><span class="frame-link-line">:80:17</span></a></span>
<span data-url="webpack://_N_E/node_modules/next/dist/client/dev/error-overlay/websocket.js" class="frame-link" data-line="85" data-column="4"><span class="frame-link-function-display-name">connectHMR</span> <a class="frame-link-source" title="View source in Debugger → webpack://_N_E/node_modules/next/dist/client/dev/error-overlay/websocket.js:85:4" href="webpack://_N_E/node_modules/next/dist/client/dev/error-overlay/websocket.js?a9be" draggable="false"><span class="frame-link-filename">websocket.js</span><span class="frame-link-line">:85:4</span></a></span>
<span data-url="webpack://_N_E/node_modules/next/dist/client/next-dev.js" class="frame-link" data-line="44" data-column="31"><span class="frame-link-function-display-name"><anonymous></span> <a class="frame-link-source" title="View source in Debugger → webpack://_N_E/node_modules/next/dist/client/next-dev.js:44:31" href="webpack://_N_E/node_modules/next/dist/client/next-dev.js?3515" draggable="false"><span class="frame-link-filename">next-dev.js</span><span class="frame-link-line">:44:31</span></a></span>
<span class="frame-link-async-cause">(Async: promise callback)</span>
<span data-url="webpack://_N_E/node_modules/next/dist/client/next-dev.js" class="frame-link" data-line="42" data-column="3"><span class="frame-link-function-display-name"><anonymous></span> <a class="frame-link-source" title="View source in Debugger → webpack://_N_E/node_modules/next/dist/client/next-dev.js:42:3" href="webpack://_N_E/node_modules/next/dist/client/next-dev.js?3515" draggable="false"><span class="frame-link-filename">next-dev.js</span><span class="frame-link-line">:42:3</span></a></span>
<span data-url="http://jedi-temple:12000/_next/static/chunks/main.js" class="frame-link" data-line="181" data-column="1"><span class="frame-link-function-display-name">./node_modules/next/dist/client/next-dev.js</span> <a class="frame-link-source" title="View source in Debugger → http://jedi-temple:12000/_next/static/chunks/main.js:181:1" href="http://jedi-temple:12000/_next/static/chunks/main.js?ts=1686643938518" draggable="false"><span class="frame-link-filename">http://jedi-temple:12000/_next/static/chunks/main.js</span><span class="frame-link-line">:181:1</span></a></span>
<span data-url="http://jedi-temple:12000/_next/static/chunks/webpack.js" class="frame-link" data-line="692" data-column="31"><span class="frame-link-function-display-name">options.factory</span> <a class="frame-link-source" title="View source in Debugger → http://jedi-temple:12000/_next/static/chunks/webpack.js:692:31" href="http://jedi-temple:12000/_next/static/chunks/webpack.js?ts=1686643938518" draggable="false"><span class="frame-link-filename">http://jedi-temple:12000/_next/static/chunks/webpack.js</span><span class="frame-link-line">:692:31</span></a></span>
<span data-url="http://jedi-temple:12000/_next/static/chunks/webpack.js" class="frame-link" data-line="37" data-column="33"><span class="frame-link-function-display-name">__webpack_require__</span> <a class="frame-link-source" title="View source in Debugger → http://jedi-temple:12000/_next/static/chunks/webpack.js:37:33" href="http://jedi-temple:12000/_next/static/chunks/webpack.js?ts=1686643938518" draggable="false"><span class="frame-link-filename">http://jedi-temple:12000/_next/static/chunks/webpack.js</span><span class="frame-link-line">:37:33</span></a></span>
<span data-url="http://jedi-temple:12000/_next/static/chunks/main.js" class="frame-link" data-line="1182" data-column="61"><span class="frame-link-function-display-name">__webpack_exec__</span> <a class="frame-link-source" title="View source in Debugger → http://jedi-temple:12000/_next/static/chunks/main.js:1182:61" href="http://jedi-temple:12000/_next/static/chunks/main.js?ts=1686643938518" draggable="false"><span class="frame-link-filename">http://jedi-temple:12000/_next/static/chunks/main.js</span><span class="frame-link-line">:1182:61</span></a></span>
<span data-url="http://jedi-temple:12000/_next/static/chunks/main.js" class="frame-link" data-line="1183" data-column="53"><span class="frame-link-function-display-name"><anonymous></span> <a class="frame-link-source" title="View source in Debugger → http://jedi-temple:12000/_next/static/chunks/main.js:1183:53" href="http://jedi-temple:12000/_next/static/chunks/main.js?ts=1686643938518" draggable="false"><span class="frame-link-filename">http://jedi-temple:12000/_next/static/chunks/main.js</span><span class="frame-link-line">:1183:53</span></a></span>
<span data-url="http://jedi-temple:12000/_next/static/chunks/webpack.js" class="frame-link" data-line="1364" data-column="46"><span class="frame-link-function-display-name">webpackJsonpCallback</span> <a class="frame-link-source" title="View source in Debugger → http://jedi-temple:12000/_next/static/chunks/webpack.js:1364:46" href="http://jedi-temple:12000/_next/static/chunks/webpack.js?ts=1686643938518" draggable="false"><span class="frame-link-filename">http://jedi-temple:12000/_next/static/chunks/webpack.js</span><span class="frame-link-line">:1364:46</span></a></span>
<span data-url="http://jedi-temple:12000/_next/static/chunks/main.js" class="frame-link" data-line="9" data-column="61"><span class="frame-link-function-display-name"><anonymous></span> <a class="frame-link-source" title="View source in Debugger → http://jedi-temple:12000/_next/static/chunks/main.js:9:61" href="http://jedi-temple:12000/_next/static/chunks/main.js?ts=1686643938518" draggable="false"><span class="frame-link-filename">http://jedi-temple:12000/_next/static/chunks/main.js</span><span class="frame-link-line">:9:61</span></a></span>
</div></div></div></div></div></div></div></div></div></div></div></div></div></div>
Disable Cache
18 requests
10.29 MB / 2.30 MB transferred
Finish: 42.93 s
DOMContentLoaded: 581 ms
load: 1.83 s
init
[websocket.js:80:17](webpack://_N_E/node_modules/next/dist/client/dev/error-overlay/websocket.js?a9be)
connectHMR
[websocket.js:85:4](webpack://_N_E/node_modules/next/dist/client/dev/error-overlay/websocket.js?a9be)
<anonymous>
[next-dev.js:44:31](webpack://_N_E/node_modules/next/dist/client/next-dev.js?3515)
(Async: promise callback) <anonymous>
[next-dev.js:42:3](webpack://_N_E/node_modules/next/dist/client/next-dev.js?3515)
./node_modules/next/dist/client/next-dev.js
[http://jedi-temple:12000/_next/static/chunks/main.js:181:1](http://jedi-temple:12000/_next/static/chunks/main.js?ts=1686643938518)
options.factory
[http://jedi-temple:12000/_next/static/chunks/webpack.js:692:31](http://jedi-temple:12000/_next/static/chunks/webpack.js?ts=1686643938518)
__webpack_require__
[http://jedi-temple:12000/_next/static/chunks/webpack.js:37:33](http://jedi-temple:12000/_next/static/chunks/webpack.js?ts=1686643938518)
__webpack_exec__
[http://jedi-temple:12000/_next/static/chunks/main.js:1182:61](http://jedi-temple:12000/_next/static/chunks/main.js?ts=1686643938518)
<anonymous>
[http://jedi-temple:12000/_next/static/chunks/main.js:1183:53](http://jedi-temple:12000/_next/static/chunks/main.js?ts=1686643938518)
webpackJsonpCallback
[http://jedi-temple:12000/_next/static/chunks/webpack.js:1364:46](http://jedi-temple:12000/_next/static/chunks/webpack.js?ts=1686643938518)
<anonymous>
[http://jedi-temple:12000/_next/static/chunks/main.js:9:61](http://jedi-temple:12000/_next/static/chunks/main.js?ts=1686643938518)
I am exactly stuck with this, I have waited and refreshed the page checked the ENV: Dev is enabled but still stuck :(
Same. OOBE needs to be foolproof, and this seems to be getting stuck when bootstrapping the front-end.
@rcarmo @juanfrancisco227 @JPDucky let's get on a voice channel in Discord, as per your availability you can ping me and we can resolve the issue. Discord : https://discord.gg/PUznvQbc
@Flashminat0 ➜ /workspaces/SuperAGI (main) $ docker-compose up --build
Building gui
[+] Building 2.3s (11/11) FINISHED
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 34B 0.0s
=> [internal] load .dockerignore 0.2s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/node:lts 1.7s
=> [auth] library/node:pull token for registry-1.docker.io 0.0s
=> [1/5] FROM docker.io/library/node:lts@sha256:04efcbab713d4b1379a6bc9b11abf520673538148faedfaa1cc184b8064f7db6 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 5.53kB 0.0s
=> CACHED [2/5] WORKDIR /app 0.0s
=> CACHED [3/5] COPY package*.json ./ 0.0s
=> CACHED [4/5] RUN npm install 0.0s
=> CACHED [5/5] COPY . . 0.0s
=> exporting to image 0.2s
=> => exporting layers 0.0s
=> => writing image sha256:ca89fc63713a50395fb20f884cc795e05afc5724d89077eea47e02c823b4acc4 0.0s
=> => naming to docker.io/library/superagi_gui 0.0s
Building celery
[+] Building 8.1s (12/12) FINISHED
=> [internal] load build definition from DockerfileCelery 0.1s
=> => transferring dockerfile: 252B 0.0s
=> [internal] load .dockerignore 0.2s
=> => transferring context: 34B 0.0s
=> [internal] load metadata for docker.io/library/python:3.9 1.7s
=> [auth] library/python:pull token for registry-1.docker.io 0.0s
=> [1/6] FROM docker.io/library/python:3.9@sha256:dbb5cbf2a6eb16f3f18c09b4fe9d1624bba6a76105dcde0d2108f2f13ecf1f23 0.0s
=> [internal] load build context 0.2s
=> => transferring context: 53.34kB 0.1s
=> CACHED [2/6] WORKDIR /app 0.0s
=> CACHED [3/6] COPY requirements.txt . 0.0s
=> CACHED [4/6] RUN pip install --no-cache-dir -r requirements.txt 0.0s
=> [5/6] COPY . . 1.1s
=> [6/6] COPY config.yaml . 0.2s
=> exporting to image 4.6s
=> => exporting layers 4.4s
=> => writing image sha256:abfe9d0d126a7ec6e001a762be2e9973e5a64cb70c800c7727ad7b23b7638c20 0.0s
=> => naming to docker.io/library/superagi_celery 0.0s
Building backend
[+] Building 8.8s (14/14) FINISHED
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 380B 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 34B 0.0s
=> [internal] load metadata for docker.io/library/python:3.9 0.9s
=> [1/9] FROM docker.io/library/python:3.9@sha256:dbb5cbf2a6eb16f3f18c09b4fe9d1624bba6a76105dcde0d2108f2f13ecf1f23 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 25.69kB 0.0s
=> CACHED [2/9] WORKDIR /app 0.0s
=> CACHED [3/9] COPY requirements.txt . 0.0s
=> CACHED [4/9] RUN pip install --no-cache-dir -r requirements.txt 0.0s
=> CACHED [5/9] COPY . . 0.0s
=> [6/9] COPY config.yaml ./config.yaml 0.2s
=> [7/9] COPY entrypoint.sh /entrypoint.sh 0.3s
=> [8/9] COPY wait-for-it.sh /wait-for-it.sh 0.2s
=> [9/9] RUN chmod +x /entrypoint.sh /wait-for-it.sh 1.2s
=> exporting to image 5.7s
=> => exporting layers 5.6s
=> => writing image sha256:19aadef0f92daf47e2d242997062be4a6ba2c9531e09f7455212a3954ad34af6 0.0s
=> => naming to docker.io/library/superagi_backend 0.0s
Starting superagi_super__postgres_1 ... done
Starting superagi_gui_1 ... done
Starting superagi_super__redis_1 ... done
Recreating superagi_celery_1 ... done
Recreating superagi_backend_1 ... done
Attaching to superagi_super__postgres_1, superagi_gui_1, superagi_super__redis_1, superagi_celery_1, superagi_backend_1
backend_1 | wait-for-it.sh: waiting 60 seconds for super__postgres:5432
backend_1 | wait-for-it.sh: super__postgres:5432 is available after 0 seconds
super__postgres_1 |
super__postgres_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
super__postgres_1 |
super__postgres_1 | 2023-06-13 17:33:42.331 UTC [1] LOG: starting PostgreSQL 15.3 (Debian 15.3-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
super__postgres_1 | 2023-06-13 17:33:42.334 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
super__postgres_1 | 2023-06-13 17:33:42.335 UTC [1] LOG: listening on IPv6 address "::", port 5432
super__postgres_1 | 2023-06-13 17:33:42.367 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
super__postgres_1 | 2023-06-13 17:33:42.440 UTC [28] LOG: database system was shut down at 2023-06-13 17:33:15 UTC
super__postgres_1 | 2023-06-13 17:33:42.467 UTC [1] LOG: database system is ready to accept connections
super__redis_1 | 1:C 13 Jun 2023 17:33:41.740 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
super__redis_1 | 1:C 13 Jun 2023 17:33:41.740 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started
super__redis_1 | 1:C 13 Jun 2023 17:33:41.741 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
super__redis_1 | 1:M 13 Jun 2023 17:33:41.741 * monotonic clock: POSIX clock_gettime
super__redis_1 | 1:M 13 Jun 2023 17:33:41.742 * Running mode=standalone, port=6379.
super__redis_1 | 1:M 13 Jun 2023 17:33:41.742 # Server initialized
super__redis_1 | 1:M 13 Jun 2023 17:33:41.742 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
super__redis_1 | 1:M 13 Jun 2023 17:33:41.743 * Loading RDB produced by version 7.0.11
super__redis_1 | 1:M 13 Jun 2023 17:33:41.743 * RDB age 26 seconds
super__redis_1 | 1:M 13 Jun 2023 17:33:41.743 * RDB memory usage when created 1.18 Mb
super__redis_1 | 1:M 13 Jun 2023 17:33:41.743 * Done loading RDB, keys loaded: 1, keys expired: 0.
super__redis_1 | 1:M 13 Jun 2023 17:33:41.743 * DB loaded from disk: 0.001 seconds
super__redis_1 | 1:M 13 Jun 2023 17:33:41.743 * Ready to accept connections
gui_1 |
gui_1 | > [email protected] dev
gui_1 | > next dev
gui_1 |
gui_1 | - ready started server on 0.0.0.0:3000, url: http://localhost:3000
backend_1 | INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
backend_1 | INFO [alembic.runtime.migration] Will assume transactional DDL.
gui_1 | - warn Invalid next.config.js options detected:
gui_1 | - warn The root value has an unexpected property, webpackDevMiddleware, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, configOrigin, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, modularizeImports, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, skipMiddlewareUrlNormalize, skipTrailingSlashRedirect, staticPageGenerationTimeout, swcMinify, target, trailingSlash, transpilePackages, typescript, useFileSystemPublicRoutes, webpack).
gui_1 | - warn See more info here: https://nextjs.org/docs/messages/invalid-next-config
backend_1 | INFO: Will watch for changes in these directories: ['/app']
backend_1 | INFO: Uvicorn running on http://0.0.0.0:8001 (Press CTRL+C to quit)
backend_1 | INFO: Started reloader process [1] using WatchFiles
celery_1 | Connected to the database! @ postgresql://superagi:password@super__postgres/super_agi_main
backend_1 | Connected to the database! @ postgresql://superagi:password@super__postgres/super_agi_main
celery_1 | /usr/local/lib/python3.9/site-packages/celery/platforms.py:840: SecurityWarning: You're running the worker with superuser privileges: this is
celery_1 | absolutely not recommended!
celery_1 |
celery_1 | Please specify a different user using the --uid option.
celery_1 |
celery_1 | User information: uid=0 euid=0 gid=0 egid=0
celery_1 |
celery_1 | warnings.warn(SecurityWarning(ROOT_DISCOURAGED.format(
celery_1 |
celery_1 | -------------- celery@e50e9e6a851b v5.2.7 (dawn-chorus)
celery_1 | --- ***** -----
celery_1 | -- ******* ---- Linux-5.15.0-1039-azure-x86_64-with-glibc2.31 2023-06-13 17:33:48
celery_1 | - *** --- * ---
celery_1 | - ** ---------- [config]
celery_1 | - ** ---------- .> app: superagi:0x7f9dd243d820
celery_1 | - ** ---------- .> transport: redis://super__redis:6379/0
celery_1 | - ** ---------- .> results: redis://super__redis:6379/0
celery_1 | - *** --- * --- .> concurrency: 10 (prefork)
celery_1 | -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
celery_1 | --- ***** -----
celery_1 | -------------- [queues]
celery_1 | .> celery exchange=celery(direct) key=celery
celery_1 |
celery_1 |
celery_1 | [tasks]
celery_1 | . execute_agent
celery_1 |
celery_1 | [2023-06-13 17:33:50,812: INFO/MainProcess] Connected to redis://super__redis:6379/0
celery_1 | [2023-06-13 17:33:50,817: INFO/MainProcess] mingle: searching for neighbors
celery_1 | [2023-06-13 17:33:51,857: INFO/MainProcess] mingle: all alone
celery_1 | [2023-06-13 17:33:51,879: INFO/MainProcess] celery@e50e9e6a851b ready.
backend_1 | INFO: Started server process [20]
backend_1 | INFO: Waiting for application startup.
backend_1 | INFO: Application startup complete.
gui_1 | - event compiled client and server successfully in 4.5s (781 modules)
gui_1 | - wait compiling...
gui_1 | - event compiled client and server successfully in 992 ms (781 modules)
gui_1 | - wait compiling /_error (client and server)...
gui_1 | - event compiled client and server successfully in 503 ms (782 modules)
gui_1 | Do not add stylesheets using next/head (see tag with href="https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap"). Use Document instead.
gui_1 | See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component
gui_1 | Do not add stylesheets using next/head (see tag with href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"). Use Document instead.
gui_1 | See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component
gui_1 | - wait compiling /favicon.ico/route (client and server)...
gui_1 | - event compiled successfully in 124 ms (135 modules)
I had this issue intermittently when I first set SuperAGI up on my Windows 10 12GB RAM laptop. I experienced a huge lag in the responsiveness of the laptop. Eventually, I traced it to Docker Desktop consuming almost all the available memory on the host system.
I added a .wslconfig
file in my C:\User\$user
folder with the following config settings and the problem went away:
[wsl2]
memory=2GB # Limits VM memory in WSL 2 up to 2GB
processors=2# Makes the WSL 2 VM use two virtual processors
@rcarmo @juanfrancisco227 @JPDucky let's get on a voice channel in Discord, as per your availability you can ping me and we can resolve the issue. Discord : https://discord.gg/PUznvQbc
We can discuss it here. It's open source for a reason.
So I've tested it on multiple machines and it seems that this issue does not occur when running locally, which is what I thought. I cloned the exact config I had working to my docker host and it starts without issue, but when you access the web gui it still gets stuck on "initializing". Watching the network monitor, I know it is definitely related to something CORS/permissions related as it shows it is blocking a websocket. I will continue to update as I find more.
Hello @iskandarreza ,
I noticed your recent comment was not directly related to the issue currently being discussed. In order to keep this thread focused and productive, please ensure that your future comments are relevant and contribute to the ongoing discussion.
If you have a different issue or topic you'd like to discuss, feel free to open a new issue or thread. Thanks for your understanding and cooperation!
@JPDucky what do you mean it's not related? It was getting stuck at the gui because there was not enough RAM to run the browser properly because the docker containers for this project was eating up RAM because there was no setting in the host system that specified the max amount of RAM to use. It was eating up 10GB of RAM altogether. Maybe what you meant to say is it's not pertinent to your issue because you're not using docker containers on a windows system.
This is on github codespaces
main.py has a list of addresses that are allowed to make cross-origin requests to the API. By default, there's only localhost on ports 3000 and 3001. I thought I had solved the issue by adding my machine's local address to the list since it now lets me use either localhost or the address to access the dashboard, but it doesn't work if it's not on the host machine. It seems to be CORS related since the logs and experience of trying to use the local address on the host machine before adding it to the CORS whitelist is identical to what happens when trying to enter from another machine in the network even after adding the address.
There is also a websocket on port 8001. Using Server-Sent Events would likely have made the extra port redundant, but that wasn’t the design choice here.
See my latest pull request, #364, I implemented an nginx wrapper container to solve the CORS and hostname issues, etc. My goal was to make it as easy as possible for it to run out of the box so you could do what you want with it. I'm about to test to see if it works with traefik.
Update: it works with traefik. Here are the labels I added to the proxy service:
proxy:
image: nginx:stable-alpine
ports:
- "3900:80"
networks:
- super_network
- proxy
depends_on:
- backend
- gui
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.superagi.entrypoints=websecure"
- "traefik.http.routers.superagi.rule=Host(`<your-url-here>`)"
- "traefik.http.routers.superagi.tls.certresolver=letsencrypt"
- "traefik.http.services.superagi.loadbalancer.server.port=80"
hi, my superagi is stuck aswell. i noticed in the docker app , the celery part is not running nad this is the log :
Usage: celery [OPTIONS] COMMAND [ARGS]...
2023-06-14 20:16:46 Try 'celery --help' for help.
2023-06-14 20:16:46
2023-06-14 20:16:46 Error: Invalid value for '-A' / '--app':
2023-06-14 20:16:46 Unable to load celery application.
2023-06-14 20:16:46 While trying to load the module superagi.worker the following error occurred:
2023-06-14 20:16:46 Traceback (most recent call last):
2023-06-14 20:16:46 File "/usr/local/lib/python3.9/site-packages/celery/bin/celery.py", line 57, in convert
2023-06-14 20:16:46 return find_app(value)
2023-06-14 20:16:46 File "/usr/local/lib/python3.9/site-packages/celery/app/utils.py", line 384, in find_app
2023-06-14 20:16:46 sym = symbol_by_name(app, imp=imp)
2023-06-14 20:16:46 File "/usr/local/lib/python3.9/site-packages/kombu/utils/imports.py", line 56, in symbol_by_name
2023-06-14 20:16:46 module = imp(module_name, package=package, **kwargs)
2023-06-14 20:16:46 File "/usr/local/lib/python3.9/site-packages/celery/utils/imports.py", line 105, in import_from_cwd
2023-06-14 20:16:46 return imp(module, package=package)
2023-06-14 20:16:46 File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
2023-06-14 20:16:46 return _bootstrap._gcd_import(name[level:], package, level)
2023-06-14 20:16:46 File "
Hi @ramzeez88 - I had this issue as well, but was able to solve it by deleting the whole thing and starting again. The config.yaml file can be saved and just download, extract and build again.
@JPDucky - very interested in this- I have the project 'running' on Synology host but as you have found, no network access. I didn't really understand your solution though, you are deploying an nginx container but adding Traefik labels?
I've reinstalled and no help. Apparently it's related to the memory overcommit setting.
I'm getting this on Fedora 37 as well. Same symptom:
INFO: Started server process [15]
INFO: Waiting for application startup.
INFO: Application startup complete.
Then try to hit the webgui and I see:
[gui] | - wait compiling /_error (client and server)...
[gui] | - event compiled client and server successfully in 225 ms (1315 modules)
Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap"). Use Document instead.
See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component
Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"). Use Document instead.
See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component
[gui] | - wait compiling /favicon.ico/route (client and server)...
[gui] | - event compiled successfully in 100 ms (146 modules)
Webgui just shows "Initializing SuperAGI..."
ENV: 'DEV'
Made sure to git pull today (on branch 'main') and do the compose down, compose up.
SELinux set to permissive.
Also added vm.overcommit_memory=1
to sysctl.conf and ran sysctl -p
Wiped out the directory (saved the config.yaml) and git cloned again.
Going to try updating to Fedora 38. (Fun with Nvidia drivers coming up!)
@JPDucky - very interested in this- I have the project 'running' on Synology host but as you have found, no network access. I didn't really understand your solution though, you are deploying an nginx container but adding Traefik labels?
So the problem here arises from the use of the localhost
domain. Pretty much every computer in existence uses the name localhost
to refer to itself when it comes to networking. You might also see the use of 127.0.0.1
, of which localhost
is just an alias to. For example, if you were to take a look at /etc/hosts
of any linux box, you might see the lines:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
127.0.0.1
being the IPv4 address that the computer uses to refer to itself. (::1
being the same thing but IPv6, don't worry about that). So we see all those 'localhost' names up there and you might wonder how those work. Well, any time you have to type localhost
in to your browser, you are referring your browser to the computer the browser is running on. This is why people that are running this program locally, i.e. on the same machine they are using to access it (think; docker on laptop, browser on same laptop) don't seem to be having issues accessing the UI. It's because when they tell their browser to look there, being that it is on the same machine (thus on localhost
), it can actually find it!
So what's happening when we setup this program on a remote host and tell it to use localhost
? Well, the same thing that happens in the previous example. The exact, same, thing. Which is why you'll have trouble accessing it in your browser- your browser goes to check localhost
for the app, but it's not there! It's checking your laptop for the app on localhost
, but your laptop doesn't have anything running on localhost
, your synology does!
How do we get around this? Well, docker has some really interesting things it can do when it comes to networking. When defining services in a docker-compose.yml
file, you have the ability to explicitly give a container a network. If you do not give a container a network, docker implicitly gives the container a network, that it will name relative to the contents of the compose file. This network lives separate from the host's network, and in order access anything inside the docker network, you have to expose or publish port mappings. All of the containers on the network have access to each other, and they can access each other using their container name, which acts as their hostname, and the internal port number (the port the app uses to publish itself).
Now, finally we can talk about the nginx container I added. By tossing this onto the compose file, it too gets added to that docker network (explicitly defined, in our case) and thus has access to all the other containers. That means that we can effectively un-publish the port mappings to the other containers, and use expose
instead to only open those ports to the containers that have access to the networks they are running on. What this means is that we can use nginx as a frontend and only expose one port instead of five or six, like we had previously, and that means we can do this without needing to remap the original ports of the containers (which would break the application). By using the nginx container and telling it where to find each bit of the application (nginx/default.conf
), we can effectively use it as a wrapper for the entire application.
That's great, but that's a lot of words. Can you ELI5 for me? Yep! - By using the nginx container, we no longer have to worry about which port goes where or "if I move this port to here, will it break x?", because nginx hides all the crunchy bits behind the docker network, and lets us really utilize the full capabilites of containerization that docker provides.
Need it broken down further? NGINX is a frontend and it tucks away the rest of the application into its own special zone, thereby eliminating any conflicts that may arise should nginx not have been there in the first place.
If you have any questions let me know!
As for the traefik labels, don't worry about those if you're not using traefik. But if you are using traefik, make sure to put them on the nginx container and add the traefik network to your nginx container.
@JPDucky That helped a lot. I'm running this on a remote box and connecting to http://superagi01:3000 (DNS is set up).
Just so happens that box has a gui installed - so I got some exercise traversing the stairs and tried browsing on that box to http://localhost:3000. Worked.
But I still want to connect remotely. Just re-read your post - I like your solution of throwing an nginx container in there. I'd ask for your configs but I found another way that works - ssh tunnelling.
ssh superagi01 -L 3000:localhost:3000 -L 5432:localhost:5432 -L 8001:localhost:8001
Then connect on my remote client to http://localhost:3000
and, boom, it works.
Thanks for the super detailed explanation @JPDucky, Luckily I did know most of that but you are going to make some people very happy when they stumble on this in the future- I apologise for making you write it! (and beers, I owe you beers) Based on this I will attempt to add the nginx container and wire it up as directed. If I can get it to work I'll write it up and contribute back- maybe Caddy with Letsencrypt would work too It's super frustrating that many of these AI projects are built on platforms that support networking but only work locally!
delete the pincone index and it will work, at least that was it for me to make it unstuck