Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uppy uploader is not able to upload files using url provider. #1581

Closed
dioniciodiaz opened this issue May 21, 2019 · 9 comments
Closed

Uppy uploader is not able to upload files using url provider. #1581

dioniciodiaz opened this issue May 21, 2019 · 9 comments
Assignees
Labels
Bug Companion The auth server (for Instagram, GDrive, etc) and upload proxy (for S3)

Comments

@dioniciodiaz
Copy link

I was testing the uppy url and the google driver providers with the companion server that is in your examples (https://github.com/transloadit/uppy/blob/master/examples/uppy-with-companion/server/index.js). The package version was

"@uppy/companion": "^1.0.2".
 // in the front end i was using the following pluggins:
"@uppy/core": "1.0.1",
"@uppy/dashboard": "1.0.1",
"@uppy/file-input": "1.0.1",
"@uppy/google-drive": "1.0.1",
"@uppy/url": "1.0.1",
"@uppy/xhr-upload": "1.0.1",

It seems that when the request sent by the dashboard hits companion. Companion tryes to send the files to my backend but it fails.

uppy: 2019-05-21T19:30:57.976Z [debug]  URL file import handler running
uppy: 2019-05-21T19:31:35.190Z [debug]  URL file import handler running
uppy: 2019-05-21T19:31:35.725Z [debug]  Instantiating uploader.
uppy: 2019-05-21T19:31:35.729Z [debug]  Waiting for socket connection before beginning remote download.
uppy: 2019-05-21T19:31:35.736Z [debug] uploader.socket.wait a8589d1a waiting for connection
uppy: 2019-05-21T19:31:36.220Z [info] socket.connect connection received from a8589d1a-e34f-49c5-90e0-970cb62f97f3
uppy: 2019-05-21T19:31:36.223Z [debug]  Socket connection received. Starting remote download.
uppy: 2019-05-21T19:31:36.520Z [debug] uploader.download.progress a8589d1a 8186 bytes
uppy: 2019-05-21T19:31:36.522Z [debug] uploader.illusive.progress a8589d1a 0 4093 8186
uppy: 2019-05-21T19:31:36.523Z [debug] uploader.upload.progress a8589d1a 4093 8186 50.00%
\Projects\companion-test\node_modules\delayed-stream\lib\delayed_stream.js:33
  source.on('error', function() {});
         ^

TypeError: source.on is not a function
    at Function.DelayedStream.create (\Projects\companion-test\node_modules\delayed-stream\lib\delayed_stream.js:33:10)
    at FormData.CombinedStream.append (\Projects\companion-test\node_modules\combined-stream\lib\combined_stream.js:45:37)
    at FormData.append (\Projects\companion-test\node_modules\form-data\lib\form_data.js:74:3)
    at appendFormValue (\Projects\companion-test\node_modules\request\request.js:323:21)
    at Request.init (\Projects\companion-test\node_modules\request\request.js:334:11)
    at new Request (\Projects\companion-test\node_modules\request\request.js:128:8)
    at request (\Projects\companion-test\node_modules\request\index.js:53:10)
    at Function.post (\Projects\companion-test\node_modules\request\index.js:61:12)
    at Uploader.uploadMultipart (\Projects\companion-test\node_modules\@uppy\companion\lib\server\Uploader.js:341:17)
    at WriteStream.writeStream.on (\Projects\companion-test\node_modules\@uppy\companion\lib\server\Uploader.js:151:26)
@arturi arturi added Companion The auth server (for Instagram, GDrive, etc) and upload proxy (for S3) and removed Triage labels May 22, 2019
@ifedapoolarewaju
Copy link
Contributor

@djlocoja from the error it seems more like you are using incompatible versions somewhere between:
delayed-stream, combined-stream, form-data, and request. How did you install the required modules? Also what versions of npm and node are you using?

@dioniciodiaz
Copy link
Author

@djlocoja from the error it seems more like you are using incompatible versions somewhere between:
delayed-stream, combined-stream, form-data, and request. How did you install the required modules? Also what versions of npm and node are you using?

@ifedapoolarewaju
How did you install the required modules?
I copy the server folder and the package.json of these example (https://github.com/transloadit/uppy/blob/master/examples/uppy-with-companion).

Also what versions of npm and node are you using?
I am using nvm 1.1.7 on windows . At that moment i was using node version 8.9.1 with the npm version 6.2.0. This morning when i saw this message i install the latest node lts version 10.15.3 and it came with the same version of npm. Then i reinstall the node_modules but it throws the same error.

Gist with my code.

@DannyFeliz
Copy link

I'm facing the same issue

@arturi
Copy link
Contributor

arturi commented May 24, 2019

@DannyFeliz hi, are you using Windows?

@ifedapoolarewaju
Copy link
Contributor

@djlocoja seems it might be related to this. We are indeed doing an Object.assign that may cause this. But what's weird is that I can't reproduce this on my machine. What OS are you running the server on?

@dioniciodiaz
Copy link
Author

@djlocoja seems it might be related to this. We are indeed doing an Object.assign that may cause this. But what's weird is that I can't reproduce this on my machine. What OS are you running the server on?

Hi @ifedapoolarewaju , I was running the server on Windows 10 and then I tried inside the Windows Subsystem for Linux (WSL) but I got the same results.

image

@DannyFeliz
Copy link

@DannyFeliz hi, are you using Windows?

Windows 10

@gabbanaesteban
Copy link

I'm facing the same issue.

I'm using MacOs

@ifedapoolarewaju
Copy link
Contributor

@djlocoja @gabbanaesteban @DannyFeliz could you possibly check what version of the request library is in your node_modules? Same for delayed-stream? Not sure why I didn't ask this question before, but since the error is coming from there, the versions are the culprit.

@arturi arturi closed this as completed May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Companion The auth server (for Instagram, GDrive, etc) and upload proxy (for S3)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants