Bug 447295 - QR code menu item doesn't show up sometimes
Summary: QR code menu item doesn't show up sometimes
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Networking in general (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-20 16:42 UTC by Dashon
Modified: 2024-12-23 18:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dashon 2021-12-20 16:42:44 UTC
SUMMARY
To say that it doesn't show up in wayland isn't exactly the most accurate. The option showed up once for me in X11, but disappeared when I changed the dns settings. Even after setting the dns back to automatic. The option did not reappear. Even deleting the network and readding it doesn't always make the show qr code option reappear on X11, but I have observed that adding the network under wayland never has the show qr code option.


STEPS TO REPRODUCE
1. Login to a wayland session
2. Setup wifi network for the first time.
3. Go to plasma network manager applet and right click on the newly configured network.

OBSERVED RESULT
The show qr code option does not appear.

EXPECTED RESULT
The show qr code option should be there. Also it shouldn't disappear after changing the dns settings.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Dashon 2021-12-20 16:43:54 UTC
Forgot to change the O.S. information section:

Operating System: EndeavourOS
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2
Kernel Version: 5.15.10-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i7-7500U CPU @ 2.70GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 620
Comment 2 Nate Graham 2022-01-11 21:55:15 UTC
Works for me. In order to appear, you need to have the "prison" library installed. Do you?
Comment 3 Dashon 2022-01-11 21:58:35 UTC
(In reply to Nate Graham from comment #2)
> Works for me. In order to appear, you need to have the "prison" library
> installed. Do you?

Yes I have that library installed. I'm pretty sure it the qrcode option disappeared when I changed the dns settings to cloudfares, but it didn't come back when I changed it back.
Comment 4 Nate Graham 2022-01-11 22:04:42 UTC
There is some relevant-looking code:

            if (Uuid && Type === PlasmaNM.Enums.Wireless && passwordIsStatic) {
                if (!showQRComponent) {
                    showQRComponent = Qt.createComponent("ShowQR.qml", this);
                    if (showQRComponent.status === Component.Error) {
                        console.warn("Cannot create QR code component:", showQRComponent.errorString());
                    }
                }

                showQRMenuItem.visible = (showQRComponent.status === Component.Ready);
            }


Looks like it only appears for wireless connections that have a static password, which means WEP for WPS-PSK to this applet. And then on top of that, it has to be able to intiantiate itself, which requires having the prison library installed.
Comment 5 Dashon 2022-01-11 22:12:29 UTC
(In reply to Nate Graham from comment #4)
> There is some relevant-looking code:
> 
>             if (Uuid && Type === PlasmaNM.Enums.Wireless &&
> passwordIsStatic) {
>                 if (!showQRComponent) {
>                     showQRComponent = Qt.createComponent("ShowQR.qml", this);
>                     if (showQRComponent.status === Component.Error) {
>                         console.warn("Cannot create QR code component:",
> showQRComponent.errorString());
>                     }
>                 }
> 
>                 showQRMenuItem.visible = (showQRComponent.status ===
> Component.Ready);
>             }
> 
> 
> Looks like it only appears for wireless connections that have a static
> password, which means WEP for WPS-PSK to this applet. And then on top of
> that, it has to be able to intiantiate itself, which requires having the
> prison library installed.

Is there a way for me to see if I am triggering that "console.warn()" line. The password hasn't changed. I have a kdeneon unstable vm that I can try to reproduce the issue in.
Comment 6 Nate Graham 2022-01-11 22:15:03 UTC
If you run Plasma in a terminal window (with `plasmashell --replace`) it should log to the window, yeah. You could even find the file on disk and put in some new console.warn() statements yourself to try to narrow it down.
Comment 7 Dashon 2022-01-11 22:28:17 UTC
Can't reproduce in the vm because it registers as a wired connection there. I didn't see the console.warn message when running through a terminal. I'm not sure if using latte-dock interferes with that though since the applet would be apart of latte. I decided to run latte-dock in the terminal too, but clicking on the applet and interacting with it did not make any warnings show up. I deleted the connection and added it again to no avail. If I can locate the file in question, maybe I could find out more about what is happening.
Comment 8 Dashon 2024-06-28 03:49:45 UTC
This has been fixed for some time now.
Comment 9 Ben Cooksley 2024-12-23 18:23:37 UTC
Bulk transfer as requested in T17796