-
Notifications
You must be signed in to change notification settings - Fork 199
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
v0.1.6 (15.11.2013) - undefined index: filesize #123
Comments
Looks like an getID3 issue. Maybe @JamesHeinrich knows more about it. @JamesHeinrich I hope it's not importunate to call you to this issue. |
I'd probably need more context to figure out what's going on. From a quick glance at the getID3 code it seems possible you could get that kind of error if the audio file appears to exist but could not be opened (untested speculation). How is getID3 being called in your application? Is this error specific to one audio file in particular? If so, can you provide a link to that file? |
@JamesHeinrich It's possible that the file isn't readable, because we experience some problems when encryption (within owncloud), which should be transparent to file reads, is enabled. But maybe the file is corrupt. @j-ed Can you provide the file? Or test it against a the getID3 demo (there is a browse demo in the getID3 package) |
If the file is corrupt, I'd say it has to be corrupt at the filesystem level, as opposed to being an invalid/unsupported audio/video file: getID3 is reasonably tolerant of invalid-format files, but this error would have to occur after checking that the requested file exists, but after the getid3::openfile function tries (and apparently fails?) to open the file. I'm curious to know the results of your testing: even though I suspect that it's not really a getID3 error, perhaps I can add another error check in there somewhere to catch a situation like this where the file seems to exist but fails to open in this particular manner. |
@JamesHeinrich I will wait for @j-ed (maybe he can send me the file and I can test and debug locally) and then maybe create a pull request on your repo to add the check. Is this ok? |
Please do. |
@kabum and @JamesHeinrich I'll try my best to identify the corrupted file, unfortunately the log file is not helpful here. |
@kabum I've sent you my debugging result as an email. Let me know if you need further information. |
@j-ed I've had time to look at the file. I just uploaded it to my ownCloud and watched the log. It says
There is a getID3 error I set the log level for my ownCloud in the admin settings to "all" so the debug messages (as posted above) appear. It's the same for the other file. Are you able to reproduce the error? |
If you want to send me the file I can tell you more about how or why the file is showing up as corrupt. |
You have new mail. |
I do? I don't see anything. Please send a sample file and/or link to one to info@getid3.org |
@j-ed Do you have encryption enabled? |
|
The provided MP3 files are plain, simple, uncorrupted files as far as I can tell. Constant bitrate, no corrupt data between ID3v2 and audio data, ID3v2 is nice and small (2kB). I don't see why getID3 would have any problem with this file. Is getID3 operating on the full .mp3 file, or are you copying a small segment of it (e.g. over the internet) for analysis? Is getID3 being called with a call to Analyze() or to AnalyzeString() ? |
What can I do to try to reproduce this bug? |
I forwarded an email to you ;) |
This affects me also and I would be happy to help debug. |
Hi, any news on this issue? I got nearly the same message in my log, combined with three other: [PHP] Error: fread() expects parameter 1 to be resource, null given at /var/www/oc.x77.chickenkiller.com/nextcloud/apps/music/3rdparty/getID3/getid3/getid3.php#2010 |
@ionoci Sorry for the delay. But to answer your question, there's no news or progress on this issue. In your case, the logs indicate that opening some audio file for scanning has failed. Can you tell, which file would that be? Does the scanning break at some point, or is there a file (or many) missing from the scanned library, or shown with incomplete metadata? I find it likely, that there might have been multiple unrelated issues through the years, which have caused this same error log "Undefined index: filesize". Some of the problems causing this kind of error might well have got fixed already and/or some new error scenarios may have been introduced by new versions of ownCloud/Nextcloud/Music/getID3. |
There may be many reasons why opening a file for reading fails. In those cases, the core function File::fopen returns null or false. These cases are now caught and logged within ExtractorGetID3. Previously, the null/false was passed on to GetID3 library, which in turn logged some errors which were more difficult to interpret. The error message now logged by ExtractorGetID3 contains the path of the problematic file which should make it easier to investigate such issues. refs #123
I now added checking for the file opening: If opening a file for metadata extraction fails, then an error message containing the path of the failed file is logged, and the invalid file handle is not passed on to GetID3 library. |
@paulijar No problem, thanks for the work you are doing. |
I don't know, but there's a good chance that it will happen during this week. This all COVID-19 hassle has given me some spare time which can be invested on this project ;). There are still one or two other things which I would like to implement before making the new release. |
@ionoci The release v0.13.1 with the added check and logging is now available. |
@paulijar I tried the update v0.13.2. The error is still the same, except the line numbers. I can't see which sound files causes the error. I use the nextcloud web log, do I need to use anotherr log? |
@ionoci Okay, if you are still seeing those error messages Those error messages look like they should cause some serious issues, like scanning never finishing. Haven't you observed anything like that? |
I don't know if this helps but, having just set up a Nextcloud server I'm seeing the same errors:
For info, my music is all on a read-only NFS share. It looks to have all imported from a quick glance, but I do have about 14000 songs so can't be 100% certain on that front. |
@infidelus Thanks for your input. Your log tells us that the problem has happened when trying to extract embedded cover image for an album. Do you see album covers missing in the Albums view? Your log also shows the ID of the album where the problem happened; it's
|
Thanks for that. I installed pgAdmin and ran that command and it came back with a result. I then logged into my Nextcloud instance and went to Music and found the related file, for which the (low quality) cover is displayed. Probably not particularly relevant, but It's actually an older mp3. I've been going through and updating all the metadata for my music recently using puddletag and data from Discogs & Musicbrainz. The file in question hasn't been updated yet but does contain enough metadata for Music to display it. |
@paulijar The scan works fine, the result is correct. I started a scan over all ~9000 files and it worked well. Only the error messages in the log are irritating me. |
@infidelus As you now have located the file related to the logged errors, could you test opening the details pane for this track on the Music app? When you do this, the metadata is extracted directly from the file, without utilizing any previously indexed data from the database. Then check the logs, if similar errors again got logged. With this test, we get to know, if the problem happens every time that particular file is parsed, or only sporadically or depending on the situation. |
Yes, the errors occur again when I open the details pane.
Etc ... |
@infidelus Okay great, then we are making progress. Could you maybe share this one file with me (e.g. by email)? |
Email sent |
@infidelus Thanks for the sample file. When testing with PHP7.1 and Nextcloud 14, I saw no errors in the log when opening the details pane for this file. Then, I switched to PHP7.4 and Nextcloud 18, and now I could see the I still didn't see any errors about Anyway, I managed to track down the |
Thanks for looking. For info I'm using PHP 7.2 on Nextcloud 18 and this script that's mentioned in the Nextcloud docs.
|
@paulijar: Please do. Your analysis along with a relevant sample file would be welcome. |
@infidelus @ionoci Music app v0.14.0 was just released and it contains an updated (development) version of getID3. For me, it fixes those |
Installed the update and opened the file that was previously a problem. No new errors showing in the logs so looks good. Thanks Pauli :) |
perfect! no errors at all. thanks a lot pauli. I think this really old issue may be closed now :) 👍 |
Great, thanks for testing! |
With the given snapshot the following message is displayed once the scan of the music repository has been finished:
The text was updated successfully, but these errors were encountered: