yeriomin / YalpStore

Download apks from Google Play Store
GNU General Public License v2.0
2.39k stars 260 forks source link

Cannot download apps, "Unknown error" occurs #513

Closed Catfriend1 closed 6 years ago

Catfriend1 commented 6 years ago

Expected behavior Download progress is shown in the status bar and the apk is found on the internal storage after the download progress (ready to install).

Actual behavior Toast appears "Unkonwn error", the download progress bar doesn't advance one percent.

Steps to reproduce

  1. Choose a random app (regardless free or paid) to download
  2. Click download.

Your setup Device model : Samsung Galaxy S2 (i9100) Android 8.1.0 (Oreo, LineAgeOS ROM) Yalp Store version 0.43 - latest

Grabbed android log: `07-25 01:19:06.677 D/NuPlayerDriver(2043): notifyListener_l(0xb488b780), (6, 0, 0, -1), loop setting(0, 0) 07-25 01:19:06.697 D/Yamaha-MC1N2-Audio(2033): yamaha_mc1n2_audio_output_start() 07-25 01:19:06.697 D/Yamaha-MC1N2-Audio(2033): yamaha_mc1n2_audio_route_start() 07-25 01:19:06.697 D/Yamaha-MC1N2-Audio(2033): (yamaha_mc1n2_audio_params_route_find): device = 2, direction = 0 07-25 01:19:07.183 I/ButtonDownload(8435): Write permission granted 07-25 01:19:07.556 I/NuPlayerDecoder(2043): [audio] saw output EOS 07-25 01:19:07.557 D/AudioTrack(2043): stop() called with 52920 frames delivered 07-25 01:19:07.651 I/NativeHttpClientAdapter(8435): Requesting https://android.clients.google.com/fdfe/purchase 07-25 01:19:08.086 I/ActivityManager(2171): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=org.lineageos.trebuchet/com.android.launcher3.Launcher (has extras)} from uid 1000 07-25 01:19:08.089 D/AutofillManagerService(2171): Close system dialogs 07-25 01:19:08.103 V/DetailsActivity(8435): Pausing activity 07-25 01:19:08.108 D/NuPlayerDriver(2043): notifyListener_l(0xb488b780), (2, 0, 0, -1), loop setting(0, 0) 07-25 01:19:08.110 V/MediaRouterService(2171): restoreBluetoothA2dp(false) 07-25 01:19:08.119 I/MediaFocusControl(2171): abandonAudioFocus() from uid/pid 10026/2343 clientId=android.media.AudioManager@e86282 07-25 01:19:08.171 I/NativeHttpClientAdapter(8435): HTTP result code 200 Cache NETWORK 200 07-25 01:19:08.278 W/GrallocMapperPassthrough(2025): buffer descriptor with invalid usage bits 0x400 07-25 01:19:08.287 V/DetailsActivity(8435): Stopping activity 07-25 01:19:08.288 W/GrallocMapperPassthrough(2025): buffer descriptor with invalid usage bits 0x400 07-25 01:19:08.298 I/chatty (2025): uid=1000(system) Binder:2025_5 identical 1 line 07-25 01:19:08.309 W/GrallocMapperPassthrough(2025): buffer descriptor with invalid usage bits 0x400 07-25 01:19:08.402 I/NativeHttpClientAdapter(8435): Requesting https://android.clients.google.com/fdfe/delivery?dtok=AB-xQnoCIwcU0KtRPo9LUhbOqwHvCP2ohHJZ-p00PMEw2YYGzSFAifzkxuJo9tjmiSFNC23LZvoBKkRJllFL1yYC4XF5sM4Fckc6JrZUz3mSw9JvfypUnFhGYFmpBlxqh-uNREIP8s2c&ot=1&doc=com.nutomic.syncthingandroid&vc=4145 07-25 01:19:08.876 W/OpenGLRenderer(2816): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer... 07-25 01:19:08.887 I/NativeHttpClientAdapter(8435): HTTP result code 200 Cache NETWORK 200 07-25 01:19:09.003 I/Downloader(8435): file.exists()=false file.length()=0 metadata.getSize()=23714541 07-25 01:19:09.004 I/DownloadManagerAdapter(8435): Downloading APK for com.nutomic.syncthingandroid 07-25 01:19:09.059 W/WindowManager(2171): removeWindowToken: Attempted to remove non-existing token: android.os.Binder@9441f5a 07-25 01:19:09.188 I/DownloadManagerAdapter(8435): Download id 79 07-25 01:19:09.200 D/DownloadManager(2854): [79] Starting 07-25 01:19:09.309 D/NetworkSecurityConfig(2854): No Network Security Config specified, using platform default 07-25 01:19:09.613 I/zygote (2171): NativeAlloc concurrent copying GC freed 38870(1900KB) AllocSpace objects, 9(436KB) LOS objects, 38% free, 9MB/15MB, paused 180us total 395.223ms 07-25 01:19:10.560 E/DownloadManager(2854): [79] Failed: java.lang.IllegalArgumentException: Invalid UUID string: 322F-07D2 07-25 01:19:10.560 E/DownloadManager(2854): java.lang.IllegalArgumentException: Invalid UUID string: 322F-07D2 07-25 01:19:10.560 E/DownloadManager(2854): at java.util.UUID.fromString(UUID.java:194) 07-25 01:19:10.560 E/DownloadManager(2854): at android.os.storage.StorageManager.convert(StorageManager.java:1952) 07-25 01:19:10.560 E/DownloadManager(2854): at android.os.storage.StorageManager.getUuidForPath(StorageManager.java:756) 07-25 01:19:10.560 E/DownloadManager(2854): at android.os.storage.StorageManager.isAllocationSupported(StorageManager.java:780) 07-25 01:19:10.560 E/DownloadManager(2854): at com.android.providers.downloads.DownloadThread.transferData(DownloadThread.java:585) 07-25 01:19:10.560 E/DownloadManager(2854): at com.android.providers.downloads.DownloadThread.executeDownload(DownloadThread.java:470) 07-25 01:19:10.560 E/DownloadManager(2854): at com.android.providers.downloads.DownloadThread.run(DownloadThread.java:312) 07-25 01:19:10.560 D/DownloadManager(2854): [79] Finished with status UNKNOWN_ERROR 07-25 01:19:10.741 E//system/bin/sdcard(2504): NOTIFY FAILED : Invalid argument 07-25 01:19:10.741 E//system/bin/sdcard(2504): NOTIFY FAILED : Invalid argument 07-25 01:19:10.922 I/GlobalDownloadReceiver(8435): android.intent.action.DOWNLOAD_COMPLETE (79) received 07-25 01:19:11.027 D/Yamaha-MC1N2-Audio(2033): yamaha_mc1n2_audio_output_stop() 07-25 01:19:11.027 D/Yamaha-MC1N2-Audio(2033): yamaha_mc1n2_audio_route_start() 07-25 01:19:11.062 D/NuPlayerDriver(2043): NuPlayerDriver(0xb488bc80) created, clientPid(2343) 07-25 01:19:11.065 W/GrallocMapperPassthrough(2025): buffer descriptor with invalid usage bits 0x400

`

yeriomin commented 6 years ago

This log tells me there is some internal problem in the DownloadManager.

07-25 01:19:10.560 E/DownloadManager(2854): [79] Failed: java.lang.IllegalArgumentException: Invalid UUID string: 322F-07D2

This is rare, but not unique. This FAQ quote should help you:

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.

Catfriend1 commented 6 years ago

Thanks @yeriomin ! This helped me out. It's just a little bit terrifying because I've got to disable the system's download manager to use yalpStore and I've got to enable it for F-Droid to work properly ... ;-)

yeriomin commented 6 years ago

@Catfriend1

I've got to enable it for F-Droid to work properly

F-Droid works even when it is disabled...

Also, if you don't need the apks themselves, try turning on downloading to internal storage in Yalp Store.