TuneSpan (Beta) Doesn't Trash Spanned Files
Hello.
Pretty sure I'm clear on what TuneSpan is supposed to do and how to use it.
I have an iTunes library that's about 210GB on a 320GB drive, and I'm trying to span about 12600 tracks in a smart playlist to my external drive. The initial coping of the files works without issue, but upon completion I get a notice that "TuneSpan could not move X files to the Trash" and that I can try to delete them immediately.
If I opt to delete them immediately, TuneSpan tells me "No Files or Folders deleted." and suggests I delete them manually.
If there's a way to avoid picking through 210GB of media to delete the 12600 tracks I haven't played in the last 6 months that scattered randomly throughout my library folder that would be preferred.
So, what am I doing wrong?
I've tried repairing disk permissions, and setting the entire library folder as readable and writable by everyone. Neither seemed to do the trick.
At this point the tracks have been restored back to the internal disk and deleted manually from the external. So far I haven't lost anything. Also, everything is backed up via an online service, so I'm not afraid to try something crazy try to fix it.
Any advice?
If there's any kind of logging or other technical information that would be helpful, please let me know.
Technical Specs:
MacBook Pro 15" (Late 2008)
Mac OS X 10.6.8
320GB Internal Toshiba HDD
750GB G-Drive Mini FireWire External
Thank you for getting in touch about this issue, I'm sorry your having to deal with this, I know it's a hassle to deal with trashing tons of scattered files... that's exactly why I built in file trashing to TuneSpan.
But, as you can see I tried to make sure that TuneSpan could handle situations where files could not be trashed and offer to delete them immediately. In the code, both functions to move the files to the trash and the function to delete a file are the standard Cocoa functions that are as basically as low level as I can go with still using Cocoa. Anyway, I'm saying if those fail, it is a true failure on the file system level, not something that TuneSpan or I can do much of anything about.
I've only rarely personally experienced a situation where TuneSpan could not trash or delete files, and it was never consistent. Sometimes a restart would solve the problem and TuneSpan would trash files just fine. But, in the end, I hate to say that I believe the issue had to do with the external drive I was using. It was old and was beginning to have other problems and this was just a symptom of that.
In the screenshots, it looks like you are spanning from your internal to your external, so the files are not able to be deleted from your internal drive... have you tried restoring any tracks back onto your internal yet? Is TuneSpan able to delete the file from the external? If it can or can't that would help narrow down if it's an issue with a specific drive, or if its a bigger issue with the system.
As for trashing the files manually, as it says in the dialog box there, TuneSpan does log the path each file that can't be deleted. So you can open up the Console application and search for TuneSpan and find the listings of the each file not deleted. I know that's very crude, but it can help you locate the files that couldn't be trashed.
Also, in the console, if you search for TuneSpan messages during the time of the span, there are probably some errors from the failed trashing and deleting of files. If you find some, please send a screenshot of your Console and I can see if there is any information that sheds a better light on this situation.
Lastly, I hate to say it, but with a 4 year old laptop... that's a lot of time for the internal hard drive to get a bit beat up and it may be starting to show symptoms of that. You have various options if that is the situation, but they will all involve money and hassle. But, at this point, you can buy a massive 1 TB internal drive for that computer for less that $150. Installing it into your computer and getting your data back onto there is the hassle part.
Thank you for getting in touch about this issue, I'm sorry your having to deal with this, I know it's a hassle to deal with trashing tons of scattered files... that's exactly why I built in file trashing to TuneSpan.
But, as you can see I tried to make sure that TuneSpan could handle situations where files could not be trashed and offer to delete them immediately. In the code, both functions to move the files to the trash and the function to delete a file are the standard Cocoa functions that are as basically as low level as I can go with still using Cocoa. Anyway, I'm saying if those fail, it is a true failure on the file system level, not something that TuneSpan or I can do much of anything about.
I've only rarely personally experienced a situation where TuneSpan could not trash or delete files, and it was never consistent. Sometimes a restart would solve the problem and TuneSpan would trash files just fine. But, in the end, I hate to say that I believe the issue had to do with the external drive I was using. It was old and was beginning to have other problems and this was just a symptom of that.
In the screenshots, it looks like you are spanning from your internal to your external, so the files are not able to be deleted from your internal drive... have you tried restoring any tracks back onto your internal yet? Is TuneSpan able to delete the file from the external? If it can or can't that would help narrow down if it's an issue with a specific drive, or if its a bigger issue with the system.
As for trashing the files manually, as it says in the dialog box there, TuneSpan does log the path each file that can't be deleted. So you can open up the Console application and search for TuneSpan and find the listings of the each file not deleted. I know that's very crude, but it can help you locate the files that couldn't be trashed.
Also, in the console, if you search for TuneSpan messages during the time of the span, there are probably some errors from the failed trashing and deleting of files. If you find some, please send a screenshot of your Console and I can see if there is any information that sheds a better light on this situation.
Lastly, I hate to say it, but with a 4 year old laptop... that's a lot of time for the internal hard drive to get a bit beat up and it may be starting to show symptoms of that. You have various options if that is the situation, but they will all involve money and hassle. But, at this point, you can buy a massive 1 TB internal drive for that computer for less that $150. Installing it into your computer and getting your data back onto there is the hassle part.
Thank you Pico for getting back to me right away.
I've tried spaning and restoring a set of test files, and it looks like TuneSpan is unable to delete files from my external also.
Definitely convinced it's some kind of wonky permissions issue. I was hoping there'd be an ah-hah solution that people sometimes miss, but it sounds like whatever's going on is unique to my system's screwy configuration.
One a correction, my laptop is a Late 2009, not 2008. But I am worried about the health of my internal disk, which is crawling. It's a 5400 RPM disk at about 95% full, and can't seem to handle all the online storage & backup syncing. I'm definitely in the market for a new one, but I was hoping that freeing up another 120GB with TuneSpan might unburden the drive and buy some time.
I've attached a screenshot of the console. Other than a "failed to get scripting definition" error from SIMBL, I don't see anything unusual in the notices.
I can try restoring permissions again, and re-installing TuneSpan. But, is there anything as far as the TuneSpan setup or system preferences that may be causing this conflict?
I may post again to double check that my attempt use the console log to manual delete via Terminal process is correct.
Thank you again for you help.
Thank you Pico for getting back to me right away.
I've tried spaning and restoring a set of test files, and it looks like TuneSpan is unable to delete files from my external also.
Definitely convinced it's some kind of wonky permissions issue. I was hoping there'd be an ah-hah solution that people sometimes miss, but it sounds like whatever's going on is unique to my system's screwy configuration.
One a correction, my laptop is a Late 2009, not 2008. But I am worried about the health of my internal disk, which is crawling. It's a 5400 RPM disk at about 95% full, and can't seem to handle all the online storage & backup syncing. I'm definitely in the market for a new one, but I was hoping that freeing up another 120GB with TuneSpan might unburden the drive and buy some time.
I've attached a screenshot of the console. Other than a "failed to get scripting definition" error from SIMBL, I don't see anything unusual in the notices.
I can try restoring permissions again, and re-installing TuneSpan. But, is there anything as far as the TuneSpan setup or system preferences that may be causing this conflict?
I may post again to double check that my attempt use the console log to manual delete via Terminal process is correct.
Thank you again for you help.
Thanks for getting back to me with this screenshot. If you remove the search for "tunespan" and look for other system messages that were logged during the span, do you see anything about the files that couldn't be trashed or deleted that were not generated directly by TuneSpan?
If it comes down to it, I could possibly send you a test build that does more error logging for this situation.
Repairing the permissions again may be worth a shot, but I don't think reinstalling TuneSpan will change anything.
The failed to get scripting definitions is normal for SIMBL, not every app has scripting definitions included, but that doesn't really affect SIMBL, it just logs that anyway. But, that is unrelated to this and wouldn't affect this issue.
About deleting the files manually with the Terminal using the paths in the log... if you are familiar and confident with the terminal, then that is an option. But doing terminal deletes can be risky with the slightest mistake or map-formed or incorrect path. I would recommend using those path listings to track down the files in the Finder and trashing them normally.
Thanks for getting back to me with this screenshot. If you remove the search for "tunespan" and look for other system messages that were logged during the span, do you see anything about the files that couldn't be trashed or deleted that were not generated directly by TuneSpan?
If it comes down to it, I could possibly send you a test build that does more error logging for this situation.
Repairing the permissions again may be worth a shot, but I don't think reinstalling TuneSpan will change anything.
The failed to get scripting definitions is normal for SIMBL, not every app has scripting definitions included, but that doesn't really affect SIMBL, it just logs that anyway. But, that is unrelated to this and wouldn't affect this issue.
About deleting the files manually with the Terminal using the paths in the log... if you are familiar and confident with the terminal, then that is an option. But doing terminal deletes can be risky with the slightest mistake or map-formed or incorrect path. I would recommend using those path listings to track down the files in the Finder and trashing them normally.
Hi Pico,
My solution last time to TuneSpan not being able to delete the files was to buy a bigger hard drive. A year later and I'm out of space again.
I've purchased the 1.1.4 version from the App Store now, and I'm still seeing the same behaviour where TuneSpan is unable to trash or delete files. The pay version asked for permission to access my iTunes folder when I first ran it, I allowed this obviously.
I've checked and repaired disk permissions, and (through both Terminal and Finder) updated the owner and read/write permissions.
One thing of note is that when I try to delete these files (which have me listed as the owner), Finder still wants a password to delete them.
Who should the owner of these files be? Does that matter? What read/write permissions should the files have?
The error messages in the debug log aren't informative. They simply read:
"2013.10.15 4:29:30.651 PM TuneSpan[83470]: Could not delete file immediately: /Users/ian/Music/iTunes/iTunes Music/Podcasts/Blank Code Podcast/Blank Code Podcast 125 – Deepak Sharma.mp3"
Hi Pico,
My solution last time to TuneSpan not being able to delete the files was to buy a bigger hard drive. A year later and I'm out of space again.
I've purchased the 1.1.4 version from the App Store now, and I'm still seeing the same behaviour where TuneSpan is unable to trash or delete files. The pay version asked for permission to access my iTunes folder when I first ran it, I allowed this obviously.
I've checked and repaired disk permissions, and (through both Terminal and Finder) updated the owner and read/write permissions.
One thing of note is that when I try to delete these files (which have me listed as the owner), Finder still wants a password to delete them.
Who should the owner of these files be? Does that matter? What read/write permissions should the files have?
The error messages in the debug log aren't informative. They simply read:
"2013.10.15 4:29:30.651 PM TuneSpan[83470]: Could not delete file immediately: /Users/ian/Music/iTunes/iTunes Music/Podcasts/Blank Code Podcast/Blank Code Podcast 125 – Deepak Sharma.mp3"
Thanks for getting back in touch. Sorry we couldn't figure this out a year ago. Hopefully we can get to the bottom of it now.
It is actually very relevant and important that the Finder is asking for your password when you attempt to trash these files manually.
That means that for some reason, admin permissions are needed to trash the files. TuneSpan does not try to get admin permissions to do any file operations. In fact, it is against the Mac App Store rules for any app to request admin permissions to do anything.
So, that's a pretty strong indication that this issue is not a code related problem with TuneSpan. But, it's something that needs to be solved with the files in the Finder. And, this shouldn't be happening for no reason, there must be something that can be adjusted to get the permissions set correctly.
Here are the permission that my iTunes Media folder has, and TuneSpan can trash files from it:
What are the permissions for your iTunes Media folder?
Thanks for getting back in touch. Sorry we couldn't figure this out a year ago. Hopefully we can get to the bottom of it now.
It is actually very relevant and important that the Finder is asking for your password when you attempt to trash these files manually.
That means that for some reason, admin permissions are needed to trash the files. TuneSpan does not try to get admin permissions to do any file operations. In fact, it is against the Mac App Store rules for any app to request admin permissions to do anything.
So, that's a pretty strong indication that this issue is not a code related problem with TuneSpan. But, it's something that needs to be solved with the files in the Finder. And, this shouldn't be happening for no reason, there must be something that can be adjusted to get the permissions set correctly.
Here are the permission that my iTunes Media folder has, and TuneSpan can trash files from it:
What are the permissions for your iTunes Media folder?
My account and the admin user group have read/write.
However on every individual file there are two "everyone" groups, and I have no idea what the "custom" permissions are supposed to mean.
I Terminal the owner / group / other permissions are listed as follows:
-rw----r--@ 1 ian staff 13318373 Aug 8 16:41 01 Caveman.mp3
I'm going to try to set everything from ~/Music/iTunes down to everyone read/write for now, hope that this clears the weird "custom" permission, and then run a span. I'm not entirely sure how to add staff group permissions because they're not showing up as a group option in the Finder info view, but I'm comfortable trying chmod in terminal for this.
Hopefully I can get it working and then take steps backwards to try to get correct permissions and see where/if it breaks.
Thanks again.
My account and the admin user group have read/write.
However on every individual file there are two "everyone" groups, and I have no idea what the "custom" permissions are supposed to mean.
I Terminal the owner / group / other permissions are listed as follows:
-rw----r--@ 1 ian staff 13318373 Aug 8 16:41 01 Caveman.mp3
I'm going to try to set everything from ~/Music/iTunes down to everyone read/write for now, hope that this clears the weird "custom" permission, and then run a span. I'm not entirely sure how to add staff group permissions because they're not showing up as a group option in the Finder info view, but I'm comfortable trying chmod in terminal for this.
Hopefully I can get it working and then take steps backwards to try to get correct permissions and see where/if it breaks.
Thanks again.
I ran "sudo chown -R ian:staff ~/Music/iTunes" and set the permissions to read & write for my account and "admins" and read only for "staff" and "everyone" which SEEMS to be working. The "custom" permissions for "everyone" are also gone. I've spanned about 1000 files and they were trashed successfully on my internal SSD.
But I want to make sure I can also restore and re-span without issue before I put this one to bed.
I ran "sudo chown -R ian:staff ~/Music/iTunes" and set the permissions to read & write for my account and "admins" and read only for "staff" and "everyone" which SEEMS to be working. The "custom" permissions for "everyone" are also gone. I've spanned about 1000 files and they were trashed successfully on my internal SSD.
But I want to make sure I can also restore and re-span without issue before I put this one to bed.
Awesome! Sounds like you're on the right track!
Let me know if there is anything I can do, but it seems like you've got it under control.
Also, please let me know how it goes with Restore testing and all that, and if everything is working as it should now, I can mark this problem as "solved".
Because of the previous issues, you most likely have a lot of stray files on your system that should have been trashed, but were not.
You can deal with those somewhat easier through TuneSpan, but it's still a bit tedious.
If you restore the tracks, but turn OFF the "trash files" option, TuneSpan will just update the locations to the files that already exist there. You'll be prompted about running into duplicate files and you can just choose the "use file at restore location" option.
After you've restore the files, then re-span them with the "trash files" option ON (it should already be on since that option is saved separately for span mode and restore mode). You'll get the same duplicate file prompt and can choose the same "use file at span location" option. That way no files will have needed to be copied in either direction making the restore and span pretty quick. But, after that span is complete, the files will be trashed during the verification phase.
If you can easily isolate the files that need to be trashed in TuneSpan, that back and forth process could be a lot easier that trying to track down the files yourself.
Awesome! Sounds like you're on the right track!
Let me know if there is anything I can do, but it seems like you've got it under control.
Also, please let me know how it goes with Restore testing and all that, and if everything is working as it should now, I can mark this problem as "solved".
Because of the previous issues, you most likely have a lot of stray files on your system that should have been trashed, but were not.
You can deal with those somewhat easier through TuneSpan, but it's still a bit tedious.
If you restore the tracks, but turn OFF the "trash files" option, TuneSpan will just update the locations to the files that already exist there. You'll be prompted about running into duplicate files and you can just choose the "use file at restore location" option.
After you've restore the files, then re-span them with the "trash files" option ON (it should already be on since that option is saved separately for span mode and restore mode). You'll get the same duplicate file prompt and can choose the same "use file at span location" option. That way no files will have needed to be copied in either direction making the restore and span pretty quick. But, after that span is complete, the files will be trashed during the verification phase.
If you can easily isolate the files that need to be trashed in TuneSpan, that back and forth process could be a lot easier that trying to track down the files yourself.
To clean up the old spans, I just ran a SpanTunes restore on my entire library overnight to fix the file associations. Because the files were never trashed, this didn't add anything to the size of my iTunes library folder, all 290 GB were still there. Then I just junked my entire SpanTunes folder on my remote drive (which had a backup) and started spanning from scratch.
It does look like I can span, restore and trash files without issue now. I think the real problem wasn't read/write permissions, but that the files belonged to the admin group, and not staff.
Anyway.. Looks like it's resolved for now. Thanks for your help.
To clean up the old spans, I just ran a SpanTunes restore on my entire library overnight to fix the file associations. Because the files were never trashed, this didn't add anything to the size of my iTunes library folder, all 290 GB were still there. Then I just junked my entire SpanTunes folder on my remote drive (which had a backup) and started spanning from scratch.
It does look like I can span, restore and trash files without issue now. I think the real problem wasn't read/write permissions, but that the files belonged to the admin group, and not staff.
Anyway.. Looks like it's resolved for now. Thanks for your help.
Replies have been locked on this page!