Is it only me? Errors when sharing with link (publicpreview.php (Internal Server Error))

Hi I just updated the NC to the latest version, everything works fine, but the console throws errors if I share the folder with MP3s with the public link.

this is only the case of MP3s, everything else works fine.

here’s the example of the error

publicpreview.php:1 GET My Cloud OS3 End of Service | Western Digital 500 (Internal Server Error)

Everything works, but I see these errors.
(I have Audio Player app that I tried disabling)

Please let me know

Can you show for the error in your webserver error log in order to know what’s actually causing this internal server error.

Here’s some log

Error PHP imagecreatefromstring(): Empty string or invalid image at /var/www/cloud_nextcloud/lib/private/legacy/image.php#575 2016-11-17T09:00:15+00:00 –
Error PHP fclose() expects parameter 1 to be resource, boolean given at /var/www/cloud_nextcloud/lib/private/Files/Storage/Local.php#205 2016-11-17T09:00:15+00:00 –
Error PHP fread() expects parameter 1 to be resource, boolean given at /var/www/cloud_nextcloud/lib/private/Files/Storage/Local.php#204 2016-11-17T09:00:15+00:00 –
Error PHP fopen(/mnt/external_hdd/cloud/nextcloud_data/admin/files/var/www/cloud_nextcloud/core/img/filetypes/audio.svg): failed to open stream: No such file or directory at /var/www/cloud_nextcloud/lib/private/Files/Storage/Local.php#203 2016-11-17T09:00:15+00:00 –
Error PHP filesize(): stat failed for /mnt/external_hdd/cloud/nextcloud_data/admin/files/var/www/cloud_nextcloud/core/img/filetypes/audio.svg at /var/www/cloud_nextcloud/lib/private/Files/Storage/Local.php#198 2016-11-17T09:00:15+00:00 –
Error PHP fopen(/mnt/external_hdd/cloud/nextcloud_data/admin/files/var/www/cloud_nextcloud/core/img/filetypes/audio.svg): failed to open stream: No such file or directory at /var/www/cloud_nextcloud/lib/private/Files/Storage/Local.php#203 2016-11-17T09:00:15+00:00 –
Error PHP filesize(): stat failed for /mnt/external_hdd/cloud/nextcloud_data/admin/files/var/www/cloud_nextcloud/core/img/filetypes/audio.svg at /var/www/cloud_nextcloud/lib/private/Files/Storage/Local.php#198 2016-11-17T09:00:15+00:00 –
Info admin_audit File accessed: “/var/www/cloud_nextcloud/core/img/filetypes/audio.svg” 2016-11-17T09:00:15+00:00 –
Info admin_audit File accessed: “/music/demo_SIM.mp3” 2016-11-17T09:00:15+00:00 –
Error PHP imagecreatefromstring(): Empty string or invalid image at /var/www/cloud_nextcloud/lib/private/legacy/image.php#575 2016-11-17T09:00:15+00:00 –
Error PHP fclose() expects parameter 1 to be resource, boolean given at /var/www/cloud_nextcloud/lib/private/Files/Storage/Local.php#205 2016-11-17T09:00:15+00:00 –
Error PHP fread() expects parameter 1 to be resource, boolean given at /var/www/cloud_nextcloud/lib/private/Files/Storage/Local.php#204 2016-11-17T09:00:15+00:00 –
Error PHP fopen(/mnt/external_hdd/cloud/nextcloud_data/admin/files/var/www/cloud_nextcloud/core/img/filetypes/audio.svg): failed to open stream: No such file or directory at /var/www/cloud_nextcloud/lib/private/Files/Storage/Local.php#203 2016-11-17T09:00:15+00:00 –
Error PHP filesize(): stat failed for /mnt/external_hdd/cloud/nextcloud_data/admin/files/var/www/cloud_nextcloud/core/img/filetypes/audio.svg at /var/www/cloud_nextcloud/lib/private/Files/Storage/Local.php#198 2016-11-17T09:00:15+00:00 –
Info admin_audit File accessed: “/var/www/cloud_nextcloud/core/img/filetypes/audio.svg” 2016-11-17T09:00:15+00:00 –
Info admin_audit File accessed: “/music/demo_rust-003-intro.mp3” 2016-11-17T09:00:15+00:00 –
Error PHP imagecreatefromstring(): Empty string or invalid image at /var/www/cloud_nextcloud/lib/private/legacy/image.php#575 2016-11-17T09:00:15+00:00 –
Error PHP fclose() expects parameter 1 to be resource, boolean given at /var/www/cloud_nextcloud/lib/private/Files/Storage/Local.php#205 2016-11-17T09:00:15+00:00 –
Error PHP fread() expects parameter 1 to be resource, boolean given at /var/www/cloud_nextcloud/lib/private/Files/Storage/Local.php#204 2016-11-17T09:00:15+00:00 –
Error PHP fopen(/mnt/external_hdd/cloud/nextcloud_data/admin/files/var/www/cloud_nextcloud/core/img/filetypes/audio.svg): failed to open stream: No such file or directory at /var/www/cloud_nextcloud/lib/private/Files/Storage/Local.php#203 2016-11-17T09:00:15+00:00 –
Error PHP filesize(): stat failed for /mnt/external_hdd/cloud/nextcloud_data/admin/files/var/www/cloud_nextcloud/core/img/filetypes/audio.svg at /var/www/cloud_nextcloud/lib/private/Files/Storage/Local.php#198 2016-11-17T09:00:15+00:00 –
Info admin_audit File accessed: “/var/www/cloud_nextcloud/core/img/filetypes/audio.svg” 2016-11-17T09:00:15+00:00 –
Info admin_audit File accessed: “/music/demo_happy_child.mp3” 2016-11-17T09:00:15+00:00 -

