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

Yalp shows apps, but can't download #526

Closed
starbrights opened this issue Sep 2, 2018 · 17 comments
Closed

Yalp shows apps, but can't download #526

starbrights opened this issue Sep 2, 2018 · 17 comments
Milestone

Comments

@starbrights
Copy link

starbrights commented Sep 2, 2018

Yalp has network connection an can show me the desired app in store. But after pressing download nothing happened.
I created a log.
This issue doesn't happened right at the beginning, but after a while of using it. I don't know how to trigger it. I can't exclude an LOS issue.
Even clearing data and reboot doesn't solve the issue.
Device is a Galaxy A3 A320FL with latest LOS 15.1, Yalp is latest stable 0.43 from FDroid, ientified with yalp acount.
los15.1 - yalp-download.txt

I don't know what the camera is involved here. Also the download path seems ok for me. I can't create files there.

@haarp
Copy link

haarp commented Sep 3, 2018

Same here. It starts a download but never receives any data. LineageOS 15.1 aswell. Aurora Store exhibits the same problem. Doesn't matter if I'm using the anonymous or my own Google account.

@starbrights
Copy link
Author

Thanks for this feedback. So it is a LineageOS 15.1 issue? What device do you have? Which LOS date? Did you found a workaround?
For me the most strange thing is, that this problem occurs not right from the start. "Selfmodifying code" :(

@haarp
Copy link

haarp commented Sep 3, 2018

I suspect it's either an issue with LOS, or with Android 8. I'm using lineage-15.1-20180828-nightly-shamu (Nexus 6). Another device running Cyanogenmod 13 works for me.

Are you using a firewall like Afwall by any chance?

No workaround or solution so far, but you can use apkpure.com to download apks in the meantime.

@DanGLES3
Copy link

DanGLES3 commented Sep 3, 2018

all working fine on Lineage 15.1 for me tho

@yeriomin
Copy link
Owner

yeriomin commented Sep 5, 2018

[09-02 16:03:02.087 3631:3643 W/DownloadManager] Path appears to be invalid: /storage/emulated/0/Download/org.openintents.filemanager.39.apk

This log line seems to indicate there is a problem with DownloadManager. It is an internal android component used by Yalp Store. DownloadManager is a consistent source of problems for a small number of users. Here is a FAQ entry about it:

Q: I cannot download files! Downloads start but do not progress or stop midway. / I'm having error 495. / I don't like Android built-in DownloadManager. Is Yalp going to have its own download manager?

A: Try turning off VPN or ad-blocking apps first. Yalp already has a mini download manager. It is used as a fallback when system DownloadManager is disabled or unavailable for any other reason. You can force Yalp to use the fallback download manager like this: Settings -> Apps -> Show system -> Download Manager -> Disable. Setting download location to internal storage also turns the fallback on. I'm not setting the fallback as default because it is very minimalisic and is never going to be as well-tested and feature-rich as the system DownloadManager.

I wrote this FAQ entry over a year ago. There have been many bug reports exactly like this one since that time, but no bug reports related to the fallback. Maybe it is time to consider it stable and make it default. Fallback is used on:

  • All androids older than Honeycomb
  • When system DownloadManager is disabled or unavailable for any other reason
  • On Nougat when VPN is used (an android bug workaround)
  • When proxy or tor is used
  • When internal storage is used for downloads

So it should be used all the time on quite a lot of devices. Thoughts?

An unrelated question: why don't people read the FAQ? ;) Even googling "yalp store download doesnt start" gives me gives me issues from the beginning of 2017 with answers. Not trying to be rude. Maybe there is a way to make it more visible or in a more obvious place?

@haarp
Copy link

haarp commented Sep 5, 2018

Thanks for your answer!

I didn't think to check the FAQ, as I have two devices set up quite similarly. The CM13 one can download apks, the LOS15.1 one doesn't. So in my shortsightedness I expected the issue to be the OS ;)

In my case, disabling the adblocker and using the internal downloader doesn't help. Is there any way to log the HTTP request used to do the final apk download, including headers sent? Is it the one to https://android.clients.google.com/fdfe/delivery?

If you want to make it more visible, I would suggest adding the hint to the app itself. Something like "Download failed, check the FAQ". Also putting the final http request in the log in its entirety (unless it contains sensitive information) would be a good idea for debugging.

@starbrights
Copy link
Author

Blame on me that I don't find this. I went through this settings but I couldn't guess that "load to internal memory" changes the things (with it, it works).
But as initially stated - at the beginning it works with standard settings. Also enable/disable FW doesn't make a difference, neither reboot nor clear memory. Adblocker was not installed. So it keeps a miracle.
Also Download-Manager seems to work with other apps, so it seems that only Yalp and Aurora make trouble. That's why I suspected other issues.
Thanks for your patience, and I would agree a pop-up-hint might useful or making internal to be default. Honestly - I spend hours with this, suspected Magisk, Firewall, Adblocker, Xposed , MicroG, OS itself and installed again and again with reduced features. That this problem occurs just after hours of using doesn't make things easier.
Nevertheless, thanks for this great app! Honestly.

@yeriomin
Copy link
Owner

yeriomin commented Sep 5, 2018

@haarp
@starbrights

Is there any way to log the HTTP request used to do the final apk download, including headers sent?

Long-pressing download button lets you choose which app to use for download.

Is it the one to https://android.clients.google.com/fdfe/delivery

No, delivery is the request to get the download link.

I went through this settings but I couldn't guess that "load to internal memory" changes the things

And you are not expected to.

Also Download-Manager seems to work with other apps

