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

Windows: download's promise fires early #34

Closed
adam-lynch opened this issue Aug 23, 2014 · 4 comments
Closed

Windows: download's promise fires early #34

adam-lynch opened this issue Aug 23, 2014 · 4 comments
Labels

Comments

@adam-lynch
Copy link
Collaborator

I've a valid ZIP at a valid URL and the download callback gets called almost instantly. The download just ends at 0 KB. Any ideas @edjafarov?

@adam-lynch adam-lynch added the bug label Aug 23, 2014
@edjafarov
Copy link
Collaborator

is this a test? or real life app?

@edjafarov
Copy link
Collaborator

try https://github.com/edjafarov/node-webkit-updater/blob/master/app/updater.js#L80 put on('data') to see what are you getting. And check temp dir. My guess it might make sense to clean up previous zip.

@adam-lynch
Copy link
Collaborator Author

Real use case. I'll try that. Maybe we need an .on('error') too. There's no previous ZIP in that location so that wasn't the problem anyway.

@adam-lynch
Copy link
Collaborator Author

It was that I wasn't passing the new manifest to download so it used the original manifest which pointed to URLs which didn't exist. request doesn't throw an error for 404s, etc. it's up to us to check for it. Fixed.

adam-lynch added a commit that referenced this issue Aug 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants