Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error on Nextcloud 21 & PHP 8 #838

Closed
Gomez opened this issue Mar 12, 2021 · 8 comments
Closed

Error on Nextcloud 21 & PHP 8 #838

Gomez opened this issue Mar 12, 2021 · 8 comments
Labels

Comments

@Gomez
Copy link
Member

Gomez commented Mar 12, 2021

After activating this app my Nextcloud died with "Internal Server Error".

Nextcloud 21.0.0
PHP 8.0.3
New installation, no upgrade.
After disabling the app with occ, Nextcloud works again.

Here is the log:

{"reqId":"xuKdDQUli22TR8BF2qw6","level":3,"time":"2021-03-12T15:04:21+00:00","remoteAddr":"2003:e5:5f22:5600:6a87:a2b9:f34c:cfee","user": "rainer","app":"core","method":"GET","url":"/apps/files/","message":"{\"Exception\":\"RuntimeException\",\"Message\":\"image not found: image:../dist/img/ba6753921817d8ebc105f01e1dc06872.sv g webroot: serverroot:/var/www/virtual/rainer.domain/htdocs\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/virtual/rainer.domain.de/htdocs/lib/private/legacy/template/functions.php\" ,\"line\":238,\"function\":\"imagePath\",\"class\":\"OC\\\\URLGenerator\",\"type\":\"->\"},{\"file\":\"/var/www/virtual/rainer.domain.de/htdocs/lib/public/Template.php\",\"line\":49,\"fu nction\":\"image_path\"},{\"file\":\"/var/www/virtual/rainer.domain.de/htdocs/apps2/music/lib/Utility/HtmlUtil.php\",\"line\":43,\"function\":\"image_path\",\"class\":\"OCP\\\\Template\" ,\"type\":\"::\"},{\"file\":\"/var/www/virtual/rainer.domain.de/htdocs/apps2/music/appinfo/app.php\",\"line\":33,\"function\":\"getSvgPath\",\"class\":\"OCA\\\\Music\\\\Utility\\\\HtmlUt il\",\"type\":\"::\"},{\"file\":\"/var/www/virtual/rainer.domain.de/htdocs/lib/private/NavigationManager.php\",\"line\":110,\"function\":\"OCA\\\\Music\\\\App\\\\{closure}\",\"class\":\" OC_App\",\"type\":\"::\",\"args\":[\"*** sensitive parameters replaced ***\"]},{\"file\":\"/var/www/virtual/rainer.domain.de/htdocs/apps/theming/lib/ThemingDefaults.php\",\"line\":184,\" function\":\"getAll\",\"class\":\"OC\\\\NavigationManager\",\"type\":\"->\"},{\"file\":\"/var/www/virtual/rainer.domain.de/htdocs/lib/private/legacy/OC_Defaults.php\",\"line\":263,\"func tion\":\"getShortFooter\",\"class\":\"OCA\\\\Theming\\\\ThemingDefaults\",\"type\":\"->\"},{\"file\":\"/var/www/virtual/rainer.domain.de/htdocs/lib/public/Defaults.php\",\"line\":169,\"f unction\":\"getLongFooter\",\"class\":\"OC_Defaults\",\"type\":\"->\"},{\"file\":\"/var/www/virtual/rainer.domain.de/htdocs/core/templates/layout.guest.php\",\"line\":55,\"function\":\"g etLongFooter\",\"class\":\"OCP\\\\Defaults\",\"type\":\"->\"},{\"file\":\"/var/www/virtual/rainer.domain.de/htdocs/lib/private/Template/Base.php\",\"line\":178,\"args\":[\"/var/www/virtu al/rainer.domain.de/htdocs/core/templates/layout.guest.php\"],\"function\":\"include\"},{\"file\":\"/var/www/virtual/rainer.domain.de/htdocs/lib/private/Template/Base.php\",\"line\":1 50,\"function\":\"load\",\"class\":\"OC\\\\Template\\\\Base\",\"type\":\"->\"},{\"file\":\"/var/www/virtual/rainer.domain.de/htdocs/lib/private/legacy/OC_Template.php\",\"line\":180,\"fu nction\":\"fetchPage\",\"class\":\"OC\\\\Template\\\\Base\",\"type\":\"->\"},{\"file\":\"/var/www/virtual/rainer.domain.de/htdocs/lib/private/legacy/OC_Template.php\",\"line\":211,\"func tion\":\"fetchPage\",\"class\":\"OC_Template\",\"type\":\"->\"},{\"file\":\"/var/www/virtual/rainer.domain.de/htdocs/lib/private/Template/Base.php\",\"line\":132,\"function\":\"fetchPage \",\"class\":\"OC_Template\",\"type\":\"->\"},{\"file\":\"/var/www/virtual/rainer.domain.de/htdocs/lib/private/legacy/OC_Template.php\",\"line\":332,\"function\":\"printPage\",\"class\": \"OC\\\\Template\\\\Base\",\"type\":\"->\"},{\"file\":\"/var/www/virtual/rainer.domain.de/htdocs/index.php\",\"line\":63,\"function\":\"printExceptionErrorPage\",\"class\":\"OC_Template\ ",\"type\":\"::\"}],\"File\":\"/var/www/virtual/rainer.domain.de/htdocs/lib/private/URLGenerator.php\",\"Line\":236,\"CustomMessage\":\"--\"}","userAgent":"Mozilla/5.0 (X11; Linux x86_64 ; rv:86.0) Gecko/20100101 Firefox/86.0","version":"21.0.0.18"}

