Uppy-Companion on Azure fails

I publish a NodeJS server with Companion on Azure. After a lots of issues I could ran the Companion server. I create a html page with Uppy control and test the control. If I use http with port 3020, I have a lot of errors with CORS (I enabled CORS on NodeJS Express) and I can’t use Uppy. If I use https with 443 port, Companion fails " /drive/list/root. Error: Failed request with status: 404. Not Found loggers.js:20"
Anyone can help me?
Thanks in advance

Matías Creimerman

Can it be because in Azure always redirect to port 80 or 443?
Companion works with this ports? I can’t make it work

Matias Creimerman

You could try setting a COMPANION_PORT=80 environment variable. If the port thing is to blame, that should work—otherwise it’s probably something else!

Now I try setting the https port (443) and receive this error:



  throw er; // Unhandled 'error' event


Error: listen EACCES: permission denied :::443

at Server.setupListenHandle [as _listen2] (net.js:1300:14)

at listenInCluster (net.js:1348:12)

at Server.listen (net.js:1436:7)

at Function.listen (D:\home\site\wwwroot\node_modules\express\lib\application.js:618:24)

at Object.<anonymous> (D:\home\site\wwwroot\server.js:76:22)

at Module._compile (internal/modules/cjs/loader.js:956:30)

at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)

at Module.load (internal/modules/cjs/loader.js:812:32)

at Function.Module._load (internal/modules/cjs/loader.js:724:14)

at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)

Emitted ‘error’ event on WebSocketServer instance at:

at Server.<anonymous> (D:\home\site\wwwroot\node_modules\ws\lib\WebSocketServer.js:85:46)

at Server.emit (events.js:210:5)

at Server.EventEmitter.emit (domain.js:476:20)

at emitErrorNT (net.js:1327:8)

at processTicksAndRejections (internal/process/task_queues.js:80:21) {

code: ‘EACCES’,

errno: ‘EACCES’,

syscall: ‘listen’,

address: ‘::’,

port: 443


I set again the port to 3020 but I receive this error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://[MYSERVER].azurewebsites.net:3020/drive/list/root. (Reason: CORS request did not succeed).

I could solved! It was an Azure-NodeJS configuration.

Matias Creimerman

1 Like