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

Android 13 stroge write permission issue #251

Closed
TeaqariaWTF opened this issue Oct 24, 2023 · 21 comments
Closed

Android 13 stroge write permission issue #251

TeaqariaWTF opened this issue Oct 24, 2023 · 21 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@TeaqariaWTF
Copy link

TeaqariaWTF commented Oct 24, 2023

Description : If you change the download file download location on Android devices, the download does not start

App Version : 1.4.3

OS Version : Android 13

Screenshot_20231025-021957_Gopeed

Screenshot_20231025-022001_Gopeed

If you add multiple download links but select the option to download one file at a time, the other files will not automatically start downloading.

Screenshot_20231025-024134_Gopeed

Screenshot_20231025-023657_Gopeed

@monkeyWie
Copy link
Member

@TeaqariaWTF You can upgrade to the latest version and try again.

@TeaqariaWTF
Copy link
Author

@monkeyWie Sorry, my mistake.
I wrote the application version wrong.
I am using version 1.4.3

@monkeyWie monkeyWie added the bug Something isn't working label Oct 25, 2023
@monkeyWie
Copy link
Member

Okay, I will check it.

@monkeyWie
Copy link
Member

monkeyWie commented Oct 26, 2023

I've tried to reproduce both issues but neither reproduced, see below:

Screenrecorder-2023-10-26-15-51-19-387.mp4

@TeaqariaWTF
Copy link
Author

I have a custom ROM running Android 13 (Paranoid)
The download does not start when the download folder changes.

You can see it in this video : https://drive.google.com/file/d/1-RklSga-0rGWEdkJNE2DGlk1N74Gmcpc/view?usp=drivesdk

I wonder if it would help if I gave you a log file?
Maybe we can find the error this way

@TeaqariaWTF
Copy link
Author

The first problem may be that my bug actually wants a feature, rather than a bug.

When the active download is paused and the download feature is given to a different file, after the download is completed, the paused file will not continue to download and manual intervention is required.

This video is a bit long, I apologize for the inconvenience

https://drive.google.com/file/d/1-S5dOmU1oFmKtxXYJrhxG1HqhZG8h4vu/view?usp=drivesdk

@TeaqariaWTF
Copy link
Author

I hope this will help

28-10_02-45-21.log

@monkeyWie
Copy link
Member

@TeaqariaWTF Thank you for the more detail, the first problem looks like an Android storage permissions issue, I'm not sure but it's most likely a problem with your ROM, can you provide the following log files, they are located in the app log directory (Android/data/com.gopeed/files/logs) find the core.log and crash.log files, may be it can found some reasons.

And the secondly, It is indeed a feature for paused task manually.

@TeaqariaWTF
Copy link
Author

core.log

I didn't add the crash.log file because it is empty

@monkeyWie
Copy link
Member

I've seen this log, it is indeed a storage permissions issue, see below:

open /storage/emulated/0/Log/Loki.S02E04.Heart.of.the.TVA.1080p.DSNP.WEB-DL.DDP5.1.H.264-NTb.mkv: operation not permitted

There's nothing I can do about that, maybe it's a bug in the file_picker library.

@monkeyWie
Copy link
Member

monkeyWie commented Oct 30, 2023

Maybe I can build a new apk file with the latest file_picker and test it with your device.

@TeaqariaWTF
Copy link
Author

I'm glad we found the source of the problem.
I can test to solve the problem.

I would also like to report another problem, when downloading large files I leave the app running in the background, the download stops automatically after a while

@monkeyWie
Copy link
Member

monkeyWie commented Oct 31, 2023

I build an apk with the latest file_picker, please test it.

https://drive.google.com/file/d/11AXlZomkQvrekywj9jxNgqYBxYTNUQ8-/view?usp=sharing

@TeaqariaWTF
Copy link
Author

TeaqariaWTF commented Oct 31, 2023

2023-10-31 10:23:48 ERR start task failed, task id: s0_NJKe42q5_YbgAYynOC error="open /storage/emulated/0/Goo/Pain.Hustlers.2023.1080p.NF.WEB-DL.DDP5.1.Atmos.H.264-FLUX.mkv: operation not permitted"
2023-10-31 10:23:50 ERR start task failed, task id: s0_NJKe42q5_YbgAYynOC error="open /storage/emulated/0/Goo/Pain.Hustlers.2023.1080p.NF.WEB-DL.DDP5.1.Atmos.H.264-FLUX.mkv: operation not permitted"

@monkeyWie
Copy link
Member

Oh, unfortunately, this issue may not be solved for a while, I'm not an Android expert, this issue will keep open and I hope to get help from others.

@monkeyWie monkeyWie added the help wanted Extra attention is needed label Oct 31, 2023
@monkeyWie monkeyWie changed the title android app Bug Android 13 stroge write permission issue Oct 31, 2023
@TeaqariaWTF
Copy link
Author

If I change the download folder to /storage/emulated/0/Download/Gopeed the problem is solved.

But it still won't download to /storage/emulated/Gopeed
I wonder if I can change the default download folder

Can you update it to /storage/emulated/0/Download/Gopeed

@biminwansui
Copy link

I'm glad we found the source of the problem.
I can test to solve the problem.

I would also like to report another problem, when downloading large files I leave the app running in the background, the download stops automatically after a while

I have meet the same problem.

@monkeyWie
Copy link
Member

I found some key information, refer to: https://pub.dev/packages/permission_handler#faq.
Android 13 have been deprecated external storage permissions, So this issue cannot be solved unless using the MANAGE_EXTERNAL_STORAGE permission, but I won't do this!

Fortunately, the Download directory is still available. And I'd like to explain why I don't set a default directory because I'm going to follow up on the official Android storage improvements, for giving better protection to app and user data on external storage.

@TeaqariaWTF
Copy link
Author

So is there a solution for the problem that the application stops working in the background?

@monkeyWie
Copy link
Member

@TeaqariaWTF I will add a progress notification bar when application in the background, but still, due to Android's mechanism, there is no guarantee that the app will be killed, you may need this: Don't kill my app!

@monkeyWie
Copy link
Member

So is there a solution for the problem that the application stops working in the background?

v1.4.4 released, you can refer to this PR, it had improved background working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants