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

v12 Login image not displaying #394

Closed
sempervictus opened this issue Dec 13, 2017 · 72 comments
Closed

v12 Login image not displaying #394

sempervictus opened this issue Dec 13, 2017 · 72 comments
Labels

Comments

@sempervictus
Copy link

After upgrading from 11->12, the login background vanished.
Uploaded again through settings, saved message appears, but the progress circle next to the "saved" green indicator continues to churn, and the login page retains the default NextCloud image.

@sempervictus
Copy link
Author

sempervictus commented Dec 13, 2017

Logs show repeating patterns of:


Error | lib | ResourceLocator  can not find a web root (root:  /snap/nextcloud/4371/htdocs/apps/files_texteditor, file:  index.php/css/files_texteditor/4c4f06b6d3abda5a726d934e5991d3d6-merged.css,  webRoot: , throw: true) | 2017-12-12T23:00:08-0500
Error | lib | ResourceLocator  can not find a web root (root:  /snap/nextcloud/4371/htdocs/apps/files_sharing, file:  index.php/css/files_sharing/4c4f06b6d3abda5a726d934e5991d3d6-mergedAdditionalStyles.css,  webRoot: , throw: true) | 2017-12-12T23:00:08-0500
Error | lib | ResourceLocator  can not find a web root (root: /snap/nextcloud/4371/htdocs/apps/files,  file: index.php/css/files/4c4f06b6d3abda5a726d934e5991d3d6-merged.css,  webRoot: , throw: true) | 2017-12-12T23:00:08-0500

along with several instances of:


Error | no app in context | OCP\AppFramework\QueryException: Could not resolve OCA\Spreed\Settings\Admin! Class OCA\Spreed\Settings\Admin does not exist/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php - line 117:  OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\Spreed\\Sett...')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/ServerContainer.php - line 132:  OC\AppFramework\Utility\SimpleContainer->query('OCA\\Spreed\\Sett...')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/Settings/Manager.php - line 261:  OC\ServerContainer->query('OCA\\Spreed\\Sett...')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/Settings/Manager.php - line 352:  OC\Settings\Manager->query('OCA\\Spreed\\Sett...')/var/lib/snapd/snap/nextcloud/4371/htdocs/settings/Controller/AdminSettingsController.php - line 138:  OC\Settings\Manager->getAdminSettings('additional')/var/lib/snapd/snap/nextcloud/4371/htdocs/settings/Controller/AdminSettingsController.php - line 72:  OC\Settings\Controller\AdminSettingsController->getNavigationParameters('theming')[internal function] OC\Settings\Controller\AdminSettingsController->index('theming')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/AppFramework/Http/Dispatcher.php - line 160:  call_user_func_array(Array, Array)/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/AppFramework/Http/Dispatcher.php - line 90:  OC\AppFramework\Http\Dispatcher->executeController(Object(OC\Settings\Controller\AdminSettingsController), 'index')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/AppFramework/App.php - line 114:  OC\AppFramework\Http\Dispatcher->dispatch(Object(OC\Settings\Controller\AdminSettingsController), 'index')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:  OC\AppFramework\App  main('OC\\Settings\\Con...', 'index', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)[internal function] OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/Route/Router.php - line 299:  call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/base.php - line 1004:  OC\Route\Router->match('/settings/admin...')/var/lib/snapd/snap/nextcloud/4371/htdocs/index.php - line 48:  OC  handleRequest(){main} | 2017-12-12T22:55:49-0500
Error | no app in context | OCP\AppFramework\QueryException: Could not resolve OCA\OJSXC\Settings\Section! Class OCA\OJSXC\Settings\Section does not exist/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php - line 117:  OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\OJSXC\\Setti...')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/ServerContainer.php - line 132:  OC\AppFramework\Utility\SimpleContainer->query('OCA\\OJSXC\\Setti...')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/Settings/Manager.php - line 261:  OC\ServerContainer->query('OCA\\OJSXC\\Setti...')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/Settings/Manager.php - line 289:  OC\Settings\Manager->query('OCA\\OJSXC\\Setti...')/var/lib/snapd/snap/nextcloud/4371/htdocs/settings/Controller/AdminSettingsController.php - line 133:  OC\Settings\Manager->getAdminSections()/var/lib/snapd/snap/nextcloud/4371/htdocs/settings/Controller/AdminSettingsController.php - line 72:  OC\Settings\Controller\AdminSettingsController->getNavigationParameters('theming')[internal function] OC\Settings\Controller\AdminSettingsController->index('theming')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/AppFramework/Http/Dispatcher.php - line 160:  call_user_func_array(Array, Array)/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/AppFramework/Http/Dispatcher.php - line 90:  OC\AppFramework\Http\Dispatcher->executeController(Object(OC\Settings\Controller\AdminSettingsController), 'index')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/AppFramework/App.php - line 114:  OC\AppFramework\Http\Dispatcher->dispatch(Object(OC\Settings\Controller\AdminSettingsController), 'index')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:  OC\AppFramework\App  main('OC\\Settings\\Con...', 'index', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)[internal function] OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/Route/Router.php - line 299:  call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/base.php - line 1004:  OC\Route\Router->match('/settings/admin...')/var/lib/snapd/snap/nextcloud/4371/htdocs/index.php - line 48:  OC  handleRequest(){main} | 2017-12-12T22:55:49-0500
Error | no app in context | OCP\AppFramework\QueryException: Could not resolve OCA\IssueTemplate\Settings\Section! Class OCA\IssueTemplate\Settings\Section does not exist/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php - line 117:  OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\IssueTempla...')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/ServerContainer.php - line 132:  OC\AppFramework\Utility\SimpleContainer->query('OCA\\IssueTempla...')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/Settings/Manager.php - line 261:  OC\ServerContainer->query('OCA\\IssueTempla...')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/Settings/Manager.php - line 289:  OC\Settings\Manager->query('OCA\\IssueTempla...')/var/lib/snapd/snap/nextcloud/4371/htdocs/settings/Controller/AdminSettingsController.php - line 133:  OC\Settings\Manager->getAdminSections()/var/lib/snapd/snap/nextcloud/4371/htdocs/settings/Controller/AdminSettingsController.php - line 72:  OC\Settings\Controller\AdminSettingsController->getNavigationParameters('theming')[internal function] OC\Settings\Controller\AdminSettingsController->index('theming')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/AppFramework/Http/Dispatcher.php - line 160:  call_user_func_array(Array, Array)/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/AppFramework/Http/Dispatcher.php - line 90:  OC\AppFramework\Http\Dispatcher->executeController(Object(OC\Settings\Controller\AdminSettingsController), 'index')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/AppFramework/App.php - line 114:  OC\AppFramework\Http\Dispatcher->dispatch(Object(OC\Settings\Controller\AdminSettingsController), 'index')/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:  OC\AppFramework\App  main('OC\\Settings\\Con...', 'index', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)[internal function] OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/private/Route/Router.php - line 299:  call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)/var/lib/snapd/snap/nextcloud/4371/htdocs/lib/base.php - line 1004:  OC\Route\Router->match('/settings/admin...')/var/lib/snapd/snap/nextcloud/4371/htdocs/index.php - line 48:  OC  handleRequest(){main} | 2017-12-12T22:55:49-0500

@kyrofa
Copy link
Member

kyrofa commented Dec 13, 2017

So this is a custom background image? Are you using the theming app? Those errors are very much reminiscent of the myriad of CSS regressions introduced in v12 that caused us to hold back the update for so long. Assuming this is the theming app, looks like it (or a code path used by it) also has that issue. If you're able to give steps to reproduce from a clean install, that would be super helpful.

@kyrofa kyrofa mentioned this issue Dec 13, 2017
@sempervictus
Copy link
Author

This was done by installing the snap at v11 and enabling the theming app, uploading an image and running that way until the v12 rollover. At that point, the app still indicates that an image was uploaded, but the default one is presented. Additional attempts to re-upload the image to replace the default seem to succeed, but the preview generation never completes and the actual image is never updated.
Im concerned, given the use of the theming app (and not a core function) that its not so much a clean install issue since the version rollover carries existing users and data (along with any customizations made via the functionality of the original snap).

@kyrofa
Copy link
Member

kyrofa commented Dec 13, 2017

Oh I'm not concerned that it's an issue with a clean install either, I just need a way to reproduce :) .

@pherzing
Copy link

I can corroborate sempervictus's notes: 11.x snap nextcloud, upgraded to 12.0.4 this morning, same behavior re theming. For what it's worth, Safari 11 is saying:

