Image processor - issue while rotating

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 !

Could you share an image that triggers an error and set up the test API service method that will fall with this error?

Please check out the log of my app for today 16:38:37.49 , 16:38:41.164 and 16:38:53.164

Yet another user image which triggered the issue. You will find the image URL in there. I am not including it openly here for confidentiality reasons.

My app ID is D7075715-5086-625A-FFAB-39C2F40FB200

The logic triggered is

If you need other examples, there were 9 cases in the Jul 15 2023 logfile, and 3 in the file from yesterday. Each time the image path is right before the error.

Sorry for the long response. We already working on this issue, and will notify you when it has been fixed.

Regards, Dima.

1 Like

Hi @Nicolas_REMY,

We have just updated the API service, fixing the issue you described. Please reinstall (uninstall and install again) the service from the marketplace to get the changes. Can you please let us know if the fix works for you?

Regards,
Marina

Hi and thank you.
Before I uninstall and reinstall, I would like to know : is this going to break existing logics which already use the blocks ?

Hi @Nicolas_REMY,

Sorry for the delay in response. No, the existing logic will not be broken if you uninstall and install the service afterward.

Regards,
Marina