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

Downloading with unknown extension #14

Closed
majinsaiyan opened this Issue Jul 22, 2014 · 9 comments

Comments

Projects
None yet
3 participants
@majinsaiyan

majinsaiyan commented Jul 22, 2014

I am using latest version and found out that the file is downloading with an unknown extension and the name isn't displayed properly. It's using version number of that particular app as downloaded name. Although renaming it to .apk solves this. Any workaround? Using chrome 36.0.1985.125 m

@Lekensteyn Lekensteyn added the bug label Jul 23, 2014

@Lekensteyn

This comment has been minimized.

Owner

Lekensteyn commented Jul 23, 2014

What name is shown and what would you expect instead? It should be something like com.example.app-1234.apk.

@majinsaiyan

This comment has been minimized.

majinsaiyan commented Jul 23, 2014

Its showing the file version name as downloaded name. For example, https://play.google.com/store/apps/details?id=com.gaana&hl=en
If i download this app, the app name is downloaded as 407( its current version 4.07 ). I am using this extension after a long time, but i'm sure it worked normally before (with original apk name as downloaded name). And what about the name extension? Its only showing 407. There is no .apk extension while downloading. I need to rename it every time i download

@Lekensteyn

This comment has been minimized.

Owner

Lekensteyn commented Jul 27, 2014

I can confirm this bug which is odd, since the message printed in the console indicates that a file with an apk download is offered. Perhaps the Chrome API has changed. Let's see.

@Lekensteyn

This comment has been minimized.

Owner

Lekensteyn commented Jul 27, 2014

Reproduced with:

var a=document.createElement("a");a.href="http://example.net/meh.bar"; a.download = "foo.txt";a.click();

Chromium 36.0.1985.125-1. Maybe (or maybe not) related: http://stackoverflow.com/q/23816005/427545 https://code.google.com/p/chromium/issues/detail?id=373182. Especially the commit message in comment 49 seems to explain the "bug" / "feature".

To fix this, the extension should add a Content-Disposition header. Not sure whether this will require additional permissions though.

The "4" comes from the redirected URL:

  • http://android.clients.google.com/market/download/Download?packageName=com....&versionCode=4&token=...&downloadId=1234...
    • http://r8---sn-5hn7sn7r.c.android.clients.google.com/market/GetBinary/GetBinary/com..../4?mm=31&ms=au&mt=1406493930&mv=m&mws=yes&expire=1406666810&ipbits=0&ip=0.0.0.0&cp=...&sparams=...&signature=ABCD...&key=am3
      • ...
@majinsaiyan

This comment has been minimized.

majinsaiyan commented Jul 28, 2014

Will u upload fixed version then? And there is another bug and i think you are aware of it. Chrome disables 3rd party extensions. So, even if we drag and drop to install, after sometime probably after restarting chrome, it disables automatically and never can be used again.

@Lekensteyn

This comment has been minimized.

Owner

Lekensteyn commented Jul 28, 2014

I have not yet had the opportunity to look deeper into this, and it is not high on my priority list. Maybe @Rob--W wants to look at this?

Google's approach to third party extensions (read: extensions not in their extension gallery) is also not motivating either.

@Rob--W Rob--W closed this in 9beec4b Jul 28, 2014

@Rob--W

This comment has been minimized.

Collaborator

Rob--W commented Jul 28, 2014

I have published some changes that ought to resolve the issue. Let me know if the issues are fixed with this update. Peter will publish the update and changelog within an hour.

@Lekensteyn

This comment has been minimized.

Owner

Lekensteyn commented Jul 28, 2014

I have verified that Rob fixed the issue.

v2.1 is released with this and another improvement. Let me know if there are any other problems. Changelog and links are available on https://lekensteyn.nl/apk-downloader/

@majinsaiyan

This comment has been minimized.

majinsaiyan commented Jul 29, 2014

Thanks for the new version. It's working now with original apk name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment