ERROR companion integration with my domain

hey there!
I’m using uppy companion in my existing node js server for getting files into my server from dropbox/instagram/google drive.
The companion is set correctly with port 3020 and my domain name (checked).

The Error I get is: [CompanionClient] unable to make preflight request TypeError: Failed to fetch.
OPTIONS https://<my_domain>.com:3020/dropbox/list/ net::ERR_CONNECTION_TIMED_OUT

In my computer it works with localhost as a companion and domain server as client but only when I put my public ip of the domain.
As I said, it does not work only with my remote domain…any help?

Please see this github comment on how to fix this issue

Well, I added cors to my server, and added the res.setHeader(“Access-Control-Expose-Headers”, “Access-Control-Allow-Headers”);
which was missing, but the error still occurs. there is any special order that I might notice to?

actually this gives an impression that your browser is unable to connect to the server when making that request. Can you check the network tab on your browser to see the details of the request?

Sure, it says: 1.
Request URL: https://my

  1. Referrer Policy:


  1. Request Headers

  2. Provisional headers are shown

  3. Access-Control-Request-Headers:


  1. Access-Control-Request-Method:


  1. Origin:

http://public ip of my domain

  1. Referer:

http://ip of my domain//htmls/upload.html

  1. User-Agent:

Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1

what version of companion are you running? Also what version of @uppy/companion-client are you using?

"@uppy/companion": "^1.3.0",

"@uppy/core": "^1.2.0",

"@uppy/companion-client : "1.2.0"

Hey Alon, how you doing?
I’m having the same issue you had a year ago.
I would like to know what did you do to make it work.
I set cors in my node server and set all the headers too, and I’m still getting this errors.
I think this is generating an error in companion: companion: 2020-08-06T13:04:44.744Z [error] upload.multipart.error upload failed with status: 400
But I don’t know how to fix it.
I would love any help.


1 Like