illogical-robot / apkmirror-public

APKMirror.com bugs
http://www.apkmirror.com
112 stars 24 forks source link

cannot download apk's #49

Closed ghost closed 4 years ago

ghost commented 6 years ago

Expected behavior

Clicking on the download link should start downloading the apk requested.

Actual behavior

Clicking on the download link reloads the page. This happens on my android device (where I use Firefox) as well as on my desktop (where I use Waterfox). I tried disabling all my 'privacy'-addons such as ublock origin and decentraleyes, I disconnected my vpn and accepted all cookies, but the problem persists. The interesting part is that this did not happen before, I succesfully downloaded several apk's from this site yesterday as well as today, but all of a sudden this did not work anymore, without me changing anything to my settings or anything. Nevertheless I guess it does have something to do with my settings, but I cannot figure out which ones. Anyone here any clue about what my problem may be? As said it worked in the past, and I can still download apk's from other sites, such as apkpure.

Steps to reproduce the problem

Just try to download any apk, I tried several, and also several versions of one app.

archon810 commented 6 years ago

The only thing I can think of is your privacy add-ons somehow tripped our anti-hotlinking logic, which redirects to a page hosting the apk, and Cloudflare cached the response in your geographic location, but it shouldn't happen since we use no-cache headers on such redirects.

Otherwise, I'm really not sure, especially when it's happening to all APKs as you're saying. Is it possible your HTTP referer is getting mangled (not stripped, but actually rewritten to be something other than apkmirror.com)?

Can you look at the response headers for the download request and post them here? It's not happening to anyone else that I know of.

archon810 commented 6 years ago

No response has been received. Closing.

temporaryrespite commented 4 years ago

"Download APK" acts like a page refresh instead.

Expected behavior

See the download page which also attempts to auto-download the APK.

Actual behavior

pressing "Download APK" just simply refreshes the webpage as if I pressed Reload button in browser.

Steps to reproduce the problem

  1. On ArchLinux, in Firefox 75.0a1 (2020-03-02) (64-bit) (but not the upstream version), load either of these two pages: A. https://www.apkmirror.com/apk/google-inc/google-play-services/google-play-services-20-06-16-release/google-play-services-20-06-16-000300-296104215-android-apk-download/ B. https://www.apkmirror.com/apk/nick-nack-development/dpi-checker/dpi-checker-6-0-release/dpi-checker-6-0-2-android-apk-download/
  2. click "Download APK"

Other info

There's a warning in Ctrl+Shit+J (in firefox) aka Multiprocess Browser Console: Content Security Policy: Couldn’t process unknown directive ‘prefetch-src’ No red errors.

This worked as expected only once(and thus was able to download one of the APKs), and only after I've allowed requests(via uMatrix addon) to the hostname instant.page. Now they are still allowed, however it acts the same: it just refreshes the page. Weird as I haven't changed anything since then, trying to redownload the same APK which once worked, but still getting page refresh instead.

I haven't tried without any addons, or with a clean firefox profile, or with upstream archlinux firefox. Because, since it worked once, the problem must not be on my side?!

Can you look at the response headers for the download request and post them here?

Response headers you say? The Network tab inside the F12 miniframe that firefox opens is white/blank even if I do a shift+refresh.

unsurprising firefox bugs ``` 21:50:15.394 Could not map contract ID '@mozilla.org/sharepicker;1' to CID {1201d357-8417-4926-a694-e6408fbedcf8} because no implementation of the CID is registered. 21:50:17.143 Content Security Policy: Couldn’t process unknown directive ‘prefetch-src’ 21:50:41.514 This site appears to use a scroll-linked positioning effect. This may not work well with asynchronous panning; see https://developer.mozilla.org/docs/Mozilla/Performance/ScrollLinkedEffects for further details and to join the discussion on related tools and features! 49 21:49:59.061 Content Security Policy: Couldn’t process unknown directive ‘prefetch-src’ 21:53:02.543 Error while calling actor 'accessibility's method 'getWalker' AccessibleWalkerActor is not defined Actor.js:91 writeError resource://devtools/shared/protocol/Actor.js:91 handler resource://devtools/shared/protocol/Actor.js:192 21:53:02.544 getWalker@resource://devtools/server/actors/accessibility/accessibility.js:272:0 handler@resource://devtools/shared/protocol/Actor.js:154:0 onPacket@resource://devtools/server/devtools-server-connection.js:380:0 receiveMessage@resource://devtools/shared/transport/child-transport.js:66:0 Actor.js:96 writeError resource://devtools/shared/protocol/Actor.js:96 handler resource://devtools/shared/protocol/Actor.js:192 21:53:36.874 stylesheets actor: fetch failed for https://fonts.googleapis.com/css?family=Roboto%3A100%2C300%2C400%2C500&ver=5.3.2, using system principal instead. stylesheets.js:229 fetchStylesheet resource://devtools/server/actors/stylesheets.js:229 21:55:59.585 Error while calling actor 'accessibility's method 'getWalker' AccessibleWalkerActor is not defined Actor.js:91 writeError resource://devtools/shared/protocol/Actor.js:91 handler resource://devtools/shared/protocol/Actor.js:192 21:55:59.586 getWalker@resource://devtools/server/actors/accessibility/accessibility.js:272:0 handler@resource://devtools/shared/protocol/Actor.js:154:0 onPacket@resource://devtools/server/devtools-server-connection.js:380:0 receiveMessage@resource://devtools/shared/transport/child-transport.js:66:0 Actor.js:96 writeError resource://devtools/shared/protocol/Actor.js:96 handler resource://devtools/shared/protocol/Actor.js:192 21:56:14.776 Error while calling actor 'accessibility's method 'getWalker' AccessibleWalkerActor is not defined Actor.js:91 writeError resource://devtools/shared/protocol/Actor.js:91 handler resource://devtools/shared/protocol/Actor.js:192 21:56:14.777 getWalker@resource://devtools/server/actors/accessibility/accessibility.js:272:0 handler@resource://devtools/shared/protocol/Actor.js:154:0 onPacket@resource://devtools/server/devtools-server-connection.js:380:0 receiveMessage@resource://devtools/shared/transport/child-transport.js:66:0 Actor.js:96 writeError resource://devtools/shared/protocol/Actor.js:96 handler resource://devtools/shared/protocol/Actor.js:192 21:56:21.429 Error while calling actor 'accessibility's method 'getWalker' AccessibleWalkerActor is not defined Actor.js:91 writeError resource://devtools/shared/protocol/Actor.js:91 handler resource://devtools/shared/protocol/Actor.js:192 21:56:21.429 getWalker@resource://devtools/server/actors/accessibility/accessibility.js:272:0 handler@resource://devtools/shared/protocol/Actor.js:154:0 onPacket@resource://devtools/server/devtools-server-connection.js:380:0 receiveMessage@resource://devtools/shared/transport/child-transport.js:66:0 Actor.js:96 writeError resource://devtools/shared/protocol/Actor.js:96 handler resource://devtools/shared/protocol/Actor.js:192 ```

Deselecting uMatrix's Spoof HTTP referrer string of third-party requests seems to have no effect. Tried even with shift+Reload first.

archon810 commented 4 years ago

I was just able to successfully download the APKs: image

This issue does come up sometimes, but we haven't been able to trace its origins.

I don't use Firefox dev tools, but if you use Chrome, can you:

  1. Open Dev Tools and go to the Network tab.
  2. Enable "Preserve log" there.
  3. Visit the page that's giving you trouble, such as https://www.apkmirror.com/apk/google-inc/google-play-services/google-play-services-20-06-16-release/google-play-services-20-06-16-000300-296104215-android-apk-download/download/, filter by "download.php" and paste the response headers?

For example: image

temporaryrespite commented 4 years ago

It seems to always work in Chromium, and (almost)never work in Firefox. (I say almost because I did make it work once, as mentioned) Due to some Firefox bug, I'm unable to see the network requests, however I tried mozregression and can't find a version which doesn't have tabcrash on startup, weird. Oh wait, I found one: mozilla-central build for 2020-03-10 and it seems to work just like chromium. Then I can only assume it's the vendor.js settings that I've set. Or something like that. I guess this can be closed then?