Closed gpilleux closed 11 months ago
replace your next.config.js with this `/* @type {import('next').NextConfig} / const nextConfig = { assetPrefix: process.env.NODE_ENV === "production" ? "/" : "./", // webpackDevMiddleware: config => { // config.watchOptions = { // poll: 1000, // aggregateTimeout: 300, // } // return config // } }
module.exports = nextConfig `
I basically commented out the webpackDevMiddleware options I added that config because the in windows next.js was unable to detect code changes when developing. try removing it and check
Hi Fluder, thanks for answering.
I commented out the lines you showed in the next.config.js file and the gui container is answering with the same segmentation fault
log as shown above.
I am using the Pinecone free plan and thanks to this issue I managed to setup the workaround for it.
Now the gui container is not showing segmentation fault
but it is still exiting with code 1
.
I tried downloading the release version0.0.2 and running docker-compose up --build
is showing segmentation fault
for the gui container.
I left all 4 containers running and after a while I tried to restart the gui container and segmentation fault
is back 😢
2023-06-06 12:01:06 superagi-gui-1 |
2023-06-06 12:01:06 superagi-gui-1 | > super-agi@0.1.0 dev
2023-06-06 12:01:06 superagi-gui-1 | > next dev
2023-06-06 12:01:06 superagi-gui-1 |
2023-06-06 12:01:07 superagi-gui-1 | - ready started server on 0.0.0.0:3000, url: http://localhost:3000
2023-06-06 12:01:07 superagi-gui-1 | Segmentation fault
1969-12-31 21:00:00 superagi-gui-1 exited with code 139
can u try with the latest main
@gpilleux can you try downloading/cloning the latest code in main branch instead of the release
All the executions have been with the latest main (except this one time with the release verison 0.0.2).
I have pulled the latest main branch and still getting Segmentation Fault
2023-06-06 15:26:56 superagi-backend-1 | wait-for-it.sh: waiting 60 seconds for super__postgres:5432
2023-06-06 15:26:56 superagi-backend-1 | wait-for-it.sh: super__postgres:5432 is available after 0 seconds
2023-06-06 15:27:01 superagi-backend-1 | INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
2023-06-06 15:27:01 superagi-backend-1 | INFO [alembic.runtime.migration] Will assume transactional DDL.
2023-06-06 15:27:03 superagi-backend-1 | INFO: Will watch for changes in these directories: ['/app']
2023-06-06 15:27:03 superagi-backend-1 | INFO: Uvicorn running on http://0.0.0.0:8001 (Press CTRL+C to quit)
2023-06-06 15:27:03 superagi-backend-1 | INFO: Started reloader process [1] using WatchFiles
2023-06-06 15:27:10 superagi-backend-1 | Connected to the database! @ postgresql://superagi:password@super__postgres/super_agi_main
2023-06-06 15:27:19 superagi-backend-1 | INFO: Started server process [20]
2023-06-06 15:27:19 superagi-backend-1 | INFO: Waiting for application startup.
2023-06-06 15:27:19 superagi-backend-1 | INFO: Application startup complete.
2023-06-06 15:26:57 superagi-gui-1 |
2023-06-06 15:26:57 superagi-gui-1 | > super-agi@0.1.0 dev
2023-06-06 15:26:57 superagi-gui-1 | > next dev
2023-06-06 15:26:57 superagi-gui-1 |
------> **2023-06-06 15:26:58 superagi-gui-1 | Segmentation fault** <--------
2023-06-06 15:27:04 superagi-celery-1 | Connected to the database! @ postgresql://superagi:password@super__postgres/super_agi_main
2023-06-06 15:27:13 superagi-celery-1 |
2023-06-06 15:27:13 superagi-celery-1 | -------------- celery@d0163640b931 v5.2.7 (dawn-chorus)
2023-06-06 15:27:13 superagi-celery-1 | --- ***** -----
2023-06-06 15:27:13 superagi-celery-1 | -- ******* ---- Linux-5.15.49-linuxkit-x86_64-with-glibc2.31 2023-06-06 19:27:13
2023-06-06 15:27:13 superagi-celery-1 | - *** --- * ---
2023-06-06 15:27:13 superagi-celery-1 | - ** ---------- [config]
2023-06-06 15:27:13 superagi-celery-1 | - ** ---------- .> app: superagi:0x7f22e26a5040
2023-06-06 15:27:13 superagi-celery-1 | - ** ---------- .> transport: redis://super__redis:6379/0
2023-06-06 15:27:13 superagi-celery-1 | - ** ---------- .> results: redis://super__redis:6379/0
2023-06-06 15:27:13 superagi-celery-1 | - *** --- * --- .> concurrency: 10 (prefork)
2023-06-06 15:27:13 superagi-celery-1 | -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
2023-06-06 15:27:13 superagi-celery-1 | --- ***** -----
2023-06-06 15:27:13 superagi-celery-1 | -------------- [queues]
2023-06-06 15:27:13 superagi-celery-1 | .> celery exchange=celery(direct) key=celery
2023-06-06 15:27:13 superagi-celery-1 |
2023-06-06 15:27:13 superagi-celery-1 |
2023-06-06 15:27:13 superagi-celery-1 | [tasks]
2023-06-06 15:27:13 superagi-celery-1 | . execute_agent
2023-06-06 15:27:13 superagi-celery-1 |
2023-06-06 15:27:16 superagi-celery-1 | [2023-06-06 19:27:16,831: INFO/MainProcess] Connected to redis://super__redis:6379/0
2023-06-06 15:27:16 superagi-celery-1 | [2023-06-06 19:27:16,900: INFO/MainProcess] mingle: searching for neighbors
2023-06-06 15:27:17 superagi-celery-1 | [2023-06-06 19:27:17,993: INFO/MainProcess] mingle: all alone
2023-06-06 15:27:18 superagi-celery-1 | [2023-06-06 19:27:18,090: INFO/MainProcess] celery@d0163640b931 ready.
2023-06-06 15:26:54 superagi-super__redis-1 | 1:C 06 Jun 2023 19:26:54.393 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
2023-06-06 15:26:54 superagi-super__redis-1 | 1:C 06 Jun 2023 19:26:54.394 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started
2023-06-06 15:26:54 superagi-super__redis-1 | 1:C 06 Jun 2023 19:26:54.394 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
2023-06-06 15:26:54 superagi-super__redis-1 | 1:M 06 Jun 2023 19:26:54.396 * monotonic clock: POSIX clock_gettime
2023-06-06 15:26:54 superagi-super__redis-1 | 1:M 06 Jun 2023 19:26:54.412 * Running mode=standalone, port=6379.
2023-06-06 15:26:54 superagi-super__redis-1 | 1:M 06 Jun 2023 19:26:54.412 # Server initialized
2023-06-06 15:26:54 superagi-super__redis-1 | 1:M 06 Jun 2023 19:26:54.419 * Ready to accept connections
2023-06-06 15:26:54 superagi-super__postgres-1 |
2023-06-06 15:26:54 superagi-super__postgres-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
2023-06-06 15:26:54 superagi-super__postgres-1 |
2023-06-06 15:26:54 superagi-super__postgres-1 | 2023-06-06 19:26:54.598 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
2023-06-06 15:26:54 superagi-super__postgres-1 | 2023-06-06 19:26:54.600 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2023-06-06 15:26:54 superagi-super__postgres-1 | 2023-06-06 19:26:54.600 UTC [1] LOG: listening on IPv6 address "::", port 5432
2023-06-06 15:26:54 superagi-super__postgres-1 | 2023-06-06 19:26:54.612 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-06-06 15:26:54 superagi-super__postgres-1 | 2023-06-06 19:26:54.640 UTC [29] LOG: database system was interrupted; last known up at 2023-06-06 19:26:14 UTC
2023-06-06 15:26:55 superagi-super__postgres-1 | 2023-06-06 19:26:55.354 UTC [29] LOG: database system was not properly shut down; automatic recovery in progress
2023-06-06 15:26:55 superagi-super__postgres-1 | 2023-06-06 19:26:55.361 UTC [29] LOG: invalid record length at 0/19BCCD0: wanted 24, got 0
2023-06-06 15:26:55 superagi-super__postgres-1 | 2023-06-06 19:26:55.361 UTC [29] LOG: redo is not required
2023-06-06 15:26:55 superagi-super__postgres-1 | 2023-06-06 19:26:55.377 UTC [27] LOG: checkpoint starting: end-of-recovery immediate wait
2023-06-06 15:26:55 superagi-super__postgres-1 | 2023-06-06 19:26:55.401 UTC [27] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.007 s, sync=0.003 s, total=0.029 s; sync files=2, longest=0.002 s, average=0.002 s; distance=0 kB, estimate=0 kB
2023-06-06 15:26:55 superagi-super__postgres-1 | 2023-06-06 19:26:55.416 UTC [1] LOG: database system is ready to accept connections
This is the complete log of docker-compose up --build
with the highlighted superagi-gui error.
If I explicitly run the superagi-gui-1 container this is the log
2023-06-06 15:33:25 superagi-gui-1 |
2023-06-06 15:33:25 superagi-gui-1 | > super-agi@0.1.0 dev
2023-06-06 15:33:25 superagi-gui-1 | > next dev
2023-06-06 15:33:25 superagi-gui-1 |
2023-06-06 15:33:25 superagi-gui-1 | - ready started server on 0.0.0.0:3000, url: http://localhost:3000
2023-06-06 15:33:25 superagi-gui-1 | Segmentation fault
1969-12-31 21:00:00 superagi-gui-1 exited with code 139
can you give your computer spec
try this out
once the error occurs
install node if you dont have it
then do
if you already have a node modules folder delete it first
try replacing your next.config.js with the following:
/* @type {import('next').NextConfig} / const nextConfig = { assetPrefix: process.env.NODE_ENV === "production" ? "/" : "./", webpack: config => { config.watchOptions = { poll: 1000, aggregateTimeout: 300, }; return config; }, };
module.exports = nextConfig;
after making this change kindly restart the container
So I ran a bash shell on the container and you can see that npm is installed and up to date. Segmentation fault visible after second npm run dev
command. Couldn't fetch localhost:3000 on either execution. How can I look for more specific logs?
Aren't you seeing this same error? Why would my OS have anything to do on this container being executed? I have a Macbook Pro 2020 running on Ventura 13.4.
I tried in mac didn't get the error can you increase the amount of resource the docker desktop is provided you can change it in docker desktop setting under resources
I have those exact same settings on the Docker Desktop.
Since I don't know how else to debug this, I deleted the project and cloned the repo from scratch. Only change made was renaming config_template.yaml to config.yaml and didn't touch any of the code.
Running docker-compose up --build
gives me the exact same log as previously. Really strange. Am I missing some configuration which might cause this segmentation fault?
Now I cloned the repo on an ubuntu machine and the gui is running fine! I'm really confused as to why this isn't working on my macOS... but oh well, will be using it on the Ubuntu where is doesn't have any problems. Thanks so much for the support, keep it up!
I'm having the exact same issue (Intel macOS). I wonder if it is an issue with docker on macOS on intel?
I solved it: Docker Settings->Uncheck Virtualization Framework and used system default container terminal and legacy file system. Not sure which one fixed it. But was excited to share the update.
This actually solves it. So much thanks @kcverde !!
I also can confirm that disabling "Use Virtualization framework" in Settings does the magic. Thanks @kcverde for sharing your observation, it really did save my and many others' day!
I didn't change "Container terminal" option, which is "Integrated" in my Settings and it works. Neither did I change "Legacy file system" option, and the GUI works.
Can we enforce this container setting somehow? It would be nice to have that setting in right condition for everyone who clones the repo and builds the container. Quite many seem to run into this exact problem. As a workaround and quick fix, we could update it in the README.
But, do we have a config level solution for this so that it would work just like magic?
Is this issue still persisting in the newer version releases? @gpilleux
I solved it: Docker Settings->Uncheck Virtualization Framework and used system default container terminal and legacy file system. Not sure which one fixed it. But was excited to share the update.
Thank you a lot, finally, it solved on intel macOS
I just pulled the project like an hour ago and been trying to solve the issues that have been showing up. First this user I had this user error
which was fixed by adding this lines to DockerfileCelery
This is the complete log after executing
docker-compose up --build
Only thing I can see that looks wierd is that
- warn Invalid next.config.js options detected:
. Anyways, the only container that wasn't running was the superagi-gui-1 and by clicking the play button to execute it, this log comes upAny ideas why this is happening? My machine is a macOS Ventura 13.4