#498 Unable to download files

Open
opened 2 months ago by Oneric · 0 comments
Oneric commented 2 months ago

General information

  • Version: 2.5.2
  • Android Version: LOS13 (Android 6.0.1) – No GApps
  • Pix-Art Messenger source: Codeberg/Github via AutoUpdater

Steps to reproduce

  1. Receive a file, eg Image
  2. Click on “Check File Size” Button
  3. PAM will retrieve the file size from server, attempt download but fail with ‘Download failed: File not found’
  4. Instead of “Check File Size” there’s now a “Download Image” button with correct size information. Trying to download with it fails.

Expected result

File should be downloaded and previewed.

Debug output

Linux: adb -d logcat -v time | grep -i Pix-Art > logcat.txt

Nothing. Grepping for -i pixart instead only showed some generic information when opening the app.

Additional Information

Since when

Not sure as I don’t receive files often. It did already happens months prior, but at first I passed it off as an (temporary) server failure. Might already be in since 2.4.0.
I’m pretty sure that it was still working around 2.2.0.

Long-press on _A_ and selecting copy original URL yields _B_:
A B
“Check File Size” button Correct URL
“Download” button “${URL}|${FileSize}”
Image Preview (sent img) Correct URL
Bits from poking in Code

“download_failed_file_not_found” is used as an “catch it all” error message if nothing more specific was found in HttpDownloadConnectionshowToastForException.

In Message.java.getFileParams the String is supposed to be split at |s, which does not seem to happen here.

Since the size is retrieved correctly I’d guess the error manifests in HttpDownloadConnections FileDownloader.run. Unfortunately I was unable to get more out of the code.

Speculation

This might either be usefull, useless or misleading:
My guess would be that in FileDownloader.run and/or whatever handles long-press on the download button the url is not parsed from getFileParams but taken from Message.body directly OR at some point prior to it the variable that keeps track of the URL is overwritten incorrectly.
As it works for others, this might be connected to some fallback code that isn’t invoked in newer/googled Androids.

#### General information * **Version:** 2.5.2 * **Android Version:** LOS13 (Android 6.0.1) – **No GApps** * **Pix-Art Messenger source:** Codeberg/Github via AutoUpdater #### Steps to reproduce 1. Receive a file, eg Image 2. Click on "Check File Size" Button 3. PAM will retrieve the file size from server, attempt download but fail with 'Download failed: File not found' 4. Instead of "Check File Size" there's now a "Download Image" button with correct size information. Trying to download with it fails. #### Expected result File should be downloaded and previewed. #### Debug output ```` Linux: adb -d logcat -v time | grep -i Pix-Art > logcat.txt ```` Nothing. Grepping for `-i pixart` instead only showed some generic information when opening the app. #### Additional Information ##### Since when Not sure as I don't receive files often. It did already happens months prior, but at first I passed it off as an (temporary) server failure. Might already be in since `2.4.0`. I'm pretty sure that it was still working around `2.2.0`. ##### Long-press on \_A\_ and selecting copy original URL yields \_B\_: | A | B | | ------------------------- | --------------------- | | "Check File Size" button | Correct URL | | "Download" button | "${URL}\|${FileSize}" | | Image Preview (sent img) | Correct URL | ##### Bits from poking in Code "download_failed_file_not_found" is used as an “catch it all” error message if nothing more specific was found in `HttpDownloadConnection`→`showToastForException`. In `Message.java`.`getFileParams` the String is supposed to be split at `|`s, which does not seem to happen here. Since the size is retrieved correctly I'd guess the error manifests in `HttpDownloadConnection`s `FileDownloader.run`. Unfortunately I was unable to get more out of the code. ##### Speculation This might either be usefull, useless or misleading: My guess would be that in `FileDownloader.run` and/or whatever handles long-press on the download button the url is not parsed from `getFileParams` but taken from `Message.body` directly **OR** at some point prior to it the variable that keeps track of the URL is overwritten incorrectly. As it works for others, this might be connected to some fallback code that isn't invoked in newer/googled Androids.
Oneric changed title from Unable to download Files to Unable to download files 2 months ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.