Cannot upload all photos in production mode

I’d like to upload photos using Upload component, but it only works on localhost. In prodcution (desktop and smartphones) I cannot upload some of them eg. phots just taken, screenshots on desktop, but it works with screenshots on smartphone or photos download from whatsapp(in my gallery). Browser console shows erros “Failed to load resource: the server responded with a status of 500 ()” and “Uncaught TypeError: Cannot read properties of null (reading ‘sizeBase’)”. Upload shows always UnexpectedServerError. Anyone has any idea what can be a problem?

Can you share the whole Stacktrace?

tmp file creation fails on the production server, but works on local development setup :thinking:

POST (url) 500 (Internal Server Error)
Uncaught TypeError: Cannot read properties of null (reading ‘sizeBase’)
at qi._formatSize (vaadin-bundle-ddd996fbb3062a5d95a5.cache.js:7600:2111)
at qi._setStatus (vaadin-bundle-ddd996fbb3062a5d95a5.cache.js:7600:3752)
at n.upload.onprogress (vaadin-bundle-ddd996fbb3062a5d95a5.cache.js:7600:4275)

No exception to caught in java

but only in some cases, like photo taken, not download or some screnshots

OK, it was tomcat faoul, max size of file was to low

Change in tomcat config and in properties worked