Closed Lau1406 closed 4 years ago
Are you able to fetch and apply the colors using the Settings page?
Did you get the errors when you ran ./daemon/pywalfox.py with no arguments?
When I click on 'Fetch pywal colors' in the plug-in nothing seems to happen. There are a couple of colors, but those seem to be default (black, white and red), definitely not the colors from pywal.
When I run pywalfox.py without any arguments this is the output:
Created UNIX socket Bound UNIX socket to /tmp/pywalfox_uds_socket
And then I get a blinking cursor and no termination
The script runs in an infinite loop, so the output that you got indicates that everything is working. Have you restarted Firefox after running setup.sh
?
I hadn't at first, but now I have and nothing has changed. Is there a possibility that other plug-ins interfere somehow?
There should not be any interference, since all it does is set/override the theme.
Could you take a screenshot of the browser console right after starting Firefox? You could also take a look in the console of the Settings page as well to see if there are any errors.
This is from the settings page of the plug-in. In other tabs there is no output
Could you take a screenshot of the Browser console on startup as well (Tools > Web developer > Browser console
)?
I didn't know this existed, nice to know =]
This error appears there when I try to fetch the pywal colors in the plug-in
So it seems like the script is crashing when fetching the colors. How does the Browser console look like after you tried fetching the colors?
No new messages appear after the ExtensionError: Native application tried to send a message of 1634038339 bytes, which exceeds the limit of 1048576 bytes.
error message. No matter what buttons I click on the plug-in page. I could try and reinstall Firefox, maybe that there is a problem there
Try fetching the colors again and take a look in the Debugging output at the bottom of the Settings page.
Also, when you run python
in you terminal, does it use version 2.7
or 3
? I personally use 3
, so it could be some version specific issue that only occurs when the addon tries fetching colors.
I have reinstalled Firefox, including wiping of all user data before reinstalling.
Good news is that the original error no longer shows in the debugging output.
The bad news is that I now get the Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist.
error.
I've seen that this is also in the README.md, but the path to the script is definitely correct (I can cat that exact path and the contents of the python file are displayed) and when I run the file manually (both with Python2 and Python3) it works and gets to the infinite loop
The default python is unfortunately python2
Very strange. I assume you tried fetching the colors with no success?
Also, what does env python
return if you run it in your terminal?
Yes, try that. Honestly, setting up the native messaging can be a pain since the errors are quite diffuse. A lot of people have issues with it. Sorry for the inconvenience.
No need to apologize, I'm already happy that someone decided to make this. And besides, I have to stay at home anyway because of covid-19. Anyway, I tried it and unfortunately after a firefox restart the original error is back again. I'll read myself a bit into that and see if I can figure something out
I believe that the issue is related to python 2.7.x and I will try to reproduce the issue myself and hopefully have a fix later tonight or tomorrow.
same error ^^
I am working on a fix. Seems like there is some issue with encoding the data when using Python 2.7 (despite using the exact same code from the Mozilla docs).
Quick and dirty workaround if you have python3 on your machine: Change the shebang (first line of script Pywalfox/daemon/pywalfox.py) from
to
Oh almost forgot, thanks Frewacom for your great work and thanks for posting it on unixporn.
I believe I have fixed this issue. Apparently, the issue was a print()
used for debugging when setting up the UNIX-socket server.
4 hours well spent..
Can confirm this fixes the issue. Thank you very much for fixing the bug
Hey buddy,
Just pulled your current code which breaks it on my system. Again on changing the shebang to python3 fixes the issue.
Best regards
EDIT: But great work. I'm looking forward to more. :) (Github theme, Reddit theme, simple Theme Engine?)
God damn it. I tried running it with python2.7 and it all seemed to work fine.
I seem unable to reproduce your issue. Do you get the error on startup?
Gimme a sec and I will try to reproduce. Any more info you need?
Not really. I just need to figure out when the error occurs.
Odd, I changed back and now it runs like a charm. Changed nothing else. Sorry for the false alarm.
No problem. I am just glad I don't have to debug another issue like this.
Overview
I'm getting this error in the debug output of the Firefox plug-in itself and a couple of related errors, but I think they are caused by the original error, but I'll include them anyway. I have gone through the troubleshooting section in the README.md and everything there seems to be correct on my system.
Errors
Disconnected from native app: Error: Native application tried to send a message of 1634038339 bytes, which exceeds the limit of 1048576 bytes.
Error: Attempt to postMessage on disconnected port
Traceback (most recent call last): File "./pywalfox.py", line 21, in <module> client = uds.UDSClient() File "/mnt/data/Downloads/Pywalfox/daemon/uds.py", line 43, in __init__ self.s.connect(HOST) File "/usr/lib/python2.7/socket.py", line 228, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 111] Connection refused
Traceback (most recent call last): File "pywalfox.py", line 21, in <module> client = uds.UDSClient() File "/mnt/data/Downloads/Pywalfox/daemon/uds.py", line 43, in __init__ self.s.connect(HOST) ConnectionRefusedError: [Errno 111] Connection refused
Specs
Firefox 74 OS: Pop!_OS 19.10 python --version: 2.7.17 python3 --version: 3.7.5