website: https://midjourney.netlify.app/
From time to time, specially with a new build, reaching any endpoint on my page will crash with Unhandled Promise Rejection.
A couple of examples from the logs are at the bottom of this email. I also included the latest build log.
This seems to be 100% reproducible on mobile when opening a link in facebook’s browser for example.
error logs:
Sep 5, 05:09:15 AM e901ef41 ERROR Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"TypeError: fetch failed","reason":{"errorType":"TypeError","errorMessage":"fetch failed","cause":{"errorType":"ConnectTimeoutError","errorMessage":"Connect Timeout Error","code":"UND_ERR_CONNECT_TIMEOUT","name":"ConnectTimeoutError","message":"Connect Timeout Error","stack":["ConnectTimeoutError: Connect Timeout Error"," at onConnectTimeout (/var/task/.netlify/shims.js:3876:26)"," at /var/task/.netlify/shims.js:3823:46"," at Immediate._onImmediate (/var/task/.netlify/shims.js:3864:9)"," at processImmediate (node:internal/timers:466:21)"]},"stack":["TypeError: fetch failed"," at Object.processResponse (/var/task/.netlify/shims.js:10542:24)"," at /var/task/.netlify/shims.js:11260:39"," at node:internal/process/task_queues:141:7"," at AsyncResource.runInAsyncScope (node:async_hooks:202:9)"," at AsyncResource.runMicrotask (node:internal/process/task_queues:138:8)"," at processTicksAndRejections (node:internal/process/task_queues:96:5)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: TypeError: fetch failed"," at process.<anonymous> (file:///var/runtime/index.mjs:1131:17)"," at process.emit (node:events:527:28)"," at emit (node:internal/process/promises:140:20)"," at processPromiseRejections (node:internal/process/promises:274:27)"," at processTicksAndRejections (node:internal/process/task_queues:97:32)"]}
Sep 5, 05:09:15 AM e901ef41 Unknown application error occurred
Sep 5, 05:09:15 AM e901ef41 Duration: 44.98 ms Memory Usage: 95 MB
Sep 5, 05:09:16 AM 0d4ce501 Duration: 680.24 ms Memory Usage: 44 MB
Sep 5, 05:09:18 AM 8fc8b991 Duration: 181.30 ms Memory Usage: 44 MB
Sep 5, 05:09:21 AM 7c43b0fe Duration: 248.76 ms Memory Usage: 44 MB
Sep 5, 11:06:51 AM 7a8964ba Duration: 804.84 ms Memory Usage: 95 MB Init Duration: 220.04 ms
Sep 5, 11:07:23 AM 1495db47 ERROR Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"TypeError: fetch failed","reason":{"errorType":"TypeError","errorMessage":"fetch failed","cause":{"errorType":"ConnectTimeoutError","errorMessage":"Connect Timeout Error","code":"UND_ERR_CONNECT_TIMEOUT","name":"ConnectTimeoutError","message":"Connect Timeout Error","stack":["ConnectTimeoutError: Connect Timeout Error"," at onConnectTimeout (/var/task/.netlify/shims.js:3876:26)"," at /var/task/.netlify/shims.js:3823:46"," at Immediate._onImmediate (/var/task/.netlify/shims.js:3864:9)"," at processImmediate (node:internal/timers:466:21)"]},"stack":["TypeError: fetch failed"," at Object.processResponse (/var/task/.netlify/shims.js:10542:24)"," at /var/task/.netlify/shims.js:11260:39"," at node:internal/process/task_queues:141:7"," at AsyncResource.runInAsyncScope (node:async_hooks:202:9)"," at AsyncResource.runMicrotask (node:internal/process/task_queues:138:8)"," at processTicksAndRejections (node:internal/process/task_queues:96:5)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: TypeError: fetch failed"," at process.<anonymous> (file:///var/runtime/index.mjs:1131:17)"," at process.emit (node:events:527:28)"," at emit (node:internal/process/promises:140:20)"," at processPromiseRejections (node:internal/process/promises:274:27)"," at processTicksAndRejections (node:internal/process/task_queues:97:32)"]}
Sep 5, 11:07:23 AM 1495db47 Unknown application error occurred
Deploy log:
12:15:54 PM: Build ready to start
12:15:56 PM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
12:15:56 PM: build-image tag: v4.10.1
12:15:56 PM: buildbot version: 67e75f1ba713a8213d4b5a8ccf9708af751e2390
12:15:56 PM: Fetching cached dependencies
12:15:56 PM: Starting to download cache of 114.3MB
12:15:57 PM: Finished downloading cache in 706.566396ms
12:15:57 PM: Starting to extract cache
12:15:58 PM: Finished extracting cache in 922.138902ms
12:15:58 PM: Finished fetching cache in 1.686641003s
12:15:58 PM: Starting to prepare the repo for build
12:15:58 PM: Preparing Git Reference refs/heads/master
12:15:59 PM: Parsing package.json dependencies
12:16:00 PM: Starting build script
12:16:00 PM: Installing dependencies
12:16:00 PM: Python version set to 2.7
12:16:00 PM: Started restoring cached node version
12:16:01 PM: Finished restoring cached node version
12:16:01 PM: v16.17.0 is already installed.
12:16:01 PM: Now using node v16.17.0 (npm v8.15.0)
12:16:01 PM: Started restoring cached build plugins
12:16:01 PM: Finished restoring cached build plugins
12:16:02 PM: Attempting ruby version 2.7.2, read from environment
12:16:02 PM: Using ruby version 2.7.2
12:16:02 PM: Using PHP version 8.0
12:16:02 PM: Installing pip dependencies
12:16:02 PM: Started restoring cached pip cache
12:16:02 PM: Finished restoring cached pip cache
12:16:03 PM: DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
12:16:04 PM: Collecting requests
12:16:04 PM: Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
12:16:04 PM: Collecting idna<3,>=2.5; python_version < "3"
12:16:04 PM: Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
12:16:04 PM: Collecting certifi>=2017.4.17
12:16:04 PM: Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
12:16:04 PM: Collecting chardet<5,>=3.0.2; python_version < "3"
12:16:04 PM: Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)
12:16:04 PM: Collecting urllib3<1.27,>=1.21.1
12:16:04 PM: Using cached urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
12:16:04 PM: Installing collected packages: idna, certifi, chardet, urllib3, requests
12:16:04 PM: Successfully installed certifi-2021.10.8 chardet-4.0.0 idna-2.10 requests-2.27.1 urllib3-1.26.12
12:16:04 PM: Pip dependencies installed
12:16:05 PM: No npm workspaces detected
12:16:05 PM: Started restoring cached node modules
12:16:05 PM: Finished restoring cached node modules
12:16:05 PM: Started restoring cached go cache
12:16:05 PM: Finished restoring cached go cache
12:16:05 PM: Installing Go version 1.17 (requested 1.17)
12:16:10 PM: unset GOOS;
12:16:10 PM: unset GOARCH;
12:16:10 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.17.linux.amd64';
12:16:10 PM: export PATH="/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}";
12:16:10 PM: go version >&2;
12:16:10 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.17.linux.amd64.env"
12:16:10 PM: go version go1.17 linux/amd64
12:16:10 PM: Installing missing commands
12:16:10 PM: Verify run directory
12:16:11 PM:
12:16:11 PM: ────────────────────────────────────────────────────────────────
12:16:11 PM: Netlify Build
12:16:11 PM: ────────────────────────────────────────────────────────────────
12:16:11 PM:
12:16:11 PM: ❯ Version
12:16:11 PM: @netlify/build 27.16.1
12:16:11 PM:
12:16:11 PM: ❯ Flags
12:16:11 PM: baseRelDir: true
12:16:11 PM: buildId: 63162ecab02a910009d3c58a
12:16:11 PM: deployId: 63162ecab02a910009d3c58c
12:16:11 PM:
12:16:11 PM: ❯ Current directory
12:16:11 PM: /opt/build/repo
12:16:11 PM:
12:16:11 PM: ❯ Config file
12:16:11 PM: /opt/build/repo/netlify.toml
12:16:11 PM:
12:16:11 PM: ❯ Context
12:16:11 PM: production
12:16:11 PM:
12:16:11 PM: ────────────────────────────────────────────────────────────────
12:16:11 PM: 1. build.command from netlify.toml
12:16:11 PM: ────────────────────────────────────────────────────────────────
12:16:11 PM:
12:16:11 PM: $ npm run build
12:16:11 PM: > midjourney-ui@0.0.1 build
12:16:11 PM: > vite build
12:16:11 PM: ▲ [WARNING] Cannot find base config file "./.svelte-kit/tsconfig.json" [tsconfig.json]
12:16:11 PM: jsconfig.json:2:12:
12:16:11 PM: 2 │ "extends": "./.svelte-kit/tsconfig.json",
12:16:11 PM: ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12:16:12 PM: vite v3.0.9 building for production...
12:16:12 PM: transforming...
12:16:12 PM: 5:16:12 PM [vite-plugin-svelte] /opt/build/repo/src/routes/+layout.svelte:3:13 Layout has unused export property 'data'. If it is for external reference only, please consider using `export const data`
12:16:12 PM: 1: <script>
12:16:12 PM: 2: import NavBar from "$lib/components/NavBar.svelte";
12:16:12 PM: 3: export let data;
12:16:12 PM: ^
12:16:12 PM: 4: let y = 0;
12:16:12 PM: 5: let newY = 0;
12:16:13 PM: ✓ 74 modules transformed.
12:16:13 PM: rendering chunks...
12:16:13 PM: .svelte-kit/output/client/_app/immutable/assets/logo-d7407745.png 24.29 KiB
12:16:13 PM: .svelte-kit/output/client/vite-manifest.json 7.62 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/components/pages/_layout.svelte-b8e75e56.js 4.07 KiB / gzip: 1.92 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/components/error.svelte-50c68b40.js 1.58 KiB / gzip: 0.73 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/components/pages/_page.svelte-a26c4a3d.js 1.88 KiB / gzip: 0.97 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/components/pages/all/_page.svelte-f49217a1.js 0.81 KiB / gzip: 0.47 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/components/pages/collections/_page.svelte-9876e566.js 2.92 KiB / gzip: 1.38 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/components/pages/collections/_slug_/_page.svelte-91cb514c.js 2.11 KiB / gzip: 1.01 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/components/pages/login/_page.svelte-93e649d8.js 2.07 KiB / gzip: 1.03 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/chunks/singletons-9ef3c758.js 1.16 KiB / gzip: 0.69 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/start-20dd3ebb.js 22.90 KiB / gzip: 8.77 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/chunks/stores-ed269087.js 0.61 KiB / gzip: 0.35 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/chunks/index-5093ab0d.js 0.54 KiB / gzip: 0.31 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/chunks/navigation-b79603b4.js 0.17 KiB / gzip: 0.15 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/chunks/api-1187a88b.js 2.63 KiB / gzip: 1.23 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/chunks/0-89858a7c.js 0.23 KiB / gzip: 0.17 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/chunks/1-c4c7b17b.js 0.17 KiB / gzip: 0.14 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/chunks/index-3cae51ab.js 15.00 KiB / gzip: 6.30 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/chunks/2-e7c670d6.js 0.30 KiB / gzip: 0.20 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/chunks/3-b7af1b8e.js 0.27 KiB / gzip: 0.18 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/chunks/4-c84883a2.js 0.18 KiB / gzip: 0.15 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/chunks/5-951298be.js 0.34 KiB / gzip: 0.23 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/chunks/SvelteSeo-6612a7de.js 16.01 KiB / gzip: 3.55 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/chunks/6-23f9a889.js 0.22 KiB / gzip: 0.16 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/assets/+page-1f4933ec.css 0.57 KiB / gzip: 0.35 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/assets/+layout-d6c5168d.css 0.91 KiB / gzip: 0.43 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/assets/Gallery-a2356a50.css 7.03 KiB / gzip: 1.69 KiB
12:16:13 PM: .svelte-kit/output/client/_app/immutable/chunks/Gallery-20cdfed3.js 60.07 KiB / gzip: 21.63 KiB
12:16:13 PM: vite v3.0.9 building SSR bundle for production...
12:16:13 PM: transforming...
12:16:13 PM: 5:16:13 PM [vite-plugin-svelte] /opt/build/repo/src/routes/+layout.svelte:3:13 Layout has unused export property 'data'. If it is for external reference only, please consider using `export const data`
12:16:13 PM: 1: <script>
12:16:13 PM: 2: import NavBar from "$lib/components/NavBar.svelte";
12:16:13 PM: 3: export let data;
12:16:13 PM: ^
12:16:13 PM: 4: let y = 0;
12:16:13 PM: 5: let newY = 0;
12:16:14 PM: ✓ 78 modules transformed.
12:16:14 PM: Generated an empty chunk: "hooks"
12:16:14 PM: rendering chunks...
12:16:14 PM: .svelte-kit/output/server/vite-manifest.json 3.39 KiB
12:16:14 PM: .svelte-kit/output/server/index.js 62.05 KiB
12:16:14 PM: .svelte-kit/output/server/entries/pages/_layout.svelte.js 3.20 KiB
12:16:14 PM: .svelte-kit/output/server/entries/pages/_layout.server.js 1.06 KiB
12:16:14 PM: .svelte-kit/output/server/entries/fallbacks/error.svelte.js 0.60 KiB
12:16:14 PM: .svelte-kit/output/server/entries/pages/_page.svelte.js 2.02 KiB
12:16:14 PM: .svelte-kit/output/server/entries/pages/all/_page.svelte.js 0.58 KiB
12:16:14 PM: .svelte-kit/output/server/entries/pages/collections/_page.svelte.js 1.74 KiB
12:16:14 PM: .svelte-kit/output/server/entries/pages/collections/_slug_/_page.svelte.js 1.74 KiB
12:16:14 PM: .svelte-kit/output/server/entries/pages/collections/_slug_/_page.server.js 1.01 KiB
12:16:14 PM: .svelte-kit/output/server/entries/pages/login/_page.svelte.js 0.66 KiB
12:16:14 PM: .svelte-kit/output/server/chunks/index.js 9.09 KiB
12:16:14 PM: .svelte-kit/output/server/chunks/index2.js 2.27 KiB
12:16:14 PM: .svelte-kit/output/server/chunks/stores.js 1.00 KiB
12:16:14 PM: .svelte-kit/output/server/chunks/api.js 0.85 KiB
12:16:14 PM: .svelte-kit/output/server/chunks/Gallery.js 81.34 KiB
12:16:14 PM: .svelte-kit/output/server/chunks/SvelteSeo.js 6.33 KiB
12:16:14 PM: .svelte-kit/output/server/chunks/hooks.js 0.00 KiB
12:16:14 PM: Run npm run preview to preview your production build locally.
12:16:14 PM:
12:16:14 PM: > Using @sveltejs/adapter-netlify
12:16:14 PM: ✔ done
12:16:15 PM:
12:16:15 PM: (build.command completed in 3.6s)
12:16:15 PM:
12:16:15 PM: ────────────────────────────────────────────────────────────────
12:16:15 PM: 2. Functions bundling
12:16:15 PM: ────────────────────────────────────────────────────────────────
12:16:15 PM:
12:16:15 PM: Packaging Functions from .netlify/functions-internal directory:
12:16:15 PM: - render.js
12:16:15 PM:
12:16:15 PM:
12:16:15 PM: (Functions bundling completed in 890ms)
12:16:15 PM:
12:16:15 PM: ────────────────────────────────────────────────────────────────
12:16:15 PM: 3. Deploy site
12:16:15 PM: ────────────────────────────────────────────────────────────────
12:16:15 PM:
12:16:15 PM: Starting to deploy site from 'build'
12:16:15 PM: Creating deploy tree
12:16:15 PM: Creating deploy upload records
12:16:16 PM: 19 new files to upload
12:16:16 PM: 1 new functions to upload
12:16:22 PM: Site deploy was successfully initiated
12:16:22 PM:
12:16:22 PM: (Deploy site completed in 6.2s)
12:16:22 PM:
12:16:22 PM: ────────────────────────────────────────────────────────────────
12:16:22 PM: Netlify Build Complete
12:16:22 PM: ────────────────────────────────────────────────────────────────
12:16:22 PM:
12:16:22 PM: (Netlify Build completed in 10.8s)
12:16:22 PM: Starting post processing
12:16:22 PM: Post processing - HTML
12:16:22 PM: Caching artifacts
12:16:22 PM: Started saving node modules
12:16:22 PM: Finished saving node modules
12:16:22 PM: Started saving build plugins
12:16:22 PM: Finished saving build plugins
12:16:22 PM: Started saving pip cache
12:16:22 PM: Finished saving pip cache
12:16:22 PM: Started saving emacs cask dependencies
12:16:22 PM: Finished saving emacs cask dependencies
12:16:22 PM: Started saving maven dependencies
12:16:22 PM: Finished saving maven dependencies
12:16:22 PM: Started saving boot dependencies
12:16:22 PM: Finished saving boot dependencies
12:16:22 PM: Started saving rust rustup cache
12:16:22 PM: Finished saving rust rustup cache
12:16:22 PM: Started saving go dependencies
12:16:22 PM: Finished saving go dependencies
12:16:22 PM: Post processing - header rules
12:16:22 PM: Build script success
12:16:22 PM: Post processing - redirect rules
12:16:22 PM: Post processing done
12:16:23 PM: Uploading Cache of size 114.3MB
12:16:24 PM: Finished processing build request in 27.780177545s
12:16:25 PM: Site is live ✨