Open vaidls opened 11 months ago
@vaidls Could you check which version of python_base_app the Taskbar is using. The easiest way to do this is to call pip freeze
of the virtual Python environment that the taskbar is running in. Please, paste the output into the ticket. Thanks a lot!
@vaidls I was able to reproduce the error on my system.
In all virtual Python environments: python-base-app==0.2.50
This issue is caused by the LittleBrother server process and not the taskbar. Frankly, I cannot see, why 0.4.31 does not work, but 0.4.33 does. I will publish the version in a few minutes.
@vaidls The new Debian image is available now at https://sourceforge.net/projects/little-brother/files/master/. Please, try and let me know if this fixes the issue for you. Thanks a lot!
I see no positive changes:
2023-12-10 19:06:53,574 - App - INFO - Starting app 'LittleBrotherTaskbar' 2023-12-10 19:06:53,574 - App - INFO - Using locale 'en' 2023-12-10 19:06:53,575 - App - INFO - Using username 'minecraft' 2023-12-10 19:06:53,586 - App - DEBUG - update_status 2023-12-10 19:06:53,586 - StatusConnector - DEBUG - Executing GET API call 'http://192.168.254.12:5580/status' 2023-12-10 19:06:53,662 - StatusConnector - ERROR - Cannot request user status using url 'http://192.168.254.12:5580/api' 2023-12-10 19:06:53,662 - App - INFO - Entering event queue... 2023-12-10 19:06:53,663 - App - DEBUG - Executing task app.updateStatus 0.000 [s] behind schedule... START 2023-12-10 19:06:53,663 - App - DEBUG - update_status 2023-12-10 19:06:53,663 - StatusConnector - DEBUG - Executing GET API call 'http://192.168.254.12:5580/status' 2023-12-10 19:06:53,732 - StatusConnector - ERROR - Cannot request user status using url 'http://192.168.254.12:5580/api' 2023-12-10 19:06:53,733 - App - DEBUG - Executing task app.updateStatus 0.000 [s] behind schedule... END 2023-12-10 19:06:53,733 - App - DEBUG - Sleeping for 14.929849 seconds (or until next signal) 2023-12-10 19:07:08,663 - App - DEBUG - Woken by signal 2023-12-10 19:07:08,663 - App - DEBUG - Executing task app.updateStatus 0.000 [s] behind schedule... START 2023-12-10 19:07:08,663 - App - DEBUG - update_status 2023-12-10 19:07:08,663 - StatusConnector - DEBUG - Executing GET API call 'http://192.168.254.12:5580/status' 2023-12-10 19:07:08,734 - StatusConnector - ERROR - Cannot request user status using url 'http://192.168.254.12:5580/api' 2023-12-10 19:07:08,734 - App - DEBUG - Executing task app.updateStatus 0.000 [s] behind schedule... END 2023-12-10 19:07:08,734 - App - DEBUG - Sleeping for 14.928622 seconds (or until next signal)
The URLs are strange in these two lines:
2023-12-10 19:06:53,663 - StatusConnector - DEBUG - Executing GET API call 'http://192.168.254.12:5580/status'
2023-12-10 19:06:53,732 - StatusConnector - ERROR - Cannot request user status using url 'http://192.168.254.12:5580/api'
When I run this on my system, the first URL contains /api/status
instead of just /status
which matches what I see in the code. The part api
is stored as a local variable and used in both messages but in your case it is apparently not used for the actual URL to get the status. It is not surprising that the call won't work since LittleBrother is listening at /api/status
. Could you check that URL with curl?
To debug further could you send me: the file status_connector.py
of the Taskbar installation and the file base_rest_api_access.py
of the python_base_app module used by the Taskbar? Thanks a lot!
@marcus67 hello! I think i have same issue. Is any solution to this issue?
Version of 'little-brother' is 0.4.33-140.
rinatkaa@vellur:~$ pip freeze | grep base python-base-app==0.2.50
base_url =/LittleBrother
When i run "run_little_brother_taskbar --server-url http://localhost:5555/LittleBrother --loglevel DEBUG", i see ERROR: "2024-02-23 22:31:39,581 - StatusConnector - DEBUG - Executing GET API call 'http://localhost:5555/LittleBrother/status' 2024-02-23 22:31:39,614 - StatusConnector - ERROR - Cannot request user status using url 'http://localhost:5555/LittleBrother/api'"
Screenshot of output curl http://localhost:5555/LittleBrother/status command:
Output for curl -v http://localhost:5555/LittleBrother/status/api
Output for curl -v http://localhost:5555/LittleBrother/api
@vaidls @rinatkaa Sorry, I also neglected this bug because of the tempting Angular branch. Anyway, I will try to reproduce this (again).
@vaidls @rinatkaa Hmm, something definitely changed probably due to an upgrade in python_base_app and I think the error message is misleading. When I use e.g. --server-url http:/localhost:5560
I will get:
2024-03-09 15:41:09,958 - StatusConnector - WARNING - Cannot request user status using url 'http://localhost:5560/api'
2024-03-09 15:41:14,960 - StatusConnector - ERROR - Artifact 'http://localhost:5560/status' not found
insinuating that "/api" is actually used. However, it only seems to be in the message and not in the call.
When I use --server-url http:/localhost:5560/api
it will work using the correct URL:
2024-03-09 15:49:50,469 - StatusConnector - DEBUG - Executing GET API call 'http://localhost:5560/api/status'
So, my advice is to test the relative URL /api
. I'll create a new issue in LittleBrother explaining the problem a little better.
Ok. I guees this is still an issue with the task bar being incompatible with the latest version of python_base_app
. So I open this one again.
@vaidls @rinatkaa I released little-brother-taskbar 0.1.23 on test.pypi.org last week. With the new version I did not have to tweak the URL anymore. If this works for you, I would release it. Thanks!
pip install -i https://test.pypi.org/simple/ little-brother-taskbar
@marcus67, i have checked, it works fine! Thank you in advance! :)
It works.
Maybe it will be useful:
Looks like LittleBrotherTaskbar.conf is outdated. Only language and font size options are working. https://github.com/marcus67/little_brother_taskbar/blob/master/etc/LittleBrotherTaskbar.conf
Some messages from taskbar start log (standard Debian 12.5 and Gnome): (run_little_brother_taskbar:17332): Gtk-CRITICAL **: 11:27:04.565: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed 2024-03-17 11:27:04,595 - App - INFO - Switching to locale 'en' 2024-03-17 11:27:04,596 - App - INFO - Entering event queue... 2024-03-17 11:27:04,598 - App - INFO - Starting WX Python main loop...
(run_little_brother_taskbar:17332): Gtk-CRITICAL **: 11:27:04.633: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
(run_little_brother_taskbar:17332): Gtk-CRITICAL **: 11:27:04.654: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
(run_little_brother_taskbar:17332): Gtk-CRITICAL **: 11:27:04.690: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
Bests
Mr. Vaidotas DILYS
2024-03-16, št, 12:24 marcus67 @.***> rašė:
@vaidls https://github.com/vaidls @rinatkaa https://github.com/rinatkaa I released little-brother-taskbar 0.1.23 on test.pypi.org last week. With the new version I did not have to tweak the URL anymore. If this works for you, I would release it. Thanks!
pip install -i https://test.pypi.org/simple/ little-brother-taskbar
— Reply to this email directly, view it on GitHub https://github.com/marcus67/little_brother_taskbar/issues/42#issuecomment-2001955344, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVS65Z4HYOQC52W7ZM2KHADYYQTW7AVCNFSM6AAAAABAOQHMQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBRHE2TKMZUGQ . You are receiving this because you were mentioned.Message ID: @.***>
Looks like, after latests server side app update, Taskbar does not able to login into status page.
............ 2023-12-10 12:24:34,126 - StatusConnector - ERROR - Cannot request user status using url 'http://192.168.254.12:5580/api' ................ Server side : Version0.4.31 Debian revision 138 Git Commit ID 740397cd4bcbf767 Git branch master
LBT-debug-api-login.txt
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!! $ sudo cat /home/minecraft/.config/autostart/LittleBrother.desktop [Desktop Entry] Type=Application Name=LittleBrother Exec=/usr/local/bin/run_little_brother_taskbar --logdir=.config/autostart/ --loglevel=DEBUG
--server-url=http://192.168.254.12:5580
Comment=LittleBrother Parental Control X-GNOME-Autostart-enabled=true $ !!!!!!!!!!!!!!!!!!!!! :~$ sudo cat /home/minecraft/.config/LittleBrotherTaskbar.conf [LittleBrotherTaskbar] check_interval = 15 status_message_font_size = 24 error_message_font_size = 10 window_width = 320 window_height = 160 show_window_upon_start = true show_window_when_approaching_logout = true enable_spoken_notifications = truecolor_normal_mode = lightgreen
color_warning_message = yellow color_error_message = red color_approaching_logout = red color_normal_mode_foreground = black color_warning_message_foreground = black color_error_message_foreground = black warning_minutes_approaching_logout = 3 ### locale = DE #### does not work at all, ni de, ni en.