Thanks for this great app i am happy to help testing.

@paulijar
Copy link
Collaborator

Thanks for the report.

That kind of looks like some installation/update problem. Nextcloud can't find the Music app file dist/img/ba6753921817d8ebc105f01e1dc06872.svg which is the Music application icon. As the application icons are always shown in the Nextcloud top pane, the missing icon file now kills the whole Nextcloud.

If you navigate to <nextcloud_installation_folder>/apps/music/dist/img, can you verify that the file is indeed missing? Is there any files there?

You might be able to solve the situation by manually removing the whole folder <nextcloud_installation_folder>/apps/music/ and then reinstalling the app.

@Gomez
Copy link
Member Author

Gomez commented Mar 14, 2021

Thanks for the pointer. Was using the music.zip release instead of music_1.0.3_nc-signed.tar.gz. Everything fine now!

@Gomez Gomez closed this as completed Mar 14, 2021
@paulijar
Copy link
Collaborator

Hmm, that still doesn't make sense. Using music.zip should still work as well as the NC signed package, the only difference should be the signature file which can be used by Nextcloud to verify that all the files are unaltered after the release. But if you would install the "Source code (zip)", then that would explain it. Because that package doesn't include the generated distribution files, including the image files.

Anyway, glad it works now!

@Gomez
Copy link
Member Author

Gomez commented Mar 16, 2021

I was wrong. The error is still there, just done a fresh install. The svg file exists but cant be found by nextcloud.

image not found: image:../dist/img/ba6753921817d8ebc105f01e1dc06872.svg

Could it be the ..? What should be the root?

@Gomez Gomez reopened this Mar 16, 2021
@paulijar
Copy link
Collaborator

paulijar commented Mar 16, 2021

The root should be a folder called img under apps/music. The folder is supposed to be empty, but it has to be there, otherwise Nextcloud will fail to find the images. You also need to have empty folders js and css under apps/music for the Music app to work correctly (this is the case at least on ownCloud and some versions of Nextcloud, I'm not quite certain about NC21 specifically). All these empty folders are there in music_1.0.3_nc-signed.tar.gz.

@Gomez
Copy link
Member Author

Gomez commented Mar 16, 2021

Ok, now i get it. I use some deployment magic at Portknox (https://portknox.net) and the empty folders get ignored. I added them and everything works now. Thanks for the help!

Should we add some .keep files in this folders? Maybe others get this error too?

@paulijar
Copy link
Collaborator

Should we add some .keep files in this folders? Maybe others get this error too?

Yes, this might make sense. And actually, it has popped my mind before. So yes, let's do this for the next release.

paulijar added a commit that referenced this issue Mar 21, 2021
The source foldres `css`, `img`, and `js` don't include any files in
the delivery package but it is still vital to have them around under
the `music` folder. Not having `css` and `js` folders may totally break
the Music app (depending on the cloud version used) and not having the
`img` folder may break the whole cloud installation.

It has been proved that at least some external deployment scripts may
ignore totally empty directories, and hence, cause critical issues.

refs #838
@paulijar
Copy link
Collaborator

The .keep files are now included in those three folders in the brand new Music v1.1.0.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants