transloadit / uppy-server

[DEPRECATED] 'Uppy Server' was renamed to 'Companion' and lives inside the Uppy repo no
https://github.com/transloadit/uppy/tree/master/packages/%40uppy/companion
MIT License
114 stars 27 forks source link

Trouble with uploading from google drive #54

Closed dersar00 closed 6 years ago

dersar00 commented 6 years ago

Hello, when i'm connecting to google drive, select a jpg file and after i start to upload this file I get this error and my server shutting down. image

ifedapoolarewaju commented 6 years ago

@dersar00 it seems the upload request to the multipart server returns an error. Can you check if the request reaches your multipart server?

Also can you share your uppy-client code here?

dersar00 commented 6 years ago

@ifedapoolarewaju my uppy-clien code: https://pastebin.com/59P6JjAn

ifedapoolarewaju commented 6 years ago

.use(XHRUpload, {endpoint: "/files/upload", fieldName: 'file', formData: true})

@dersar00 your endpoint should be a full url as in "http://localhost:5000/files/upload"

dersar00 commented 6 years ago

@ifedapoolarewaju it's doesn't help now it's look like this image

ifedapoolarewaju commented 6 years ago

@dersar00 there's a bug in there indeed that prevents us from seeing the error because we are trying to log an undefined response.statusCode along with it. I am going to release a patch to fix this.

I'm going to do this in a couple hours and you can update and try this again. Is that ok? 🙂

ifedapoolarewaju commented 6 years ago

I have published a patch for this at v0.10.1. Please run npm install uppy-server@0.10.1 to install and try this again?

dersar00 commented 6 years ago

Thanks, bro! I try it tomorrow, and will report result here.

dersar00 commented 6 years ago

@ifedapoolarewaju i run uppy server as standalone, after updating code, i can't run it. image

ifedapoolarewaju commented 6 years ago

@dersar00 did you update via npm or are you using github?

If you are using github then it means you also inherited the other new changes, so please start the server with npm start instead of npm run start:production (this has been changed). Sorry for the confusion.

dersar00 commented 6 years ago

@ifedapoolarewaju When I start with npm start it's return me a similar error.

dersar00 commented 6 years ago

@ifedapoolarewaju try to run server as standalone after cloning from github.

ifedapoolarewaju commented 6 years ago

how are you loading your uppy config? do you have an env.sh file that you need to update?

ifedapoolarewaju commented 6 years ago

or perhaps you need to run the config script before starting the server like so:

sh env.sh && npm start

dersar00 commented 6 years ago

@ifedapoolarewaju Yes, I have env.sh file. This is something incredible, when i run first with command sh env.sh && npm start it's starts well, but after i try reload it, it's return me error. image Now i get a similar error when I try to start this with command npm start.

ifedapoolarewaju commented 6 years ago

yes, it's saying the port 3020 is already in use. This is because you still have the server running somewhere else maybe? And you are trying to start it again without killing the currently running one?

dersar00 commented 6 years ago

I don't know why it's return me this error, because in browser when i opening http://localhost:3020/ it's don't open me anything. So, ok, I had open 2 term tabs, after I rerun term and try to start the server it's again return me error. image

ifedapoolarewaju commented 6 years ago

@dersar00 are these options set in the env.sh file?

UPPYSERVER_SECRET UPPYSERVER_DOMAIN UPPYSERVER_DATADIR

dersar00 commented 6 years ago

@ifedapoolarewaju Yes.

ifedapoolarewaju commented 6 years ago

try source env.sh && npm start instead

dersar00 commented 6 years ago

@ifedapoolarewaju One step is done, it's starts. So now when i try to upload file from google drive, comparatively with yesterdays error it's don't stop my server, but return me error image image

ifedapoolarewaju commented 6 years ago

yeah it seems you are not setting the endpoint url the right way? Did you change the uppy client code from yesterday? Can you paste what the code now looks like?

dersar00 commented 6 years ago

@ifedapoolarewaju it's here https://pastebin.com/n3WUwyi9

ifedapoolarewaju commented 6 years ago

this url links to probably your env.sh instead 🙂

dersar00 commented 6 years ago

@ifedapoolarewaju Yes, sorry I'm misunderstood. https://pastebin.com/ABRnEpzn

ifedapoolarewaju commented 6 years ago

hmm it seems to be related to this https://github.com/nodejs/node/issues/5436 . It works with no issues on my machine. What version of node are you running? What OS are you running?

dersar00 commented 6 years ago

@ifedapoolarewaju node resion - v9.4.0 mac OS Siera 10.12.6

dersar00 commented 6 years ago

I change XHRUpload to Tus and it starts work correct.

jsrj commented 6 years ago

Not sure if it is a similar issue or not, but even in using the "Getting Started" section on transloadit.com, it fails to upload and when reading the details, I get:

error | CLOUDFILES_STORE_ERROR message | Transloadit was unable to store the given file in the container. reason | One of our commands reported an error. with code undefined: undefined

ifedapoolarewaju commented 6 years ago

Hi @jsrj this seems like it could rather be an issue with the Assembly instructions you are sending to Transloadit. Could you share the code snippet you are using?

kvz commented 6 years ago

Hi there, about CLOUDFILES_STORE_ERROR, another user reported this error and it was because they had not specified the rackspace datacenter along with their store instructions. It seems Rackspace may have made a breaking change meaning this now is required. Could this be the case for you as well?