Litarvan / lightdm-webkit-theme-litarvan

Litarvan's LightDM HTML Theme
BSD 3-Clause "New" or "Revised" License
707 stars 73 forks source link

It simply doesn't log in. #186

Open Limones-07 opened 1 year ago

Limones-07 commented 1 year ago

I power on my computer, LightDM loads up, I type in my password and it simply does nothing, besides not letting me interact with the text box anymore. I had to switch to another tty and change lightdm.conf to use lightdm-gtk-greeter to log in. Does anyone have an idea of what is happening?

My /var/log/lightdm/lightdm.log.old: http://0x0.st/oWzr.txt

My /var/log/lightdm/seat0-greeter.log.old: http://0x0.st/oWzz.txt

My /var/log/lightdm/x-0.log.old: http://0x0.st/oWzi.txt

xorph commented 1 year ago

It looks like the upgrade of webkit2gtk (2.36.7-1 -> 2.38.0-2) broke it on my side. I did a downgrade and was able to login again.

ollosh commented 1 year ago

Yeah experiencing the same issue and was thinking that webkit2gtk update broke it as well :)

RononDex commented 1 year ago

Can confirm, I have the same issue, logfile (seat0-greeter.log) says:

CONSOLE JS ERROR Unhandled Promise Rejection: NavigationDuplicated: Navigating to current location ("/base/login") is not allowed
CONSOLE JS ERROR Unhandled Promise Rejection: NavigationDuplicated: Navigating to current location ("/base/splash") is not allowed

The login screen appears, but when I enter my password and hit enter, nothing happens

LucStr commented 1 year ago

Same for me, the webkit2gtk broke it :/

Limones-07 commented 1 year ago

I'm happy I'm not the only one w/ problems lol

It looks like the upgrade of webkit2gtk (2.36.7-1 -> 2.38.0-2) broke it on my side. I did a downgrade and was able to login again.

Can you tell me how to downgrade it?

mwglen commented 1 year ago

Downgrade worked for me.

I'm happy I'm not the only one w/ problems lol

It looks like the upgrade of webkit2gtk (2.36.7-1 -> 2.38.0-2) broke it on my side. I did a downgrade and was able to login again.

Can you tell me how to downgrade it?

# pacman -U file:///var/cache/pacman/pkg/webkit2gtk-2.36.7-1-x86_64.pkg.tar.zst Change the text after "file" to match an old version in your cache if you need to.

PickMeNow commented 1 year ago

Experiencing the same issue, rolled back to default greeter, didn't realized webkit2gtk had been updated. Using official lightdm-webkit-theme-litarvan from archlinux version 3.1.0-1. I wanted to create a bug report on archlinux, but since the package was flagged out of date, not sure if I should.

Does version v3.2.0 fix the problem?

Bundy01 commented 1 year ago

Same problem here. Downgrading webkit2gtk packages solves the problem on Arch.

PickMeNow commented 1 year ago

A bug report was open on arch > https://bugs.archlinux.org/task/75988

racagogi commented 1 year ago

I also experienced same issue, it may all lightdm-webkit2-greeter themes problem. one sloution is use web-greeter or nody-greeter instead lightdm-webkit2-greeter first, install litarvan-theme 3.2.0 and web-greeter, then,

sudo mkdir /usr/share/web-greeter/themes/litarvan
sudo cp -r lightdm-webkit-theme-litarvan-3.2.0.tar.gz /usr/share/web-greeter/themes/litarvan 
cd /usr/share/web-greeter/themes/litarvan 
sudo tar -xvf  lightdm-webkit-theme-litarvan-3.2.0.tar.gz

edit /etc/lightdm/lightdm.conf and setgreeter-session=web-greeter edit /etc/lightdm/web-greeter.yml and set theme: litarvan

ollosh commented 1 year ago

I also experienced same issue, it may all lightdm-webkit2-greeter themes problem. one sloution is use web-greeter or nody-greeter instead lightdm-webkit2-greeter first, install litarvan-theme 3.2.0 and web-greeter, then,

sudo mkdir /usr/share/web-greeter/themes/litarvan
sudo cp -r lightdm-webkit-theme-litarvan-3.2.0.tar.gz /usr/share/web-greeter/themes/litarvan 
cd /usr/share/web-greeter/themes/litarvan 
sudo tar -xvf  lightdm-webkit-theme-litarvan-3.2.0.tar.gz

edit /etc/lightdm/lightdm.conf and setgreeter-session=web-greeter edit /etc/lightdm/web-greeter.yml and set theme: litarvan

Exactly what I did actually! https://github.com/antergos/web-greeter is dead anyways so better use something more up to date

JezerM commented 1 year ago

TLDR: Seems there is no way to fix this.

I tried to look into this error in Arch with WebkitGTK 2.38, and it seems like WebkitGTK 2.38 runs webkit extensions in a sandboxed environment or similar, so all connection tries to the LightDM daemon fails inevitably. Therefore, there is no way to fix this error unless WebKitGTK decreases security regarding webkit extensions (maybe there is an option for this) or lightdm-webkit2-greeter is rewritten to connect to LightDM from the main program instead of connecting from the extension (which is unlikely).

How I tested it

I added the following lines to lightdm-webkit2-greeter source code at src/greeter.c and src/webkit2-extension.c for testing this error:

GError *err_conn = NULL;
gboolean connected = lightdm_greeter_connect_to_daemon_sync(greeter, &err_conn);
fprintf(stderr, "Connected: %d\n", connected);
if (err_conn != NULL) {
    fprintf(stderr, "Error: %s\n", err_conn->message);
    g_error_free(err_conn);
} else {
    fprintf(stderr, "There is no error message\n");
}

So, this would check if the connection to the LightDM daemon success. Here's the result in /var/log/lightdm/seat0-greeter.log:

Trying to connect to daemon from greeter.c (main program)
Connected: 1
There is no error message

Trying to connect to daemon from webkit2-extension.c (extension)

(WebKitWebProcess:9872): GLib-WARNING **: 20:34:52.728: ../glib/glib/giounix.c:412Error while getting flags for FD: Bad file descriptor (9)

(WebKitWebProcess:9872): GLib-WARNING **: 20:34:52.732: Invalid file descriptor.
Connected: 0
Error: Failed to write to daemon: Bad file descriptor

As you can see, when trying to connect from the main program (greeter.c) it succeedes without an error message, however it does fail when connecting from the extension (webkit2-extension.c) with some Glib-warnings. Maybe, this is due to sandboxing.

Alternatives

I did the same test with my own program sea-greeter, which is made with WebkitGTK and it does work flawlessly. My fork of web-greeter and nody-greeter do work as well.

Limones-07 commented 1 year ago

That's unfortunate. I'm going to take a look at sea-greeter then. Thank you all for everything!

I'm going to keep it open because it isn't fixed, when it gets fixed, I'll close it.

electron271 commented 1 year ago

https://bugs.archlinux.org/index.php?do=details&action=details.addvote&task_id=75988 This seems interesting, I fixed this issue by downgrading

RononDex commented 1 year ago

@JezerM I tried your web-greeter fork, however the litarvan theme seems to be throwing a lot of errors for me with that greeter (some js functions appear to be missing)

How did you get it to work with your web-greeter?

falco-pub commented 1 year ago

@JezerM I tried your web-greeter fork, however the litarvan theme seems to be throwing a lot of errors for me with that greeter (some js functions appear to be missing)

How did you get it to work with your web-greeter?

works good for me. Installed it with yay from AUR. And followed https://github.com/Litarvan/lightdm-webkit-theme-litarvan/issues/186#issuecomment-1256959065 advice: edit /etc/lightdm/lightdm.conf and set greeter-session=web-greeter edit /etc/lightdm/web-greeter.yml and set theme: litarvan

RononDex commented 1 year ago

@JezerM I tried your web-greeter fork, however the litarvan theme seems to be throwing a lot of errors for me with that greeter (some js functions appear to be missing) How did you get it to work with your web-greeter?

works good for me. Installed it with yay from AUR. And followed #186 (comment) advice: edit /etc/lightdm/lightdm.conf and set greeter-session=web-greeter edit /etc/lightdm/web-greeter.yml and set theme: litarvan

I am getting these errors:

2022-09-29 11:36:57 [ ERROR ] acpi - acpi.py:20 : __init__ | ACPI: acpi_listen does not exists
2022-09-29 11:36:57 [ DEBUG ] Greeter - Greeter.py:116 : __init__ | LightDM API connected
2022-09-29 11:36:57 [ WARNING ] config - config.py:180 : load_theme_config | Theme config was not loaded:
    index.yml file not found
2022-09-29 11:36:57 [ DEBUG ] config - config.py:181 : load_theme_config | Using default theme config
2022-09-29 11:36:57 [ DEBUG ] browser - browser.py:189 : create_windows | Browser Window created
2022-09-29 11:36:57 [ DEBUG ] screensaver - screensaver.py:57 : set_screensaver | Screensaver timeout set
2022-09-29 11:36:57 [ DEBUG ] browser - browser.py:252 : init | Initializing Browser Window
2022-09-29 11:36:57 [ DEBUG ] browser - browser.py:272 : load_theme | Theme loaded
2022-09-29 11:36:57 [ DEBUG ] browser - browser.py:234 : show | Web Greeter started win: 7657
2022-09-29 11:36:57 [ DEBUG ] browser - browser.py:234 : show | Web Greeter started win: 15939
2022-09-29 11:36:57 [ DEBUG ] browser - browser.py:234 : show | Web Greeter started win: 5642
2022-09-29 11:36:57 [ DEBUG ] browser - browser.py:238 : run | Web Greeter started
2022-09-29 11:36:57 [ ERROR ] web-greeter://app//usr/share/web-greeter/themes/litarvan/js/chunk-vendors.cc4c1bca.js 7: TypeError: lightdm.language.toLowerCase is not a function
2022-09-29 11:37:13 [ ERROR ] web-greeter://app//usr/share/web-greeter/themes/litarvan/js/chunk-vendors.cc4c1bca.js 7: TypeError: lightdm.language.toLowerCase is not a function
2022-09-29 11:37:14 [ ERROR ] web-greeter://app//usr/share/web-greeter/themes/litarvan/js/chunk-vendors.cc4c1bca.js 7: TypeError: lightdm.language.toLowerCase is not a function
xorph commented 1 year ago

Getting the same "lightdm.language.toLowerCase is not a function" error when using the web-greeter with the latest lightdm-webkit-theme-litarvan release 3.2.0 from Github. community version is still 3.1.0.

ZaynChen commented 1 year ago

@JezerM I tried your web-greeter fork, however the litarvan theme seems to be throwing a lot of errors for me with that greeter (some js functions appear to be missing) How did you get it to work with your web-greeter?

works good for me. Installed it with yay from AUR. And followed #186 (comment) advice: edit /etc/lightdm/lightdm.conf and set greeter-session=web-greeter edit /etc/lightdm/web-greeter.yml and set theme: litarvan

I am getting these errors:

2022-09-29 11:36:57 [ ERROR ] acpi - acpi.py:20 : __init__ | ACPI: acpi_listen does not exists
2022-09-29 11:36:57 [ DEBUG ] Greeter - Greeter.py:116 : __init__ | LightDM API connected
2022-09-29 11:36:57 [ WARNING ] config - config.py:180 : load_theme_config | Theme config was not loaded:
  index.yml file not found
2022-09-29 11:36:57 [ DEBUG ] config - config.py:181 : load_theme_config | Using default theme config
2022-09-29 11:36:57 [ DEBUG ] browser - browser.py:189 : create_windows | Browser Window created
2022-09-29 11:36:57 [ DEBUG ] screensaver - screensaver.py:57 : set_screensaver | Screensaver timeout set
2022-09-29 11:36:57 [ DEBUG ] browser - browser.py:252 : init | Initializing Browser Window
2022-09-29 11:36:57 [ DEBUG ] browser - browser.py:272 : load_theme | Theme loaded
2022-09-29 11:36:57 [ DEBUG ] browser - browser.py:234 : show | Web Greeter started win: 7657
2022-09-29 11:36:57 [ DEBUG ] browser - browser.py:234 : show | Web Greeter started win: 15939
2022-09-29 11:36:57 [ DEBUG ] browser - browser.py:234 : show | Web Greeter started win: 5642
2022-09-29 11:36:57 [ DEBUG ] browser - browser.py:238 : run | Web Greeter started
2022-09-29 11:36:57 [ ERROR ] web-greeter://app//usr/share/web-greeter/themes/litarvan/js/chunk-vendors.cc4c1bca.js 7: TypeError: lightdm.language.toLowerCase is not a function
2022-09-29 11:37:13 [ ERROR ] web-greeter://app//usr/share/web-greeter/themes/litarvan/js/chunk-vendors.cc4c1bca.js 7: TypeError: lightdm.language.toLowerCase is not a function
2022-09-29 11:37:14 [ ERROR ] web-greeter://app//usr/share/web-greeter/themes/litarvan/js/chunk-vendors.cc4c1bca.js 7: TypeError: lightdm.language.toLowerCase is not a function

Try using the Building version of Litarvan, not the latest release 3.2.0(20 Apr 2021).(https://github.com/Litarvan/lightdm-webkit-theme-litarvan/issues/176#issuecomment-1194937713)

RononDex commented 1 year ago

Just tested with the version from the master branch. It does not show any errors and boots up correctly, however. I am stuck on the splash screen now (where it says "Press Space or Return"). It seems none of my keypresses are registered.

I use this shell function to install the theme: https://github.com/RononDex/dotfiles/blob/e813776f0961d2aa578dda9f218ef0445fdfc8a7/functions/packageFunctions.sh#L41

ZaynChen commented 1 year ago

Just tested with the version from the master branch. It does not show any errors and boots up correctly, however. I am stuck on the splash screen now (where it says "Press Space or Return"). It seems none of my keypresses are registered.

I use this shell function to install the theme: https://github.com/RononDex/dotfiles/blob/e813776f0961d2aa578dda9f218ef0445fdfc8a7/functions/packageFunctions.sh#L41

./build.sh Will generate a lightdm-webkit-theme-litarvan-3.2.0.tar.gz in the current folder. So you should cp it to /usr/share/web-greeter/themes/litarvan and decompress it to that folder, not cp dist folder

RononDex commented 1 year ago

Thanks it worked now, only the dpi settings seem to be different compared to the older webkit2 greeter

JezerM commented 1 year ago

Try the master version. Litarvan's 3.2.0 version still uses some deprecated lightdm-webkit2-greeter and wasn't updated to web-greeter/nody-greeter/sea-greeter, which is fixed in the master branch.

RononDex commented 1 year ago

yeah I am using the master branch

mcatanzaro commented 1 year ago

I tried to look into this error in Arch with WebkitGTK 2.38, and it seems like WebkitGTK 2.38 runs webkit extensions in a sandboxed environment or similar, so all connection tries to the LightDM daemon fails inevitably. Therefore, there is no way to fix this error unless WebKitGTK decreases security regarding webkit extensions (maybe there is an option for this) or lightdm-webkit2-greeter is rewritten to connect to LightDM from the main program instead of connecting from the extension (which is unlikely).

Doubt it. There is no sandboxed environment unless you enable it manually using webkit_web_context_set_sandbox_enabled(). Verify by using the WEBKIT_FORCE_SANDBOX=0 environment variable to force disable the sandbox and see if that fixes the issue: it really shouldn't, because lightdm-webkit2-greeter does not use webkit_web_context_set_sandbox_enabled(). If it does fix your issue, then the sandbox is being improperly enabled, which seems pretty unlikely, but I suppose I've seen stranger bugs. More likely, you'll want to debug a bit more inside lightdm_greeter_connect_to_daemon_sync() to see more specifically where something first goes wrong.

By the way, the only relevant change I can think of between 2.36 -> 2.38 is that leaked file descriptors no longer inherit into the child processes (at least for now, might get reverted). So if the parent process opens a file descriptor, forgets to set CLOEXEC, and accidentally relies on it in the child process, then that would have previously worked, but not anymore. That scenario seems extremely unlikely, though.

JezerM commented 1 year ago

Oh, yeah, lightdm-webkit2-greeter doesn't enable a web-context sandbox, so my hypothesis is incorrect. I don't think lightdm_greeter_connect_to_daemon_sync has anything to do as the warnings seems related to the web extension process, but I'll look for it.

mcatanzaro commented 1 year ago

Can you check if https://github.com/WebKit/WebKit/pull/4868 fixes the problem for you? It really shouldn't, as that would indicate a very weird lightdm or lightdm-webkit-greeter bug... but it's worth checking.

tanish1729 commented 1 year ago

Hey everyone, after running a sudo pacman -Syu yesterday I'm also facing this issue with my greeter. Since I'm basically "locked out" of my laptop rn, how should I change stuff to fix it?

matzyy commented 1 year ago

@tanish1729 you can fall back to tty with Ctrl+Alt+F2, and then sudo pacman -U /var/cache/pacman/pkg/webkit2gtk-2.36.6-1-x86_64.pkg.tar.zst (or whatever version is still in your cache).

tanish1729 commented 1 year ago

@tanish1729 you can fall back to tty with Ctrl+Alt+F2, and then sudo pacman -U /var/cache/pacman/pkg/webkit2gtk-2.36.6-1-x86_64.pkg.tar.zst (or whatever version is still in your cache).

Yep perfect. I just didn't know about the Ctrl+Alt+F2 thing. Thanks a lot :))

MixusMinimax commented 1 year ago

Same here, I don't want to manually change webkit2gtk versions, so I guess I'll look for a different theme. Shame, I really liked this one, and I'll definitely give it a chance again if it gets updated.

Also, sometimes changing tty doesn't work especially if you have your lightdm service set to restart on crash, and mess up your config, as it will always grab focus to tty7... So always have a live installation of linux on hand.

Edit: other themes also don't work, so I guess it's an issue with the greeter itself

RononDex commented 1 year ago

Btw, I found out what caused the difference in DPI from the old webkit greeter: In lightdm.conf I used X -dpi XXas launch command. Turns out the old webgreeter ignored this setting, the new web-greeter fomr @JezerM does not and therefor increased the dpi on the login screen (it used the configured dpi from the xserver-commandsetting).

The setting in lightdm.conf loooks like this:

xserver-command = X -dpi 120
mcatanzaro commented 1 year ago

Moved to https://bugs.webkit.org/show_bug.cgi?id=246206

MR-Diamond commented 1 year ago

As reported above by mcatanzaro, I opened a ticket here: https://bugs.webkit.org/show_bug.cgi?id=246206

But I am unable to get a gdb backtrace; if someone could, please report a gdb backtrace.

cortex3 commented 1 year ago

For anyone waiting on this. It seems like the issue is fixed with the new version of lightdm-webkit2-greeter. At least it's working for me again.

MithicSpirit commented 1 year ago

Likewise. I believe this can be closed now (and, regardless, the issue was never with the theme to begin with).

mcatanzaro commented 1 year ago

For anyone waiting on this. It seems like the issue is fixed with the new version of lightdm-webkit2-greeter. At least it's working for me again.

No, rather the process launching change was simply reverted in WebKit. It may break again in the future if lightdm-webkit2-greeter does not reconsider its IPC strategy. See https://github.com/WebKit/WebKit/pull/4868 for more details.

MithicSpirit commented 1 year ago

I'd say to report the issue to lightdm-webkit2-greeter instead, but seems like the repository has been archived. I guess that, unless someone is willing to fork it and fix this issue, its days may be numbered.

JezerM commented 1 year ago

For anyone waiting on this. It seems like the issue is fixed with the new version of lightdm-webkit2-greeter. At least it's working for me again.

lightdm-webkit2-greeter hasn't been updated in years, so no, this hasn't been fixed; perhaps WebKit reverted a breaking change for webkit2-greeter. But as mcatanzaro says, it may break again in the future.

I guess that, unless someone is willing to fork it and fix this issue, its days may be numbered.

Yeah, I already did that xd