Did not parse stylesheet at 'https://nextcloud.companyname.com/index.php/apps/theming/theming.scss' because non CSS MIME types are not allowed in strict mode.

Firefox 57 makes a similar comment:

Style sheet could not be loaded https://nextcloud.companyname.com/index.php/apps/theming/theming.scss

@ti-guru
Copy link

ti-guru commented Dec 13, 2017

I can confirm the issue as my instance was also upgraded from 11 to 12. Seems like the issue affects choice of color, logo and background picture. Also, the preview thumbnail of the logo has moved and the login thumbnail does not generate.
theming_app
login

@kyrofa
Copy link
Member

kyrofa commented Dec 13, 2017

I think I've got enough info, I'll play with it when I'm able. However, I'm pretty certain this is an upstream Nextcloud issue, so I doubt we can fix it here. If you need theming, it sounds like you may have to revert and stay on v11 until v12 fixes this regression. To do that, you first need to revert back to v11 (this will throw away any database modifications made during your stay in v12, but the raw data will not be touched):

$ sudo snap revert nextcloud
nextcloud reverted to 11.0.5snap2

Then refresh to the 11/stable channel to make sure you don't get v12 updates:

$ sudo snap refresh nextcloud --channel=11/stable
nextcloud (11/stable) 11.0.5snap2 from 'nextcloud' refreshed
$ snap info nextcloud
<snip>
tracking:                   11/stable
<snip>

@pherzing
Copy link

I'm too poorly informed to understand the subtleties of the snap architecture, so I offer this only in case it's helpful for scoping the problem:

I operate a separate nextCloud 12.0.4 server that was built on a full stack (instead of the snap deployment) only a few days ago, because it needed to integrate with an Active Directory setup. Theming there is working as expected.

Again, I'm not disputing that it's a general nextCloud issue. The two servers are primarily different in that one is snap and one is not, but many settings differ between them, and unlike my snap install, the full-stack system was not an upgrade from 11; it started its life at 12.0.4.

Again, only if it's helpful, but both are running on Ubuntu 16.0.4, on Digital Ocean droplets.

@kyrofa
Copy link
Member

kyrofa commented Dec 13, 2017

@pherzing thank you for the details! Note that I'm not trying to say that theming is generally broken in upstream Nextcloud, I'm trying to say that v12 changed the way assets in apps worked from v11. In the snap (which is read-only) we store apps installed by the user outside of the webroot, which is supported by Nextcloud, and worked great in v11 and earlier, but with their v12 refactor it broke in numerous places because they don't have tests covering these cases. We fixed all the ones we knew about, but it looks like there's another one in the theming app somewhere.

@pherzing
Copy link

Thanks for the response. It helps to understand the why, even if I can't fix it myself.

@WereCatf
Copy link

I keep seeing "ResourceLocator can not find a web root (root: /var/snap/nextcloud/4371/nextcloud/extra-apps/contacts, file: index.php/css/contacts/d7a9968d2ff19408599e6832f8b4b3d1-style.css, webRoot: , throw: true)" in my log-files whenever I open the contacts-tab in Nextcloud, and I do not know if it's related to this, but it seems to me like it just might be. I have never used theming with Nextcloud, though, or even tried it, so I have no idea why this happens. Doesn't seem to be causing me any issues, but I am just reporting this just in case it's related to this issue here and if my report might be of any help.

@SkyWheel
Copy link

Can confirm the same issue after upgrading from 11.x.x-stable to 12/edge long time ago (June 2017???).

@kyrofa
Copy link
Member

kyrofa commented Dec 15, 2017

@WereCatf that sounds like a different issue that I personally fixed. Does the contacts app not work properly? I'm using it here and it's working fine, no log errors. You might want to log a different issue.

@tobia
Copy link

tobia commented Jan 16, 2018

I directly installed 12.0.4snap1 4371 on a fresh server, enabled https with nextcloud.enable-https lets-encrypt and went straight to Admin / Theming to change logo and background.

The logo appears correctly in the upper left corner when logged in, but the login page shows the default logo and background image. Also Loading preview... keeps spinning forever.

@tobia
Copy link

tobia commented Jan 16, 2018

By the way, I just started using snaps. Is there a way to do a manual override? Say that I (as root) want to customize a file inside the snap package, what options do I have?

@sempervictus
Copy link
Author

@tobia: I think you're talking about rolling your own snaps for that since by definition they are immutable once built.

@kyrofa
Copy link
Member

kyrofa commented Jan 16, 2018

@sempervictus is right, if you want to change, say, a .php file in /snap/nextcloud/current/htdocs/, you do indeed need to roll your own snap.

@dialed
Copy link

dialed commented Jan 19, 2018

Hello. I am new to nextcloud and snaps but installed via digitalocean and really like the functionality. Is changing the nextcloud logo at the login screen a feature that is coming to the snap or must one install manually to get that functionality? Thank you in advance!

@kyrofa
Copy link
Member

kyrofa commented Jan 19, 2018

Hey @dialed! Indeed, the fact that it doesn't work is just a bug, we'll track it down.

@kyrofa
Copy link
Member

kyrofa commented Jan 19, 2018

As mentioned above, you can install v11 for now if you require this functionality from the 11/stable channel.

@dialed
Copy link

dialed commented Jan 19, 2018

Thanks @kyrofa sorry about the confusion, total noob here!

@kyrofa
Copy link
Member

kyrofa commented Jan 30, 2018

Would you guys mind taking version 12.0.5 for a spin to see if anything has been fixed, there? Just install it on a test machine or something and see if it works the way you expect:

$ sudo snap install nextcloud --channel=stable/pr-432

@tobia
Copy link

tobia commented Jan 30, 2018

I just did this:

# snap refresh nextcloud --channel=stable/pr-432
nextcloud (stable/pr-432) 12.0.4snap2 from 'nextcloud' refreshed

And /settings/admin says 12.0.5

But the issue is still there. Loading a logo or a background image in /settings/admin/theming does not give an endless spinner as before, but neither the background nor the logo are shown on the login page.

I did empty my cache and reload a few times. The body of the login page seems to have a background-image: url(../img/background.jpg?v=1) coming from guest.css?v=416fcc3f9f4e5df41ca45d3600d75c61-29 that still points to the default image, when opened in a new tab.

@QuaySo
Copy link

QuaySo commented Feb 5, 2018

I tried this on a fresh server and had the exact same results as @tobia mentioned. Strange enough the uploaded background image is not visible in the webclient, but in the Android app it is!

@tobia
Copy link

tobia commented Feb 5, 2018

@QuaySo this proves that the images are saved correctly, so there must be a (second?) bug specific to the web UI, that has to do with the immutability of the snap package.

@kyrofa
Copy link
Member

kyrofa commented Feb 5, 2018

there must be a (second?) bug specific to the web UI, that has to do with the immutability of the snap package.

More specifically a bug that has something to do with storing these assets out of the webroot.

@sempervictus
Copy link
Author

Is it feasible to force AOT compilation of all assets and "burn them into" the resulting squashfs image? If it has to generate runtime assets, do we need a snapcraft-specific patch for the paths where these go and are accessed from?

@kyrofa
Copy link
Member

kyrofa commented Feb 21, 2018

Nah, Nextcloud does it on the fly already; it writes them into the data dir. When you install a new app that uses SCSS, it'll compile those as well. For some reason it's just not compiling this one, not sure why yet.

@kyrofa
Copy link
Member

kyrofa commented Feb 21, 2018

Ah ha, I think the problem is here, it's relying on the server root, which doesn't necessarily contain the apps.

@kyrofa
Copy link
Member

kyrofa commented Feb 21, 2018

Yep, that was it. Spinning the fix now, will have something for y'all to test soon.

@kyrofa
Copy link
Member

kyrofa commented Feb 21, 2018

Logged nextcloud/server#8462 for your reference.

@kyrofa
Copy link
Member

kyrofa commented Feb 21, 2018

Alright, pull request is up: nextcloud/server#8463.

@kyrofa
Copy link
Member

kyrofa commented Feb 21, 2018

