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

Gtk error when starting a wifi via GUI #359

Open
KronosTheLate opened this issue Nov 8, 2023 · 6 comments
Open

Gtk error when starting a wifi via GUI #359

KronosTheLate opened this issue Nov 8, 2023 · 6 comments

Comments

@KronosTheLate
Copy link

KronosTheLate commented Nov 8, 2023

I open the GUI as follows:

~ $sudo wihotspot

I then enter the following settings, and click "Create hotspot".
image

This produces the following error:

(wihotspot-gui:6110): GLib-GObject-WARNING **: 16:54:53.307: invalid cast from 'GtkEntry' to 'GtkTextView'

(wihotspot-gui:6110): Gtk-CRITICAL **: 16:54:53.307: gtk_text_view_get_buffer: assertion 'GTK_IS_TEXT_VIEW (text_view)' failed

(wihotspot-gui:6110): GLib-GObject-WARNING **: 16:54:53.308: invalid (NULL) pointer instance

(wihotspot-gui:6110): GLib-GObject-CRITICAL **: 16:54:53.308: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
sh: 1: pkexec: not found
Command not found or exited with error status
pkexec --user root create_ap wlp0s20f3 wlp0s20f3 'username' 'password' --mkconfig /etc/create_ap.conf --freq-band 2.4 
sh: 1: pkexec: not found
Command not found or exited with error status
sh: 1: pkexec: not found
Command not found or exited with error status
sh: 1: pkexec: not found
Command not found or exited with error status

(wihotspot-gui:6110): Gtk-WARNING **: 16:55:03.357: gtk_widget_size_allocate(): attempt to allocate widget with width 849 and height -4

However, I can copy the command being run without getting errors:

~ $sudo create_ap wlp0s20f3 wlp0s20f3 'username' 'password'
Config dir: /tmp/create_ap.wlp0s20f3.conf.yBu3BVnf
PID: 6177
Network Manager found, set ap0 as unmanaged device... DONE
wlp0s20f3 is already associated with channel 6 (2437 GHz)
multiple channels supported
Creating a virtual WiFi interface... ap0 created.
Sharing Internet using method: nat
hostapd command-line interface: hostapd_cli -p /tmp/create_ap.wlp0s20f3.conf.yBu3BVnf/hostapd_ctrl
ap0: interface state UNINITIALIZED->ENABLED
ap0: AP-ENABLED 

So am I successfully creating the hotspot in the latter case? And why do I get the error on the GUI?

@KronosTheLate
Copy link
Author

Update: I was able to connect with my phone, and go to websites, so the CLI-version seems to work fine.

@KronosTheLate
Copy link
Author

Additional context:
I installed this program a few days ago on Linux Mint Cinnamon without issues. The issue above occured today, on a very fresh Debian 12.2 install.

@KronosTheLate
Copy link
Author

I was able to solve the problem! I googled the error pkexec: not found, and came across this stackexchange post about sudo being broken. One of the comments said to run the following:

sudo apt install policykit-1

This does not remove the errors about GTK, but it does fix the subsequent errors, which importantly is what caused the hotspot not to be created.

I am not sure if this issue should be closed, seeing as the GTK errors remain. Also, the error-codes to be more friendly. Perhaps we could look for pkgexec, and print the fix if it is not found?

@Otzie2023
Copy link

I have the same problem, I tried sudo apt install policykit-1 but its installed and Wifi Hotspot GUI doesn't work.

@lakinduakash
Copy link
Owner

I have the same problem, I tried sudo apt install policykit-1 but its installed and Wifi Hotspot GUI doesn't work.

What do you get? can you try to execute via shell and put the output? ~ $sudo wihotspot

@mcyzyk
Copy link

mcyzyk commented Feb 9, 2024

Same issue here. Ubuntu 22.04.3 LTS. policykit-1 installed:

(wihotspot-gui:13742): GLib-GObject-WARNING **: 09:03:58.283: invalid cast from 'GtkEntry' to 'GtkTextView'

(wihotspot-gui:13742): Gtk-CRITICAL **: 09:03:58.283: gtk_text_view_get_buffer: assertion 'GTK_IS_TEXT_VIEW (text_view)' failed

(wihotspot-gui:13742): GLib-GObject-WARNING **: 09:03:58.285: invalid (NULL) pointer instance

(wihotspot-gui:13742): GLib-GObject-CRITICAL **: 09:03:58.285: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
Segmentation fault (core dumped)

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

No branches or pull requests

4 participants