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

Complete file remains in Incomplete Downloads folder #1019

Closed
ewancg opened this issue Mar 9, 2021 · 13 comments · Fixed by #1021
Closed

Complete file remains in Incomplete Downloads folder #1019

ewancg opened this issue Mar 9, 2021 · 13 comments · Fixed by #1021
Labels

Comments

@ewancg
Copy link

ewancg commented Mar 9, 2021

Nicotine+ version: 3.0.2
Operating System/Distribution: Arch Linux

Describe the bug

When files finish downloading (reach 100%), instead of finalizing the download and obtaining the "finished" status, file will sometimes remain in the download queue and stagnate at 100%. If you abort the download, the file will remain aborted as expected. When you retry the download, it will indefinitely be "waiting for download". File remains in Incomplete Downloads folder, with complete metadata, despite being fully downloaded & valid as a music file.

Expected behavior

File finished downloading, moves to destination folder with name changed & status changed to "finished".

Steps to reproduce the bug

Download a file & wait for it to finish.

Additional context

Screenshots, logs, stacktraces or relevant information.
image
File idling in Downloads tab
image
Complete file idling in Incomplete Downloads folder

@ewancg ewancg added the bug label Mar 9, 2021
@mathiascode
Copy link
Member

Could you try the unstable version, and see if the problem persists (https://github.com/Nicotine-Plus/nicotine-plus/blob/master/doc/RUNFROMGIT.md)? Download queuing was mostly changed recently.

@ewancg
Copy link
Author

ewancg commented Mar 9, 2021

What a clever way to betatest. After having aborted my current downloads (they were going very slowly) so I could exit Nicotine and start it from the git repo, I was greeted by the following errors when going back into the Downloads tab:

Nicotine+ has encountered a critical error and needs to exit. Please copy the following error and include it in a bug report:

Type: <class 'OSError'>
Value: [Errno 22] Invalid argument: '/run/media/ewan/ewanmusic/Musique, Volume 1: 1993–2005'
Traceback:   File "/home/ewan/nicotine-plus/pynicotine/gtkgui/frame.py", line 634, in on_network_event
    self.np.events[i.__class__](i)
  File "/home/ewan/nicotine-plus/pynicotine/pynicotine.py", line 1723, in file_request
    self.transfers.file_request(msg)
  File "/home/ewan/nicotine-plus/pynicotine/transfers.py", line 1186, in file_request
    self._file_request_download(msg, i)
  File "/home/ewan/nicotine-plus/pynicotine/transfers.py", line 1296, in _file_request_download
    self.download_finished(f, i)
  File "/home/ewan/nicotine-plus/pynicotine/transfers.py", line 1464, in download_finished
    os.makedirs(folder)
  File "/usr/lib/python3.9/os.py", line 225, in makedirs
    mkdir(name, mode) 

Throughout the time I have been typing this comment, I have accumulated 7 or 8.

I will try again in a moment.

Edit: Nevermind, the problem has nothing to do with the Downloads tab. It is an unavoidable error that happens anywhere from 5-10 seconds after starting Nicotine.

@mathiascode
Copy link
Member

Thanks, looks like there's an error creating the target folder to move the downloads to. I'll investigate later today.

@ewancg
Copy link
Author

ewancg commented Mar 9, 2021

Sounds good. Please let me know when it gets figured out so we can continue to figure out the initial issue.

@mathiascode
Copy link
Member

I'm guessing the download folder is on an external drive? The error message is quite vague, so I'm not entirely sure what's going on. Is the target location writable?

I get the same stacktrace when I disconnect the drive where the download location is set, but the error is "[Errno 13] Permission denied" in this case.

@ewancg
Copy link
Author

ewancg commented Mar 9, 2021

The drive is mounted & I have write perms.

@mathiascode
Copy link
Member

Is this an NTFS or FAT drive? In that case, the colon in the folder path could explain the issue.

@ewancg
Copy link
Author

ewancg commented Mar 9, 2021

FAT32

@mathiascode
Copy link
Member

The issue should be fixed in this branch: https://github.com/mathiascode/nicotine-plus/tree/pathcharacterfix

Could you test it by downloading a folder name containing invalid characters ([? : > < | * "])?

@ewancg
Copy link
Author

ewancg commented Mar 11, 2021

This new branch seems to be working well. No Error 22, file with colon in the path downloads fine. However, the download progress bar displays no text when it should say "0 %". Thanks for your help.

@mathiascode
Copy link
Member

the download progress bar displays no text when it should say "0 %"
Which files does this apply to? Does the bar update once the file starts downloading? Could you send a screenshot?

@ewancg
Copy link
Author

ewancg commented Mar 11, 2021

image
It applies to all files. It acts normally once it begins the download.

@mathiascode
Copy link
Member

Thanks, this seems to happen if the list was previously empty, and none of the downloads have progressed past 0% yet. As soon as a single download reaches 1%, every percentage bar becomes visible. Likely a regression in GTK, but I'll have to investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants