PWA 500 errors

HI All, I have been trying to get the PWA to work. I keep getting 500 load errors when I attempt to load the result. Below is the log file,
I am using Wasta, Linux. I have also tried on Windows and am getting the same issue.

Thanks!

*** SCRIPTURE APP BUILDER ***
*** 11.3 ***

*** Building PWA ***

App Project: turkmani
App Name: إيى خبر
Analytics: No
Expiry: No
App Builder: /usr/share/scripture-app-builder
Audio: Package in Assets

*** NPM Version ***
10.1.0

*** NPM Install ***
Installing dependencies…
npm info using npm@10.1.0
npm info using node@v20.9.0
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 1215ms
npm http fetch GET 200 https://registry.npmjs.org/undici 273ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/vite 280ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@sveltejs%2Fkit 70ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/vite-node 47ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/vitest 51ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@sveltejs%2Fvite-plugin-svelte-inspector 46ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@sveltejs%2Fvite-plugin-svelte 48ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/vitefu 49ms (cache hit)
npm info run @sveltejs/kit@1.30.4 postinstall node_modules/@sveltejs/kit node postinstall.js
npm info run core-js-pure@3.33.2 postinstall node_modules/core-js-pure node -e “try{require(‘./postinstall’)}catch(e){}”
npm info run esbuild@0.20.2 postinstall node_modules/esbuild node install.js
npm info run svelte-preprocess@5.0.4 postinstall node_modules/svelte-preprocess echo “[svelte-preprocess] Don’t forget to install the preprocessors packages that will be used: sass, stylus, less, postcss & postcss-load-config, coffeescript, pug, etc…”
npm info run esbuild@0.18.20 postinstall node_modules/vite/node_modules/esbuild node install.js
npm info run svelte-preprocess@5.0.4 postinstall { code: 0, signal: null }
npm info run core-js-pure@3.33.2 postinstall { code: 0, signal: null }
npm info run esbuild@0.20.2 postinstall { code: 0, signal: null }
npm info run esbuild@0.18.20 postinstall { code: 0, signal: null }
npm info run @sveltejs/kit@1.30.4 postinstall { code: 0, signal: null }

added 734 packages, and audited 735 packages in 7s

177 packages are looking for funding
run npm fund for details

2 vulnerabilities (1 low, 1 moderate)

To address all issues, run:
npm audit fix

Run npm audit for details.
npm info ok

*** NPM Build ***

appbuilder-pwa@0.0.1 build
ts-node scripts/index.ts && vite build

ConvertConfig (1/7)
ConvertStyles (2/7)
ConvertManifest (3/7)
ConvertMedia (4/7)
ConvertBooks (5/7)
C01: GEN EXO JOS RUT 1SA 2SA 1KI 2KI JAS 2PE 1PE EZR JOB PSA PRO ECC ISA JER LAM DAN HOS JOL AMO OBA JON NAM MIC HAB ZEP HAG ZEC MAL MAT MRK LUK JHN ACT ROM 1CO 2CO GAL EPH PHP COL 1TH 2TH 1TI 2TI TIT PHM HEB 1JN 2JN 3JN JUD REV
C02: 3JN JUD REV GEN LEV B001 NUM DEU EXO JOS RUT JDG 1SA 2SA 1KI 2KI 1CH 2CH EZR NEH EST JOB PSA PRO ECC SNG ISA JER LAM EZK HOS JOL AMO OBA DAN JON MIC NAM HAB ZEP HAG ZEC MAL MAT MRK LUK ROM ACT JHN 1CO 2CO EPH GAL COL PHP 1TH 2TH 1TI 2TI TIT PHM HEB JAS 1PE 2PE 1JN 2JN
C03: JUD GEN EXO 3JN LEV NUM 2JN DEU JOS JDG RUT 1SA 1KI 2KI 1CH 2SA 2CH NEH EZR EST JOB PSA PRO ECC SNG ISA JER LAM EZK DAN HOS JOL AMO OBA JON MIC NAM HAB ZEP HAG ZEC MAL MAT LUK MRK JHN ACT 1CO ROM 2CO GAL EPH PHP 1TH COL 2TH 1TI 2TI TIT PHM HEB JAS 1PE 2PE 1JN REV
C05: MAT MRK LUK ACT ROM JHN 1CO GAL EPH 2CO PHP COL 2TH 1TH 1TI 2TI TIT PHM HEB JAS 1PE 2PE 1JN 2JN JUD 3JN REV
C06: REV 3JN JUD GEN LEV NUM EXO DEU JOS JDG 1SA RUT 2SA 1KI 2KI 1CH 2CH EZR NEH EST JOB PRO PSA SNG ISA ECC LAM JER EZK DAN HOS AMO JOL OBA JON MIC HAB ZEP NAM HAG ZEC MAL MAT LUK MRK JHN ACT ROM 1CO 2CO EPH GAL COL 1TH PHP 1TI TIT 2TH 2TI PHM HEB 1PE JAS 2PE 1JN 2JN
C07: 3JN REV JUD EXO LEV DEU NUM JOS GEN JDG RUT 1SA 2SA 2KI 1KI 1CH EZR 2CH EST NEH JOB PSA PRO ECC ISA SNG JER LAM EZK DAN HOS JOL OBA AMO JON NAM MIC HAB ZEP HAG MAL ZEC MAT LUK MRK JHN ACT ROM 2CO 1CO GAL EPH PHP COL 1TH 1TI 2TH 2TI PHM TIT JAS 1PE HEB 2PE 1JN 2JN
ConvertFirebase (6/7)
ConvertAbout (7/7)

vite v4.5.2 building SSR bundle for production…
transforming…
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: GitHub - browserslist/update-db: CLI tool to update caniuse-lite to refresh target browsers from Browserslist config

:blossom: daisyUI 4.6.0
├─ :heavy_check_mark:︎ prefix is enabled daisyUI classnames must use dy- prefix
├─ :heavy_check_mark:︎ 1 theme added daisyUI themes — Tailwind CSS Components ( version 4 update is here )
╰─ ★ Star daisyUI on GitHub GitHub - saadeghi/daisyui: 🌼 🌼 🌼 🌼 🌼  The most popular, free and open-source Tailwind CSS component library

:blossom: daisyUI 4.6.0
├─ :heavy_check_mark:︎ prefix is enabled daisyUI classnames must use dy- prefix
├─ :heavy_check_mark:︎ 1 theme added daisyUI themes — Tailwind CSS Components ( version 4 update is here )
╰─ :heart:︎ Support daisyUI project: daisyUI component library - Open Collective

✓ 265 modules transformed.
rendering chunks…

vite v4.5.2 building for production…
transforming…
✓ 1125 modules transformed.
rendering chunks…
computing gzip size…
.svelte-kit/output/client/_app/version.json 0.03 kB │ gzip: 0.05 kB
.svelte-kit/output/client/.vite/manifest.json 11.31 kB │ gzip: 1.20 kB
.svelte-kit/output/client/_app/immutable/assets/IconCard.9c3ccdbd.css 0.16 kB │ gzip: 0.13 kB
.svelte-kit/output/client/_app/immutable/assets/6.80749fb8.css 0.16 kB │ gzip: 0.13 kB
.svelte-kit/output/client/_app/immutable/assets/9.4c3df4d9.css 0.25 kB │ gzip: 0.17 kB
.svelte-kit/output/client/_app/immutable/assets/2.16cdb931.css 6.26 kB │ gzip: 1.75 kB
.svelte-kit/output/client/_app/immutable/assets/0.6f82cb18.css 60.96 kB │ gzip: 10.14 kB
.svelte-kit/output/client/_app/immutable/chunks/stores.05447e99.js 0.24 kB │ gzip: 0.17 kB
.svelte-kit/output/client/_app/immutable/chunks/share.9bc64642.js 0.47 kB │ gzip: 0.32 kB
.svelte-kit/output/client/_app/immutable/chunks/history.07f7db44.js 0.58 kB │ gzip: 0.35 kB
.svelte-kit/output/client/_app/immutable/chunks/dateUtils.a274f1d5.js 0.78 kB │ gzip: 0.37 kB
.svelte-kit/output/client/_app/immutable/chunks/BookmarkIcon.a6aa15bf.js 0.78 kB │ gzip: 0.52 kB
.svelte-kit/output/client/_app/immutable/nodes/1.765cda52.js 0.84 kB │ gzip: 0.52 kB
.svelte-kit/output/client/_app/immutable/chunks/each.8bb22a70.js 0.87 kB │ gzip: 0.54 kB
.svelte-kit/output/client/_app/immutable/chunks/SearchIcon.a5906a85.js 1.04 kB │ gzip: 0.63 kB
.svelte-kit/output/client/_app/immutable/chunks/ShareIcon.edff7df7.js 1.51 kB │ gzip: 0.86 kB
.svelte-kit/output/client/_app/immutable/chunks/NoteIcon.ad538953.js 1.63 kB │ gzip: 0.76 kB
.svelte-kit/output/client/_app/immutable/nodes/4.71c7e12c.js 1.68 kB │ gzip: 0.90 kB
.svelte-kit/output/client/_app/immutable/nodes/11.07b11bcf.js 1.70 kB │ gzip: 0.91 kB
.svelte-kit/output/client/_app/immutable/nodes/3.2eb84d4d.js 2.19 kB │ gzip: 1.17 kB
.svelte-kit/output/client/_app/immutable/chunks/index.d817e53b.js 2.41 kB │ gzip: 1.25 kB
.svelte-kit/output/client/_app/immutable/chunks/singletons.4e5d8128.js 3.41 kB │ gzip: 1.78 kB
.svelte-kit/output/client/_app/immutable/chunks/IconCard.bad96183.js 4.38 kB │ gzip: 2.01 kB
.svelte-kit/output/client/_app/immutable/nodes/5.5747f95d.js 5.40 kB │ gzip: 2.36 kB
.svelte-kit/output/client/_app/immutable/nodes/8.cad28cad.js 5.53 kB │ gzip: 2.40 kB
.svelte-kit/output/client/_app/immutable/chunks/Navbar.388f8c07.js 5.83 kB │ gzip: 2.11 kB
.svelte-kit/output/client/_app/immutable/chunks/annotation-share.08324da3.js 6.26 kB │ gzip: 2.04 kB
.svelte-kit/output/client/_app/immutable/nodes/7.b89bb95f.js 6.77 kB │ gzip: 2.91 kB
.svelte-kit/output/client/_app/immutable/nodes/6.dc0dcecb.js 7.77 kB │ gzip: 3.18 kB
.svelte-kit/output/client/_app/immutable/nodes/10.436df5b1.js 8.24 kB │ gzip: 2.93 kB
.svelte-kit/output/client/_app/immutable/chunks/scheduler.a6656420.js 9.25 kB │ gzip: 3.64 kB
.svelte-kit/output/client/_app/immutable/entry/app.4ac7585f.js 10.15 kB │ gzip: 2.86 kB
.svelte-kit/output/client/_app/immutable/nodes/9.18abd503.js 18.23 kB │ gzip: 6.77 kB
.svelte-kit/output/client/_app/immutable/entry/start.673b1bd6.js 25.31 kB │ gzip: 9.98 kB
.svelte-kit/output/client/_app/immutable/nodes/0.13828742.js 58.80 kB │ gzip: 15.87 kB
.svelte-kit/output/client/_app/immutable/chunks/TabsMenu.027e9532.js 64.51 kB │ gzip: 15.37 kB
.svelte-kit/output/client/_app/immutable/nodes/2.483c1dac.js 614.88 kB │ gzip: 179.64 kB
.svelte-kit/output/client/_app/immutable/chunks/theme.0655aa4b.js 2,276.06 kB │ gzip: 323.72 kB

(!) Some chunks are larger than 500 kBs after minification. Consider:

  • Using dynamic import() to code-split the application
  • Use build.rollupOptions.output.manualChunks to improve chunking: Configuration Options | Rollup
  • Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
    ✓ built in 8.03s
    vite v4.5.2 building for production…
    transforming…
    ✓ 2 modules transformed.
    rendering chunks…
    computing gzip size…
    .svelte-kit/output/client/service-worker.js 5.64 kB │ gzip: 1.62 kB
    ✓ built in 13ms
    .svelte-kit/output/server/.vite/manifest.json 9.45 kB
    .svelte-kit/output/server/_app/immutable/assets/IconCard.9c3ccdbd.css 0.16 kB
    .svelte-kit/output/server/_app/immutable/assets/_page.80749fb8.css 0.16 kB
    .svelte-kit/output/server/_app/immutable/assets/_page.4c3df4d9.css 0.25 kB
    .svelte-kit/output/server/_app/immutable/assets/_page.9123d11e.css 6.26 kB
    .svelte-kit/output/server/_app/immutable/assets/_layout.5e78a576.css 60.94 kB
    .svelte-kit/output/server/entries/pages/_layout.js 0.04 kB
    .svelte-kit/output/server/entries/endpoints/data/catalog/_server.js 0.19 kB
    .svelte-kit/output/server/internal.js 0.23 kB
    .svelte-kit/output/server/entries/pages/about/_page.js 0.23 kB
    .svelte-kit/output/server/chunks/paths.js 0.28 kB
    .svelte-kit/output/server/entries/pages/_page.js 0.30 kB
    .svelte-kit/output/server/entries/pages/notes/_page.js 0.42 kB
    .svelte-kit/output/server/entries/pages/bookmarks/_page.js 0.42 kB
    .svelte-kit/output/server/entries/pages/highlights/_page.js 0.43 kB
    .svelte-kit/output/server/entries/fallbacks/error.svelte.js 0.51 kB
    .svelte-kit/output/server/chunks/stores.js 0.52 kB
    .svelte-kit/output/server/chunks/BookmarkIcon.js 0.55 kB
    .svelte-kit/output/server/entries/pages/history/_page.js 0.80 kB
    .svelte-kit/output/server/chunks/ShareIcon.js 0.95 kB
    .svelte-kit/output/server/entries/pages/account/_page.svelte.js 0.97 kB
    .svelte-kit/output/server/entries/pages/share/_page.svelte.js 0.98 kB
    .svelte-kit/output/server/chunks/notes.js 1.17 kB
    .svelte-kit/output/server/entries/pages/about/_page.svelte.js 1.17 kB
    .svelte-kit/output/server/chunks/utils.js 1.28 kB
    .svelte-kit/output/server/chunks/highlights.js 1.29 kB
    .svelte-kit/output/server/chunks/dateUtils.js 1.35 kB
    .svelte-kit/output/server/chunks/NoteIcon.js 1.36 kB
    .svelte-kit/output/server/chunks/bookmarks.js 1.70 kB
    .svelte-kit/output/server/chunks/index.js 2.19 kB
    .svelte-kit/output/server/chunks/scripture.js 2.36 kB
    .svelte-kit/output/server/chunks/index2.js 2.58 kB
    .svelte-kit/output/server/entries/pages/bookmarks/_page.svelte.js 2.72 kB
    .svelte-kit/output/server/entries/pages/notes/_page.svelte.js 2.92 kB
    .svelte-kit/output/server/chunks/IconCard.js 3.60 kB
    .svelte-kit/output/server/entries/pages/settings/_page.svelte.js 3.72 kB
    .svelte-kit/output/server/chunks/Navbar.js 3.75 kB
    .svelte-kit/output/server/entries/pages/history/_page.svelte.js 3.86 kB
    .svelte-kit/output/server/entries/pages/search/_page.svelte.js 3.95 kB
    .svelte-kit/output/server/chunks/annotation-sort.js 4.07 kB
    .svelte-kit/output/server/entries/pages/highlights/_page.svelte.js 4.93 kB
    .svelte-kit/output/server/chunks/internal.js 5.56 kB
    .svelte-kit/output/server/chunks/ssr.js 7.64 kB
    .svelte-kit/output/server/chunks/TabsMenu.js 8.86 kB
    .svelte-kit/output/server/chunks/theme.js 35.06 kB
    .svelte-kit/output/server/entries/pages/_layout.svelte.js 78.29 kB
    .svelte-kit/output/server/index.js 90.03 kB
    .svelte-kit/output/server/entries/pages/_page.svelte.js 198.84 kB
    .svelte-kit/output/server/chunks/config.js 215.44 kB
    .svelte-kit/output/server/chunks/catalog.js 1,885.97 kB

Run npm run preview to preview your production build locally.

Using @sveltejs/adapter-static
Wrote site to “build”
:heavy_check_mark: done
✓ built in 1m 30s

Copying PWA to output folder

/home/johnny/App Builder/Scripture Apps/PWA Output/org.incilturkmani.incil

total 4
drwxrwxr-x 13 johnny johnny 4096 May 13 15:12 build

real 2m33.012s
user 2m52.795s
sys 0m16.456s

Can you explain what you mean by “500 load errors” ? What do you mean by “attempt to load the result” ?

To view the new modern PWA, it must be hosted by a web server. You can’t open the files from the file system like the old static PWA.

If you are hosting the PWA at a path on a website (e.g. https://example.com/bible), then you must specify the Sub Directory (on the Publishing > Web App (PWA) > Sub Directory page) before building the app (e.g. /bible).

We have noticed a problem with having many book collections that we are attempting to resolve.

The modern PWA only support property formatted USFM files. We have added support for the \video tag and Markdown which are not standard USFM.

Thanks,

Chris

Hi Chris,

thanks for your reply.

The PWA site is hosted at https://turkmani.org/test

I have changed the subdirectory setting.

Thanks again!

The error that comes back

If you right-click on the page, select inspect and switch to the console tab. You will see the error:

Error: Value 'Azb' does not match regex '[a-z]{3}'

Use lower case. I will add check in SAB to ensure that they are lower case before building.

I changed it to all lower case and it did the same thing. Should I try identifying as Arabic?

You might need to clear the browser cache to get the update. See this:

Hmm, I cleared my cache and I see see the problem. Are you sure you updated the website? Do you have a CDN in front of the website that would be caching the previous publishing of the app?

FYI, I fixed the issue so that it should work with “Azb”, however, the first segment of the language code is normally lower cache. On the Publishing > Web App (PWA) > Repository page, select “Latest from the Repository” to get this change.

Chris

I am working on reuploading it right now. Thanks again!

That was it. I wasn’t expecting it to be there. All working!