I'm about to go to bed, but I wanted to get a snap up for folks to test before I did. Unfortunately the armhf and arm64 builds aren't done yet (I'll get them up in the morning), but amd64, i386, and ppc64 builds are up. Anyone bitten by this issue, please give the fix a test by using the stable/394-theming-fix channel:

$ sudo snap install nextcloud --channel=stable/394-theming-fix

Or if you already have it installed:

$ sudo snap refresh nextcloud --channel=stable/394-theming-fix

I'll comment again when the arm builds are up.

@QuaySo
Copy link

QuaySo commented Feb 21, 2018

I tested it on a fresh install and both (logo and background) can be changed. Works as expected.
Nice fix!

@kyrofa
Copy link
Member

kyrofa commented Feb 21, 2018

Alright, the armhf and arm64 builds are up as well.

Thanks for testing, @QuaySo!

@tobia
Copy link

tobia commented Feb 21, 2018

@kyrofa I can confirm that the issue is fixed also in the case of upgrade of an existing snap. Thank you!

@kyrofa
Copy link
Member

kyrofa commented Feb 21, 2018

Excellent, thanks @tobia!

@abarfety
Copy link

abarfety commented Feb 22, 2018

@kyrofa Issue is fixed, but it seems the fix broke Unsplash, app that shows a random photo on log in screen. With fix, no image appears, when reverted to 12.0.5snap1, Unsplash works again.

@kyrofa
Copy link
Member

kyrofa commented Feb 22, 2018

Wha...? Unsplash must somehow rely on Theming, then. This is definitely a fix for theming, though (the logic there was broken); sounds like Unsplash also needs a fix. I'll take a look when I'm able.

@abarfety
Copy link

To be more specific hoping to save you some time: Unsplash breaks after logo has been modified. I kinda found a weird fix: if you upload a background image then Unsplash works again, showing a random photo on log in screen (but not the image uploaded).

@kyrofa
Copy link
Member

kyrofa commented Feb 22, 2018

Oh, that sounds like a bug in Unsplash being exposed by theming actually working, now. Any chance you've tested this outside of the snap? Does it work there, or is it also broken?

@abarfety
Copy link

Tested on v13.0.0, outside of the snap. Unsplash (with theming) worked as expected.

@innoliam
Copy link

$ sudo snap refresh nextcloud --channel=stable/394-theming-fix
Unfortunately, while the progress spinner now completes, I end up with a solid colour as BG instead of the PNG/JPG I uploaded (tried multiple). Is there a system dependency I'm missing (I manually pulled in php-imagemagick on Ubuntu 16.04)?

@kyrofa
Copy link
Member

kyrofa commented Feb 23, 2018

No, the snap includes all its dependencies. Have you also set theme colors, or are you still using the default colors?

@kyrofa
Copy link
Member

kyrofa commented Feb 27, 2018

Note that this fix has landed in master, stable13, and stable12, and should be included in both 12.0.6 as well as 13.0.1. I'll close this issue once they're released and once we update.

@kyrofa
Copy link
Member

kyrofa commented Feb 28, 2018

You can see that this is fixed upstream by checking out the daily v12 snap for today (it'll give you a taste of 12.0.6):

$ sudo snap install nextcloud --channel=12/edge

Or, if you already have it installed:

$ sudo snap refresh nextcloud --channel=12/edge

@ezspot
Copy link

ezspot commented Mar 1, 2018

Downgrading is not supported and is likely to cause unpredictable issues (from 13.0.0.14 to 12.0.5.3)
I'm on 13.0.0snap1-rc1 atm. - Theming don't work there.

@kyrofa
Copy link
Member

kyrofa commented Mar 1, 2018

Yeah don't do that if you're on v13. Use 13/edge instead to test the fix, there.

@lenusch
Copy link

lenusch commented Apr 11, 2018

Theming not working on Chrome with newest snap 13.0.1 rc1

@gcommit
Copy link

gcommit commented Apr 17, 2018

I have the same issue on 13.0.1
As a workaround you can install the app "Unsplash" and deactivate it. For some reason this triggers a update of the login screen (do it that way, if you don't want to do changes on system itself)

@SkyWheel
Copy link

The trick with "Unsplash" didn't work for me :(

@gcommit
Copy link

gcommit commented Apr 18, 2018

Hey
You have to empty your browser cache as well. Or just use a private window. :)

@SkyWheel
Copy link

I was using private window. The Unsplash app worked as supposed, it was changing backgrounds. But it didn't make any difference for my custom theming, neither while the was turned on, nor while it disabled :(

@kyrofa
Copy link
Member

kyrofa commented Jun 18, 2018

Note that theming seems to be working as of 13.0.2snap1. I'm going to go ahead and close this issue, please let me know if there are still issues.

@kyrofa kyrofa closed this as completed Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests