deep-foundation / deeplinks

https://discord.gg/deep-foundation
The Unlicense
14 stars 9 forks source link

websockets unexpectedly stop working and work agian after some time #277

Open FreePhoenix888 opened 1 year ago

FreePhoenix888 commented 1 year ago

Screencast from 11-22-2023 06:14:09 PM.webm

Screencast from 11-22-2023 06:15:53 PM.webm

logs:

[0] wait  - compiling / (client and server)...
[1] WARNING: You didn't provide an endpoint and don't have a .graphqlconfig. Make sure you have at least one of them.
[1] WARNING: You didn't provide an endpoint and don't have a .graphqlconfig. Make sure you have at least one of them.
[1] WARNING: You didn't provide an endpoint and don't have a .graphqlconfig. Make sure you have at least one of them.
[0] warn  - ../deeplinks/imports/client.js
[0] Critical dependency: the request of a dependency is an expression
[0] 
[0] Import trace for requested module:
[0] ../deeplinks/imports/client.js
[0] 
[0] ../deeplinks/imports/client.js
[0] Critical dependency: the request of a dependency is an expression
[0] 
[0] Import trace for requested module:
[0] ../deeplinks/imports/client.js
[1] WARNING: You didn't provide an endpoint and don't have a .graphqlconfig. Make sure you have at least one of them.
[0] warn  - The `app` directory is experimental. To enable, add `appDir: true` to your `next.config.js` configuration under `experimental`. See https://nextjs.org/docs/messages/experimental-app-dir-config
[0] warn  - The `app` directory is experimental. To enable, add `appDir: true` to your `next.config.js` configuration under `experimental`. See https://nextjs.org/docs/messages/experimental-app-dir-config
[1] WARNING: You didn't provide an endpoint and don't have a .graphqlconfig. Make sure you have at least one of them.
[0] (node:2105) [DEP0128] DeprecationWarning: Invalid 'main' field in '/workspace/dev/node_modules/uid/package.json' of 'yes'. Please either fix that or report it to the module author
[0] (Use `node --trace-deprecation ...` to show where the warning was created)
[0] Warning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter?
[0] Warning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter?
[0] index-page-urls {
[0]   gqlPath: '3007-deepfoundation-dev-zv8j4wl17d5.ws-us106.gitpod.io/api/gql',
[0]   gqlSsl: true
[0] }
[0] connector-urls {
[0]   deeplinksPath: '3006-deepfoundation-dev-zv8j4wl17d5.ws-us106.gitpod.io',
[0]   deeplinksSsl: true,
[0]   serverUrl: 'https://3007-deepfoundation-dev-zv8j4wl17d5.ws-us106.gitpod.io'
[0] } {
[0]   defaultGqlPath: '3006-deepfoundation-dev-zv8j4wl17d5.ws-us106.gitpod.io/gql',
[0]   defaultGqlSsl: true,
[0]   defaultServerUrl: 'https://3007-deepfoundation-dev-zv8j4wl17d5.ws-us106.gitpod.io'
[0] }
[0] needAnalitics true
[1] WARNING: You didn't provide an endpoint and don't have a .graphqlconfig. Make sure you have at least one of them.
[1] WARNING: You didn't provide an endpoint and don't have a .graphqlconfig. Make sure you have at least one of them.
[1] WARNING: You didn't provide an endpoint and don't have a .graphqlconfig. Make sure you have at least one of them.
[1] WARNING: You didn't provide an endpoint and don't have a .graphqlconfig. Make sure you have at least one of them.
[1] WARNING: You didn't provide an endpoint and don't have a .graphqlconfig. Make sure you have at least one of them.
[1] WARNING: You didn't provide an endpoint and don't have a .graphqlconfig. Make sure you have at least one of them.
[1] WARNING: You didn't provide an endpoint and don't have a .graphqlconfig. Make sure you have at least one of them.
[1] WARNING: You didn't provide an endpoint and don't have a .graphqlconfig. Make sure you have at least one of them.
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] POST /gql ~> http://localhost:8080
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] GET /gql ~> http://localhost:8080
[1] [HPM] Upgrading to WebSocket
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] POST /gql ~> http://localhost:8080
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] POST /gql ~> http://localhost:8080
[0] warn  - ../deeplinks/imports/client.js
[0] Critical dependency: the request of a dependency is an expression
[0] 
[0] Import trace for requested module:
[0] ../deeplinks/imports/client.js
[0] 
[0] ../deeplinks/imports/client.js
[0] Critical dependency: the request of a dependency is an expression
[0] 
[0] Import trace for requested module:
[0] ../deeplinks/imports/client.js
[0] wait  - compiling /api/deeplinks (client and server)...
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] POST /gql ~> http://localhost:8080
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] POST /gql ~> http://localhost:8080
[0] warn  - The `app` directory is experimental. To enable, add `appDir: true` to your `next.config.js` configuration under `experimental`. See https://nextjs.org/docs/messages/experimental-app-dir-config
[0] warn  - ../deeplinks/imports/client.js
[0] Critical dependency: the request of a dependency is an expression
[0] 
[0] Import trace for requested module:
[0] ../deeplinks/imports/client.js
[0] 
[0] ../deeplinks/node_modules/cross-spawn/index.js
[0] Module not found: Can't resolve 'spawn-sync' in '/workspace/dev/packages/deeplinks/node_modules/cross-spawn'
[0] 
[0] Import trace for requested module:
[0] ../deeplinks/node_modules/cross-spawn/index.js
[0] ../deeplinks/node_modules/execa/index.js
[0] ../deeplinks/node_modules/shell-env/index.js
[0] ../deeplinks/node_modules/shell-path/index.js
[0] ../deeplinks/node_modules/fix-path/index.js
[0] ../deeplinks/imports/engine.js
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] POST /gql ~> http://localhost:8080
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] POST /gql ~> http://localhost:8080
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] POST /gql ~> http://localhost:8080
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] POST /gql ~> http://localhost:8080
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] POST /gql ~> http://localhost:8080
[0] __dirname /workspace/dev/packages/deepcase-app/app/server/pages/api
[0] rootDir /workspace/dev/packages/deepcase-app
[0] warn  - The `app` directory is experimental. To enable, add `appDir: true` to your `next.config.js` configuration under `experimental`. See https://nextjs.org/docs/messages/experimental-app-dir-config
[0] warn  - ../deeplinks/imports/client.js
[0] Critical dependency: the request of a dependency is an expression
[0] 
[0] Import trace for requested module:
[0] ../deeplinks/imports/client.js
[0] 
[0] ../deeplinks/node_modules/cross-spawn/index.js
[0] Module not found: Can't resolve 'spawn-sync' in '/workspace/dev/packages/deeplinks/node_modules/cross-spawn'
[0] 
[0] Import trace for requested module:
[0] ../deeplinks/node_modules/cross-spawn/index.js
[0] ../deeplinks/node_modules/execa/index.js
[0] ../deeplinks/node_modules/shell-env/index.js
[0] ../deeplinks/node_modules/shell-path/index.js
[0] ../deeplinks/node_modules/fix-path/index.js
[0] ../deeplinks/imports/engine.js
[0] wait  - compiling /api/healthz (client and server)...
[0] warn  - The `app` directory is experimental. To enable, add `appDir: true` to your `next.config.js` configuration under `experimental`. See https://nextjs.org/docs/messages/experimental-app-dir-config
[0] warn  - ../deeplinks/imports/client.js
[0] Critical dependency: the request of a dependency is an expression
[0] 
[0] Import trace for requested module:
[0] ../deeplinks/imports/client.js
[0] 
[0] ../deeplinks/node_modules/cross-spawn/index.js
[0] Module not found: Can't resolve 'spawn-sync' in '/workspace/dev/packages/deeplinks/node_modules/cross-spawn'
[0] 
[0] Import trace for requested module:
[0] ../deeplinks/node_modules/cross-spawn/index.js
[0] ../deeplinks/node_modules/execa/index.js
[0] ../deeplinks/node_modules/shell-env/index.js
[0] ../deeplinks/node_modules/shell-path/index.js
[0] ../deeplinks/node_modules/fix-path/index.js
[0] ../deeplinks/imports/engine.js
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] GET /gql ~> http://localhost:8080
[1] [HPM] Upgrading to WebSocket
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] POST /gql ~> http://localhost:8080
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep false
[0] existsSync logs false
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[0]  export PATH='/workspace/dev/packages/deepcase-app/node_modules/.bin:/workspace/dev/packages/node_modules/.bin:/workspace/dev/node_modules/.bin:/workspace/node_modules/.bin:/node_modules/.bin:/workspace/dev/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/workspace/dev/node_modules/.bin:/workspace/node_modules/.bin:/node_modules/.bin:/workspace/dev/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/workspace/dev/node_modules/.bin:/workspace/node_modules/.bin:/node_modules/.bin:/home/gitpod/.nvm/versions/node/v18.17.1/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/gitpod/.sdkman/candidates/maven/current/bin:/home/gitpod/.sdkman/candidates/java/current/bin:/home/gitpod/.sdkman/candidates/gradle/current/bin:/workspace/.cargo/bin:/home/gitpod/.rvm/gems/ruby-3.2.1/bin:/home/gitpod/.rvm/gems/ruby-3.2.1@global/bin:/home/gitpod/.rvm/rubies/ruby-3.2.1/bin:/home/gitpod/.pyenv/shims:/home/gitpod/.nvm/versions/node/v18.17.1/bin:/home/gitpod/.nvm/versions/node/v18.17.1/bin:/workspace/go/bin:/home/gitpod/.nix-profile/bin:/ide/bin/remote-cli:/home/gitpod/go/bin:/home/gitpod/go-packages/bin:/home/gitpod/.nvm/versions/node/v18.17.1/bin:/home/gitpod/.yarn/bin:/home/gitpod/.pnpm:/home/gitpod/.pyenv/bin:/home/gitpod/.rvm/bin:/home/gitpod/.cargo/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin/:/home/gitpod/.local/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/gitpod/.nvm/versions/node/v18.17.1/bin:/home/gitpod/.rvm/bin' && export DOCKERHOST=10.0.5.2 && export DEEPLINKS_PORT=3006 && export DEEPCASE_PORT=3007 && export DEEPLINKS_PUBLIC_URL=https://3006-deepfoundation-dev-zv8j4wl17d5.ws-us106.gitpod.io && export DEEPLINKS_HASURA_STORAGE_URL=http://localhost:8000 && export RESTORE_VOLUME_FROM_SNAPSHOT=1 && export MANUAL_MIGRATIONS=0 && export npm_config_yes=true && export JWT_SECRET='{"type":"HS256","key":"3EK6FD+o0+c7tzBNVfjpMkNDi2yARAAKzQlk8O2IKoxQu4nF7EdAh8s3TwpHwrdWT6R"}' && export HASURA_GRAPHQL_DATABASE_URL=postgres://postgres:postgrespassword@postgres:5432/postgres && export HASURA_GRAPHQL_ENABLE_CONSOLE=true && export HASURA_GRAPHQL_DEV_MODE=true && export HASURA_GRAPHQL_LOG_LEVEL=debug && export HASURA_GRAPHQL_ENABLED_LOG_TYPES=startup,http-log,webhook-log,websocket-log,query-log && export HASURA_GRAPHQL_ADMIN_SECRET=myadminsecretkey && export HASURA_GRAPHQL_ENABLE_REMOTE_SCHEMA_PERMISSIONS=true && export HASURA_GRAPHQL_UNAUTHORIZED_ROLE=undefined && export POSTGRES_USER=postgres && export POSTGRES_PASSWORD=postgrespassword && export PGGSSENCMODE=disable && export PGSSLMODE=disable && export PGREQUIRESSL=0 && export MINIO_ROOT_USER=minioaccesskey && export MINIO_ROOT_PASSWORD=miniosecretkey && export HASURA_STORAGE_DEBUG=true && export HASURA_METADATA=1 && export HASURA_ENDPOINT=http://host.docker.internal:8080/v1 && export S3_ENDPOINT=http://host.docker.internal:9000 && export S3_ACCESS_KEY=minioaccesskey && export S3_SECRET_KEY=miniosecretkey && export S3_BUCKET=default && export S3_ROOT_FOLDER=default && export POSTGRES_MIGRATIONS=0 && export POSTGRES_MIGRATIONS_SOURCE=postgres://postgres:postgrespassword@host.docker.internal:5432/postgres?sslmode=disable && export MIGRATIONS_ID_TYPE_SQL=bigint && export MIGRATIONS_ID_TYPE_GQL=bigint && export MIGRATIONS_HASURA_SECRET=myadminsecretkey && export DEEPLINKS_HASURA_SECRET=myadminsecretkey && export MIGRATIONS_SCHEMA=public && export MIGRATIONS_RL_TABLE=rl_example__links__reserved && export MIGRATIONS_DATE_TYPE_SQL=timestamp && export RESERVED_LIFETIME_MS=86400000 && export DOCKER_DEEPLINKS_URL=http://host.docker.internal:3006 && export MIGRATIONS_DIR=/tmp/deep && export MIGRATIONS_HASURA_PATH=$(gp url 8080) && export DEEPLINKS_HASURA_PATH=$(echo $(gp url 8080) | awk -F[/:] '{print $4}') && export MIGRATIONS_HASURA_SSL=1 && export DEEPLINKS_HASURA_SSL=1 && export NEXT_PUBLIC_GQL_SSL=1 && export NEXT_PUBLIC_DEEPLINKS_SERVER=https://$(echo $(gp url 3007) | awk -F[/:] '{print $4}') && export NEXT_PUBLIC_GQL_PATH=$(echo $(gp url 3006) | awk -F[/:] '{print $4}')/gql && export NEXT_PUBLIC_ENGINES=1 &&  docker version -f '{{json .}}'
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] POST /gql ~> http://localhost:8080
[0] __dirname /workspace/dev/packages/deepcase-app/app/server/pages/api
[0] rootDir /workspace/dev/packages/deepcase-app
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[0]  export PATH='/workspace/dev/packages/deepcase-app/node_modules/.bin:/workspace/dev/packages/node_modules/.bin:/workspace/dev/node_modules/.bin:/workspace/node_modules/.bin:/node_modules/.bin:/workspace/dev/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/workspace/dev/node_modules/.bin:/workspace/node_modules/.bin:/node_modules/.bin:/workspace/dev/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/workspace/dev/node_modules/.bin:/workspace/node_modules/.bin:/node_modules/.bin:/home/gitpod/.nvm/versions/node/v18.17.1/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/gitpod/.sdkman/candidates/maven/current/bin:/home/gitpod/.sdkman/candidates/java/current/bin:/home/gitpod/.sdkman/candidates/gradle/current/bin:/workspace/.cargo/bin:/home/gitpod/.rvm/gems/ruby-3.2.1/bin:/home/gitpod/.rvm/gems/ruby-3.2.1@global/bin:/home/gitpod/.rvm/rubies/ruby-3.2.1/bin:/home/gitpod/.pyenv/shims:/home/gitpod/.nvm/versions/node/v18.17.1/bin:/home/gitpod/.nvm/versions/node/v18.17.1/bin:/workspace/go/bin:/home/gitpod/.nix-profile/bin:/ide/bin/remote-cli:/home/gitpod/go/bin:/home/gitpod/go-packages/bin:/home/gitpod/.nvm/versions/node/v18.17.1/bin:/home/gitpod/.yarn/bin:/home/gitpod/.pnpm:/home/gitpod/.pyenv/bin:/home/gitpod/.rvm/bin:/home/gitpod/.cargo/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin/:/home/gitpod/.local/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/gitpod/.nvm/versions/node/v18.17.1/bin:/home/gitpod/.rvm/bin' && export DOCKERHOST=10.0.5.2 && export DEEPLINKS_PORT=3006 && export DEEPCASE_PORT=3007 && export DEEPLINKS_PUBLIC_URL=https://3006-deepfoundation-dev-zv8j4wl17d5.ws-us106.gitpod.io && export DEEPLINKS_HASURA_STORAGE_URL=http://localhost:8000 && export RESTORE_VOLUME_FROM_SNAPSHOT=1 && export MANUAL_MIGRATIONS=0 && export npm_config_yes=true && export JWT_SECRET='{"type":"HS256","key":"3EK6FD+o0+c7tzBNVfjpMkNDi2yARAAKzQlk8O2IKoxQu4nF7EdAh8s3TwpHwrdWT6R"}' && export HASURA_GRAPHQL_DATABASE_URL=postgres://postgres:postgrespassword@postgres:5432/postgres && export HASURA_GRAPHQL_ENABLE_CONSOLE=true && export HASURA_GRAPHQL_DEV_MODE=true && export HASURA_GRAPHQL_LOG_LEVEL=debug && export HASURA_GRAPHQL_ENABLED_LOG_TYPES=startup,http-log,webhook-log,websocket-log,query-log && export HASURA_GRAPHQL_ADMIN_SECRET=myadminsecretkey && export HASURA_GRAPHQL_ENABLE_REMOTE_SCHEMA_PERMISSIONS=true && export HASURA_GRAPHQL_UNAUTHORIZED_ROLE=undefined && export POSTGRES_USER=postgres && export POSTGRES_PASSWORD=postgrespassword && export PGGSSENCMODE=disable && export PGSSLMODE=disable && export PGREQUIRESSL=0 && export MINIO_ROOT_USER=minioaccesskey && export MINIO_ROOT_PASSWORD=miniosecretkey && export HASURA_STORAGE_DEBUG=true && export HASURA_METADATA=1 && export HASURA_ENDPOINT=http://host.docker.internal:8080/v1 && export S3_ENDPOINT=http://host.docker.internal:9000 && export S3_ACCESS_KEY=minioaccesskey && export S3_SECRET_KEY=miniosecretkey && export S3_BUCKET=default && export S3_ROOT_FOLDER=default && export POSTGRES_MIGRATIONS=0 && export POSTGRES_MIGRATIONS_SOURCE=postgres://postgres:postgrespassword@host.docker.internal:5432/postgres?sslmode=disable && export MIGRATIONS_ID_TYPE_SQL=bigint && export MIGRATIONS_ID_TYPE_GQL=bigint && export MIGRATIONS_HASURA_SECRET=myadminsecretkey && export DEEPLINKS_HASURA_SECRET=myadminsecretkey && export MIGRATIONS_SCHEMA=public && export MIGRATIONS_RL_TABLE=rl_example__links__reserved && export MIGRATIONS_DATE_TYPE_SQL=timestamp && export RESERVED_LIFETIME_MS=86400000 && export DOCKER_DEEPLINKS_URL=http://host.docker.internal:3006 && export MIGRATIONS_DIR=/tmp/deep && export MIGRATIONS_HASURA_PATH=$(gp url 8080) && export DEEPLINKS_HASURA_PATH=$(echo $(gp url 8080) | awk -F[/:] '{print $4}') && export MIGRATIONS_HASURA_SSL=1 && export DEEPLINKS_HASURA_SSL=1 && export NEXT_PUBLIC_GQL_SSL=1 && export NEXT_PUBLIC_DEEPLINKS_SERVER=https://$(echo $(gp url 3007) | awk -F[/:] '{print $4}') && export NEXT_PUBLIC_GQL_PATH=$(echo $(gp url 3006) | awk -F[/:] '{print $4}')/gql && export NEXT_PUBLIC_ENGINES=1 &&  docker-compose version --short
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[0] MIGRATIONS_DIR /tmp/deep
[0] existsSync deep true
[0] existsSync logs true
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] POST /gql ~> http://localhost:8080
[1] [HPM] Client disconnected
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] GET /gql ~> http://localhost:8080
[1] [HPM] Upgrading to WebSocket
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] POST /gql ~> http://localhost:8080
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] POST /gql ~> http://localhost:8080
[1] [HPM] Rewriting path from "/gql" to "/v1/graphql"
[1] [HPM] POST /gql ~> http://localhost:8080