Actually something is wrong here… why the path is /mnt/external_hdd/cloud/nextcloud_data/admin/files/var/www/cloud_nextcloud/core/img/filetypes/audio.svg

my nexcloud web folder is located here /var/www/cloud_nextcloud/ not sure why it’s adding it to the “data” folder that I specified on an external HDD which in my case is /mnt/external_hdd/cloud/nextcloud_data/.

Can anybody please let me know if it happens to their setup or it’s only me?

Looks like a bug with some paths…
@Rello might be able to help …

Thanks for the hint - somehow did not see this post

I just moved it to the audioplayer :wink:

Sorry for not adding audioplayer before I wasn’t 100% sure if it’s related.

This explains the confusion :wink:

Hello,

the issue is strange - but not related to Audio Player.

within the sharing dialog, the preview images for MP3 files are created. if your file has a cover art, this will be the logo.
if not, the /core/img/filetypes/audio.svg (the note) will be displayed.

the strange thing is, that it is somehow working because the icons are actually being displayed.
also your log says thisInfo admin_audit File accessed: "/var/www/cloud_nextcloud/core/img/filetypes/audio.svg"

are you sure that your installation is correct?
because whats strange to me is, that your error files/line,numbers don´t even have the mentioned rows.
e.g.:
/var/www/cloud_nextcloud/lib/private/Files/Storage/Local.php#205

ouch, this looks different from what I have, I got my built from main website…
https://nextcloud.com/install/#instructions-server

Let me update it from github, I will report back here…

If you use a current version (10.0.1) and your file-integrity check doesn’t return errors, your code should be fine. On github is the development version which can be different in some points.

Okay, I made 2 discoveries:

  1. it is same error on the master branch in github
  2. it only happens to SOME MP3 files… omgg…

I think it’s about the cover or something, not sure. Here are the samples.
https://files.depawlur.com/s/dSwrLsxL6vufssA

hello,
I can´t tell you the solution. I only know that it works in my OC Testinstance on 9.1.2
the file itself does not contain any ID3 information. and the icon is being displayed in your page.

so perhaps some Webserver setup?
cant tell :frowning:

It doesn’t give errors in my OC, but it has these errors in NC. I don’t think it’s audioplayer related or my server setup.

It does work, but there are errors in the console specifically with some of these files.

I currently having the similar errors:

fclose() expects parameter 1 to be resource, boolean given at /media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/lib/private/Files/Storage/Local.php#218

fread() expects parameter 1 to be resource, boolean given at /media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/lib/private/Files/Storage/Local.php#217


Error	PHP	fopen(/media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/data/admin/files/media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/core/img/filetypes/audio.svg): failed to open stream: No such file or directory at /media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/lib/private/Files/Storage/Local.php#216	2016-12-14T19:25:45-0500
Error	PHP	filesize(): stat failed for /media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/data/admin/files/media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/core/img/filetypes/audio.svg at /media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/lib/private/Files/Storage/Local.php#211	2016-12-14T19:25:45-0500
Error	PHP	imagecreatefromstring(): Empty string or invalid image at /media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/lib/private/legacy/image.php#597

Looks like an issue with the NC filetype icon?!
Need to check

I don’t have this issue in any NC old version.
The audio & video files wouldn’t work if I connect through WAN.

@depawlur
I set up a NC11 to validate this.
I can confirm that I am seeing the same errors. it occurs for every MP3 where NC can not derive a cover art from the ID3.
In this case an error 500 is triggered by NC and the stock “note” icon is being displayed.

In my case I have one with a cover and 3 without.

its not related to Audio Player;
And its not influencing the Functionality of the sharing player;

…I will try to find out what the issue is because it should be corrected in NC core…