Hi,
Some of my users are encountering random errors while attempting to rotate images.
The example I have at hand is a JPG image and somehow, the error message states that : Unsupported type. Supporter types, if using url for "image_path": jpg, gif, png.
The full logged error is :
2023-07-14 13:33:30,796 | SERVER_CODE | INFO | [81713] Building ServerCode Model for path (/opt/backendless/repo/MY-APP-ID/marketplace/DEPLOYMENT_MODEL/market-A95AFD00-83C9-454D-965D-D6FB315E10B5)
2023-07-14 13:33:30,797 | SERVER_CODE | INFO | [81713] ServerCode Model built in 6ms
2023-07-14 13:33:30,837 | SERVER_CODE | INFO | [81713] [11B3261C-1CB5-B28C-FFE8-6E00D6AC9200] [INVOKE SERVICE] services.ImageProcessor.rotate
2023-07-14 13:33:30,841 | SERVER_CODE | INFO | [81713] Modify image by url: https://eu.backendlessappcontent.com/MY-APP-ID/6C3AA830-C88B-4705-BC37-8CEB1080D5F5/files/assets/boats/0C/UUID.jpg
2023-07-14 13:33:31,162 | SERVER_CODE | ERROR | [81713] Error: Unsupported type. Supporter types, if using url for "image_path": jpg, gif, png.
at getImgExtension (/opt/backendless/repo/MY-APP-ID/marketplace/DEPLOYMENT_MODEL/market-A95AFD00-83C9-454D-965D-D6FB315E10B5/src/workflows/image/common/get-img-extension.js:14:9)
at modifyByUrl (/opt/backendless/repo/MY-APP-ID/marketplace/DEPLOYMENT_MODEL/market-A95AFD00-83C9-454D-965D-D6FB315E10B5/src/workflows/image/modify/index.js:50:19)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async ImageProcessor.rotate (/opt/backendless/repo/MY-APP-ID/marketplace/DEPLOYMENT_MODEL/market-A95AFD00-83C9-454D-965D-D6FB315E10B5/src/service.js:139:27)
at async Object.executor.execute (/usr/local/lib/node_modules/backendless-coderunner/lib/server-code/runners/tasks/executor.js:238:16)
at async executeTask (/usr/local/lib/node_modules/backendless-coderunner/lib/server-code/runners/cloud-worker.js:82:24)
at async processTask (/usr/local/lib/node_modules/backendless-coderunner/lib/server-code/runners/cloud-worker.js:111:3)
2023-07-14 13:33:31,162 | SERVER_CODE | INFO | [81713] Processing finished in 376.030ms
(app ID and image ID have been replaced by placeholders)
I have tested the image and, despite changing its extension, I have confirmed that it is indeed a valid JPG file. Here is what ImageMagick says about it :
identify UUID.bin
UUID.bin JPEG 375x500 375x500+0+0 8-bit sRGB 32587B 0.000u 0:00.001
Can you help me understand what is causing the error ? Thanks !