pwa-builder / PWABuilder

The simplest way to create progressive web apps across platforms and devices. Start here. This repo is home to several projects in the PWABuilder family of tools.
https://docs.pwabuilder.com
Other
2.71k stars 280 forks source link

[BUG] Getting a MIME type error (image/webp) but can't find what's causing the error #4808

Closed jahir10ali closed 3 weeks ago

jahir10ali commented 3 weeks ago

Link to the report card page

https://www.pwabuilder.com/reportcard?site=https://jahir10ali.github.io/trackmytube/

What Store were you trying to package for?

Android (error happens on both Google Play and Other Android section)

What is the error message you received?

Internal Server Error

Status code: 500. Error generating app package: Unsupported MIME type: image/webp

Paste your stack trace below

The site I was testing is: https://jahir10ali.github.io/trackmytube/ Error: Unsupported MIME type: image/webp at Jimp.throwError (/app/node_modules/@jimp/utils/dist/index.js:21:13) at Jimp.parseBitmap (/app/node_modules/@jimp/core/dist/utils/image-bitmap.js:159:32) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

What environment were you using?

OS: Windows 10 Browser: Google Chrome Browser Version: 128.0.6613.120

Additional context

Was suggested to check my project files and the manifest to identify if any 'webp' file is in use and to change to to png, also was told to try the Network tab on Chrome to check for any 'webp' but I don't have any files like that. For images I have png, jpg, svg. But I still don't understand the problem anyway, like I don't get what the error means (assuming it means I have a webp file somewhere but I don't lol) and what's causing it. Any help appreciated!

maiconcarraro commented 3 weeks ago

@jahir10ali your image https://jahir10ali.github.io/trackmytube/img/icons/icon-512x512.png isnt a real png, probably someone renamed the extension, if you upload this file to any website to check mime type it's going to say webp, recommend to convert the image and/or use a software that can actually save in png

jahir10ali commented 3 weeks ago

@jahir10ali your image https://jahir10ali.github.io/trackmytube/img/icons/icon-512x512.png isnt a real png, probably someone renamed the extension, if you upload this file to any website to check mime type it's going to say webp, recommend to convert the image and/or use a software that can actually save in png

wth lol the weird thing is that after you told me that, i am checking the mime type of my icons and it reads image/webp. but after doing this the whole morning today, it returned image/png. like literally the whole morning i was confident it was a png but now it tells me its a webp all of a sudden. and i didnt change any files in my project folder. but anyway thanks for the help.

maiconcarraro commented 3 weeks ago

@jahir10ali It could be the hosted provider, for example cloudflare can optimize images and they convert into webp (if set)