oskarsh / Yin-Yang

Auto Nightmode for KDE, Gnome, Budgie, VSCode, Atom and more
MIT License
585 stars 51 forks source link

Firefox extension is not working as expected #296

Open sadorowo opened 2 months ago

sadorowo commented 2 months ago

What happened?

Every time when Yin&Yang extension is trying to load app settings, an error happens. obraz

Error is triggered by these lines of code: obraz

The theme is finally not changing. I'm using latest Arch with updates applied, and Firefox installed using pacman.

Version

3.3

How did you install Yin & Yang?

AUR

What desktop environments are you seeing the problem on?

KDE

Which plugin causes the issue?

Firefox

What software version do you use?

Firefox 125.0.2, 64bit

Relevant log output

I don't have any logs
l0drex commented 2 months ago

Have you installed Firefox natively or as a Flatpak?

sadorowo commented 2 months ago

I think I installed it natively, I just used sudo pacman -S firefox

l0drex commented 2 months ago

Do you have this json file under /usr/lib/mozilla/native-messaging-hosts/?

sadorowo commented 2 months ago

yeah, but I noticed I have the communicate.py file mentioned in path in other location. In /opt/yin-yang/ I have 3 directories: designer, resources and yin_yang. I have communicate.py file it in /opt/yin-yang/yin_yang/communicate.py

sadorowo commented 2 months ago

I tried to reinstall Yin&Yang using

yay -R yin-yang

/opt/yin-yang got removed, then

yay -S yin-yang

but the issue still hasn't been solved.

For some reason I have the communicate.py in other location than it should be - I think this is causing an issue, especially because I'm getting "Error while loading application translations" on startup, so it may be related to incorrect path.

WinnerWind commented 2 months ago

Have you managed to fix it? On my end the YinYang extension has no effect on the current theme.

sadorowo commented 2 months ago

no, I'm waiting for response from maintainer :/

sadorowo commented 1 week ago

@l0drex any updates? I notices 2 things:

  1. When I'm running communicate.py manually I'm getting this error:

    ❯ python3 /opt/yin-yang/yin_yang/communicate.py
    Traceback (most recent call last):
    File "/opt/yin-yang/yin_yang/communicate.py", line 15, in <module>
    from .meta import PluginKey
    ImportError: attempted relative import with no known parent package

    However, when I run this script with -m flag everything works fine. I don't know if Mozilla is running the script with this flag

  2. There are 2 different paths:

    • path in native-messaging-hosts/yin_yang.json: /opt/yin-yang/communicate.py
    • real file path: /opt/yin-yang/yin_yang/communicate.py

I tried installing Yin-Yang from both AUR and from source. Unfortunately Firefox support is still broken for me.