What other apps use DownloadManager?

I would agree a pop-up-hint might useful or making internal to be default.

Internal/external switch has a different purpose, obviously. If DownloadManager doesn't work, it should be fixed or replaced. Making the user try some unrelated setting to fix this is worse then making it fail. At least this way the user has to come here and make a bug report, otherwise I won't even know about the problem. And the FAQ seemed to be a good place to explain this since DM works properly for 99% of users.

And technically it is a LOS issue ;) since DownloadManager is a part of the OS and it fails to report the problem to the app using it and only drops a warning into a log. So I'm curious - what LOS build do you guys have? For example lineage-15.1-20180903-nightly-gemini-signed

@haarp
Copy link

haarp commented Sep 5, 2018

Long-pressing download button lets you choose which app to use for download.

Thanks, that's exactly what I needed to debug this :)

The URL points to play.googleapis.com, which redirects to an URL on some weird-ass domain such as r2---sn-8xgn5uxa-4g5e.gvt1.com. The final request then always times out while doing SSL negotiation (tested with curl on the affected device). But that server is reachable and can be pinged! The same request also works on my desktop PC.

It looks like IPv6 is the culprit. Falling back to IPv4 fixes the problem entirely! How weird is that? My IPv6 setup is definitely working correctly. Have you ever encountered such a problem, @yeriomin?

@yeriomin
Copy link
Owner

yeriomin commented Sep 5, 2018

@haarp

Have you ever encountered such a problem

Personally no. But a certain Chinese user reported something similar in #403.

@goodness-from-me
Copy link

goodness-from-me commented Sep 6, 2018

On Nougat when VPN is used (an android bug workaround)

For me it is also the case on Samsung running Oreo. Disabling VPN unbreaks Download Manager.

@maenjuel
Copy link

maenjuel commented Sep 8, 2018

When internal storage is used for downloads

That part did the trick for me. Had the same problem after I updated from LineageOS 14.1. to 15.1.

@free5lot
Copy link

free5lot commented Sep 18, 2018

This issue is VPN- and DownloadManager-related one (probably LineageOS's bug, not sure).

Walkarounds:

  1. In Yalp settings set Internal storage for downloads (checkbox "Download to internal storage") and some internal download manager will be used inside Yalp instead of broken Android Download Manager. Unfortunately this does not solve the issue for Aurora or other apps.

  2. Turn VPN on, suddenly everything works, I checked.

  3. Maybe removing VPN software from Android could do the trick too.

Notes:

  • F-Droid keeps working even in this conditions.

  • Turning off or on Protection Guard for Yalp does not change anything.

  • When you have this issue and try to download application in Yalp from the list of apps by arrow icon (not from app's page with Download button) you will see "0%" under icon in a second that will stay this way forever. I want to stress 0% for search engines, because for some people it would be easier to find this ticket/issue now.

@ghost
Copy link

ghost commented Sep 19, 2018

I experienced these issues on a Motorola G5 running LineageOS 15.1. Yalp initially works flawlessly, then suddenly no download will go through and Yalp will report an HTTP error once a timeout is reached. I can once again confirm that enabling the option to download to internal storage fixes the issue. However, I have some doubts that it is VPN-related, as turning my VPN (DNS66) on and off did nothing to alleviate the issue.

A shot in the dark here, but could there be a connection to encrypting the phone? I seem to remember myself installing every applications I wanted through Yalp, apart from two, then encrypting the phone. The next day when I sought to install those last two applications I ran into the HTTP issues, so it could be related. Then again, it is just a thought, I am not a very seasoned Android developer.

Lastly, a big thank you to the Yalp devs, your work is very much appreciated.

@free5lot
Copy link

free5lot commented Sep 19, 2018

For me turning VPN on makes download work even via DownloadManager.

But about phone encryption - it's a good point, it's quite probable co-reason! Never thought about it, but timing of issue appearance is right in my case, android encryption can affect it somehow.

@0lm
Copy link

0lm commented Sep 28, 2018

do you guys and gals have a cross ( X ) symbol on your wifi symbol when you turn on wifi? and when you go into wifi setting it says "connected, no internet" but you actually can use internet, surf on your browser and stuff?
that X symbol appears when your wifi cant get a stable connection to the google store servers. thats why you cant download stuff from yalpstore, because it uses google store connections. you can click on "download" in yalpstore though, but the download bar will have on progress. (i had the same problem and the solution i provide below, worked and fixed it.) if that is your issue, the you can go on reading this post. if not.. well maybe it actually is this issue but it isnt displayed the same way as with my phone. trying wont hurt

thats not an issue with lineageOS. that method is used in china for example, to block google store. to enable a connection to google store, you need to set captive portal to null.

go to terminal (you need root for that). first of all put in su to get global rights.
then do this (if youre using lineageOS 15.1 for other roms the command is a bit different):

settings put global captive_portal_mode 0

to check if it worked, ask for the current status with:

settings get global captive_portal_mode

if system answers with "null", everything worked fine. then restart your device.
now your cross symbol ( X ) on the wifi symbol should be gone and the connection should be stable now. Yalp downloads should work fine now (and all other apps that use special google stuff)

@yeriomin
Copy link
Owner

yeriomin commented Oct 7, 2018

DownloadManager is dropped in master. Yalp Store's own implementation is now used all the time.

This should fix the DownloadManager related problems, obviously. And make the rest easier to diagnose.

@yeriomin yeriomin closed this as completed Oct 7, 2018
@yeriomin yeriomin added this to the 0.44 milestone Oct 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants