Back

Function executes differently on localhost and live client (puppeteer)

  • 0
  • Self Hosted
  • Functions
  • Web
  • Storage
Yte50
26 Apr, 2024, 09:44

Appwrite v1.5.4 hosted on Digitalocean, Node 18.0 Function running puppeteer generates Pdf documents. The PDF document generated when the function is called from localhost has all the styles, but when called from the live site [app.domian.com], the document copies patches of the CSS

TL;DR
Function running puppeteer to generate PDF documents runs differently on localhost and live client. PDF from localhost has all the styles, but live site copies patches of the CSS. Build logs show package updates but no error related to the PDF generation. Try checking for any server-side differences or network issues on the live client site that could affect CSS rendering for PDFs.
Yte50
26 Apr, 2024, 09:52

[localhost] [live client]

Yte50
26 Apr, 2024, 09:54

build command apk update && apk fetch chromium nss freetype harfbuzz ca-certificates ttf-freefont && npm i build logs

TypeScript
Building ...
fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz
v3.19.1-369-gdacd3ce82f7 [https://dl-cdn.alpinelinux.org/alpine/v3.19/main]
v3.19.1-369-gdacd3ce82f7 [https://dl-cdn.alpinelinux.org/alpine/v3.19/community]
OK: 22991 distinct packages available
Downloading ca-certificates-20240226-r0
Downloading chromium-123.0.6312.105-r0
Downloading font-freefont-20120503-r4
Downloading freetype-2.13.2-r0
Downloading harfbuzz-8.3.0-r0
Downloading nss-3.98-r0

added 127 packages, and audited 128 packages in 17s

13 packages are looking for funding
  run `npm fund` for details

2 moderate severity vulnerabilities

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
npm notice 
npm notice New minor version of npm available! 10.2.4 -> 10.5.1
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.5.1>
npm notice Run `npm install -g npm@10.5.1` to update!
npm notice 
Packing build ...
Build finished.```
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more