Wappler 3.5.1 - S3 Upload Control / Message: TypeError: Cannot read property 'indexOf' of undefined

MacOs / Wappler 3.5.1. / PHP Platform / Provider: Wasabi
How to repeat: Just do a S3 signed upload with Wappler 3.5.1.

Hi,

today I set an S3 Upload control. I used exactly the same server connect I already used before but this time I get the following message:

TypeError: Cannot read property ‘indexOf’ of undefined

I tried to see If I get a CORS error but no CORS error. I already set FullAccess Policy in Wasabi that is like S3 Full Access in AWS.

Any suggestion @patrick ?

EDIT: I tried the same script on Digital Ocean and get exactly the same error.

Confirming I’m getting the ‘infexOf’ of undefined still in NodeJS project as well. @patrick

What does the ajax call return? Should be a json with an url property on it.

tell me how to find the ajax call return and will send it to you

it gives me also this error:

I checked and I have not this file in local nor in server.
Can help it ?

You can ignore the source map files warnings. They are not related to the functionality and have nothing to do with any bug ever :slight_smile:

1 Like

In the network tab check the response of the call to upload_document.php, it is that server action that is returning an error.

You may also test following update, unzip file in dmxConnectLib/lib.

App.zip (2.0 KB)

Will check as arriving in office! Thank you

Hi @patrick,

I change the new App file and uploaded it but the result remains the same.

You can check it on:

http://kyc.relocatetorussia.com/tets.php

CORS rules are set on Digital Ocean

It’s not an cors issue, the error is in the server connect action file upload_document.php.

Could you perhaps send me that file in a private message, the error shows that the endpoint is missing. Could be that it was incorrect generated or that there is a bug in server connect.

sent you in private message

OK reloaded the dmxConnectLib and it worked!

Thank you very much !!

@patrick still an issue for me on NodeJS.

Just tried again, and I get the following error:

Preview

1. {status: "500", message: "endpoint.indexOf is not a function",…}

  1. message: "endpoint.indexOf is not a function"
  2. stack: "TypeError: endpoint.indexOf is not a function↵ at App.setS3Provider (/opt/node_app/lib/core/app.js:236:28)↵ at App.getS3Provider (/opt/node_app/lib/core/app.js:255:25)↵ at App.putFile (/opt/node_app/lib/modules/s3.js:62:25)↵ at App._exec (/opt/node_app/lib/core/app.js:393:57)↵ at App._exec (/opt/node_app/lib/core/app.js:364:28)↵ at async App.exec (/opt/node_app/lib/core/app.js:335:9)↵ at async App.condition (/opt/node_app/lib/modules/core.js:96:17)↵ at async App._exec (/opt/node_app/lib/core/app.js:393:30)↵ at async App._exec (/opt/node_app/lib/core/app.js:364:17)↵ at async App.exec (/opt/node_app/lib/core/app.js:335:9)"
  3. status: "500"

Update for NodeJS, unzip in lib/core.

app.zip (3.4 KB)

1 Like

thank you @patrick this fixed it.

Fixed in Wappler 3.5.2

1 Like

This topic was automatically closed after 2 days. New replies are no longer allowed.