Open FallingSnow opened 7 years ago
Could you post your greeter config file here?
#
# [greeter]
# debug_mode = Greeter theme debug mode.
# detect_theme_errors = Provide an option to load a fallback theme when theme errors are detected.
# screensaver_timeout = Blank the screen after this many seconds of inactivity.
# secure_mode = Don't allow themes to make remote http requests.
# time_format = A moment.js format string so the greeter can generate localized time for display.
# time_language = Language to use when displaying the time or "auto" to use the system's language.
# webkit_theme = Webkit theme to use.
#
# NOTE: See moment.js documentation for format string options: http://momentjs.com/docs/#/displaying/format/
#
[greeter]
debug_mode = true
detect_theme_errors = true
screensaver_timeout = 300
secure_mode = false
time_format = LT
time_language = auto
webkit_theme = material-git
#
# [branding]
# background_images = Path to directory that contains background images for use by themes.
# logo = Path to logo image for use by greeter themes.
# user_image = Default user image/avatar. This is used by themes for users that have no .face image.
#
# NOTE: Paths must be accessible to the lightdm system user account (so they cannot be anywhere in /home)
#
[branding]
background_images = /usr/share/backgrounds
logo = /usr/share/lightdm-webkit/themes/antergos/img/antergos.png
user_image = /usr/share/lightdm-webkit/themes/antergos/img/antergos-logo-user.png
I've tried it with antergos as well. As soon as you open developer tools and try to change the background image the greeter crashes.
The path you are attempting to access is not located anywhere that themes are allowed access. The only paths that are accessible to themes are the paths listed in the greeter config file as well as the data directory provided by lightdm. The data directory is "per-user" so themes should authenticate the user before attempting to store or access files in the data directory lightdm provides for the user. On second thought, authentication isn't necessary as no private data should ever be stored in the users' data directory. Let me know if you have any questions :smile:
I don't think it's an issue of attempting to access unauthorized files, perhaps files that don't exist. I loaded the antergos theme, opened developer tools, selected the background element which had something/sandstone.jpg loaded at the moment. I clicked the end of sandstone and press backspace, wait about 300ms and the theme locks up. First the dev tools go black, then the rest of the screen.
Even if this is only the case when the requested file cannot be found, I don't think the greeter should lock up.
CONSOLE ERROR Not allowed to load local resource: file:////var/lib/AccountsService/Art/bg10.jpg
I think its locking up b/c of an infinite recursion that occurs when the above error is output to the log. I'll look into it asap.
In case its something else, could you check to see if anything shows up in your systemd journal that looks like it could be related?
CONSOLE ERROR Not allowed to load local resource: file:////var/lib/AccountsService/Art/bg10.jpg
I think this is actually happening because the host is http://localhost:8080
but I imagine it would happen if the theme was built too.
Oh man, there is a huge dump in journalctl. http://pastebin.com/9DCW1K5V
BTW, I didn't mean to bother you on Christmas eve, please enjoy your night instead of worrying about this.
No worries, you aren't keeping me. I'm just checking emails periodically. I probably won't have time to really look into this until Monday.
I think this is actually happening because the host is http://localhost:8080 but I imagine it would happen if the theme was built too.
Hmm..so you arent loading the greeter normally? Does the issue happen if you load the greeter normally (aka reboot and let lightdm start it)
Yes, it does happen if I use the greeter normally. (I did dm-tool lock
)
Could you test the latest version and let me know if the issue persists?
lightdm-webkit2-greeter 2.2.1-1
gives the same result. Restarted lightdm and used it in an actual login, still locked up.
Could you post the bg image here so I can test it locally?
background-image: url(file:///var/lib/AccountsService/A), url(file:///usr/share/lightdm-webkit/themes/build/7e1eca6dd7f6935f8058845ed05cbff2.jpg);
Since the first one failed (it is neither a image nor a directory and as you stated earlier, not in a directory accessible by lightdm-webkit2-greeter) the second image displays. This all happens flawlessly. The issue arises when you try to change the background image. For example you would expect that by removing the A at the end from file:///var/lib/AccountsService/A
that it would fail again and the fallback image would remain. But instead the greeter locks up and crashes.
So to answer your question lol, there is no image I am trying to load.
Hmm..I dont think this is a bug in the greeter. I think its an issue in webkitgtk :thinking:
:disappointed: Can you point me in the right direction to report the bug please?
Reporting bugs to webkitgtk requires some effort. You have to create a test case that they can use to reproduce the issue consistently. I'm not so sure its worth the effort in this case. I mean unless I'm misunderstanding the issue, it only occurs when you try to manipulate the HTML using the dev console (which is not really a high priority feature IMO). There are other ways by which to change the background image of an element that don't involve using the dev console :wink:
Well it first arose while I was using my theme. My theme has an input box that allows you to change the background image location on the fly. But when you change the input and it in turn updates the url to the background image, it locks up. So it seems that it is not only related to the dev console.
I even went through the source code of the antergos theme and saw you were using jquery. So I tried to change the background using a button with an onClick event to update the background css via pure javascript, still locked up. :cry:
I still don't understand how the antergos theme is able to do it and I am not.
Hmm..It could be related to React. I've hit a few weird bugs using React with webkitgtk in the development of our installer. Though all of them were magically resolved when webkitgtk 2.14 was released. I'll try to take a look at what you have as soon as I have some time. If you could point me to the file that contains the related code that would be great :smiley:
About this:
My theme has an input box that allows you to change the background image location on the fly.
That won't really be possible as themes access to the filesystem is limited.
Thanks, I'll look more into it tonight. One thing I noticed already (but I doubt its a problem) is that you have one too many /
characters here
I know. But shouldn't it just fail if they attempt to access something they can't. The image should only load if the greeter is actually able to find it and can load it. So technically, as long as the enter the correct location it should work.
I realized the one to many slashes when I was giving you the background-image
line above lol. I even tested to see if it was the issue before replying. But thanks anyway.
Yes you're right. Its definitely bugged behavior. I'm just not sure where its coming from. The core dump you posted doesnt include any helpful info. All the last calls leading up to the crash were optimized out by the compiler (they show as N/A). Might be a good idea to try running the greeter in-session with gdb to try and capture something useful.
Thanks for confirming this, it's good to know I haven't just been missing a semicolon for the last day. Might approach a webkit2gtk dev with this later and ask if it's worth submitting a bug report.
I'm using lightdm-webkit2-material2. As soon as you change the background image in css, the greeter freezes.
It doesn't output anything to the console, just freezes entirely.
/var/log/lightdm/xremote0-greeter.log: