vite-pwa / vite-plugin-pwa

Zero-config PWA for Vite
https://vite-pwa-org.netlify.app/
MIT License
3.23k stars 210 forks source link

VitePWA not working (white screen) when link is open from Meta in app browser. #681

Open KresimirCabraja opened 8 months ago

KresimirCabraja commented 8 months ago

When app is accessed through browser everything is good, when clicked from Instagram bio link, white screen is showed.

logs when clicked through browser

2024-03-04T17:57:44.839108+00:00 heroku[router]: at=info method=GET path="/sw.js" host=www.*****.com request_id=78b3f411-1ad5-4550-a491-92a31c795393 fwd="****" dyno=web.1 connect=0ms service=0ms status=304 bytes=205 protocol=https
2024-03-04T17:59:30.695702+00:00 heroku[router]: at=info method=GET path="/assets/jabuka23-DalTUVMN.png" host=*******.com request_id=36cb9a8b-31d6-4002-aa76-91bda827265d fwd="*******" dyno=web.1 connect=0ms service=0ms status=304 bytes=206 protocol=https
2024-03-04T17:59:30.704519+00:00 heroku[router]: at=info method=GET path="/assets/****-logotype@2x-CHQ12cmN.png" host=*****.com request_id=6a15931e-9ed5-47e1-8920-f21d4f1c27ae fwd="95.168.105.41" dyno=web.1 connect=0ms service=0ms status=200 bytes=4858 protocol=https
2024-03-04T17:59:30.911174+00:00 heroku[router]: at=info method=GET path="/assets/Visa-Logo-D6VX7u-j.png" host=******.com request_id=30d35a52-d211-4381-aaee-4562f3e82d3d fwd="*******" dyno=web.1 connect=0ms service=0ms status=304 bytes=207 protocol=https
2024-03-04T17:59:30.853352+00:00 heroku[router]: at=info method=GET path="/assets/heroeSection-desktop-eOGCo1sO.jpg" host=******.com request_id=2bd05936-96be-4d8f-9049-ae46693ed9c3 fwd="******" dyno=web.1 connect=0ms service=0ms status=304 bytes=207 protocol=https
2024-03-04T17:59:31.128826+00:00 heroku[router]: at=info method=GET path="/assets/mastercard-logo-Dy1hDK-k.png" host=*****.com request_id=3bb2f91c-fe63-4fce-8f2c-61b4573f8241 fwd="******" dyno=web.1 connect=0ms service=0ms status=304 bytes=206 protocol=https
2024-03-04T17:59:31.105699+00:00 heroku[router]: at=info method=GET path="/assets/pay-tag-CuCjMCAa.svg" host=********.com request_id=3f29e38b-a325-460b-971c-fd7f12cd3234 fwd="95.168.105.41" dyno=web.1 connect=0ms service=0ms status=304 bytes=206 protocol=https
2024-03-04T17:59:31.128377+00:00 heroku[router]: at=info method=GET path="/assets/logo-maestro-B-t3ZePp.png" host=************.com request_id=b272f585-2cbc-49d1-aaad-09f84eba674f fwd="******" dyno=web.1 connect=0ms service=0ms status=304 bytes=207 protocol=https
2024-03-04T17:59:31.128826+00:00 heroku[router]: at=info method=GET path="/assets/logotype-negative@2x-DZNkYW_q.png" host=*******.com request_id=dcdc100d-9d36-43b8-96fa-edb98a56c1d7 fwd="******" dyno=web.1 connect=0ms service=0ms status=304 bytes=206 protocol=https
2024-03-04T17:59:31.461104+00:00 heroku[router]: at=info method=GET path="/sw.js" host=********.com request_id=1f8aeb92-e711-441d-ba0a-68ebbc499d95 fwd="******" dyno=web.1 connect=0ms service=0ms status=304 bytes=205 protocol=https
2024-03-04T17:59:31.452512+00:00 heroku[router]: at=info method=GET path="/workbox-3e911b1d.js" host=********.com request_id=3c61ba7c-07c1-42b2-946d-149152583175 fwd="*******" dyno=web.1 connect=0ms service=0ms status=304 bytes=206 protocol=https

logs when clicked through instagram bio link (In app browser) and when user chose to open in external browser all is working again.

2024-03-04T17:59:40.320355+00:00 heroku[router]: at=info method=GET path="/sw.js" host=www.******.com request_id=f9190595-1b08-4003-9d4e-c7f440e88fac fwd="*******" dyno=web.1 connect=0ms service=0ms status=304 bytes=205 protocol=https

Two week ago we transitioned from vue-pwa plugin to VitePWA since we transitioned to Vite also. Before that everything was working fine.

houtan-rocky commented 8 months ago

@KresimirCabraja Hi, can you please provide a minimal reproducible example?