Giter Site home page Giter Site logo

Comments (25)

 avatar commented on August 16, 2024 2

I just resolved this issue on a fresh install of Kubuntu 18.10 with the following:

sudo apt install python3-pip
pip3 install PyQt5

Hopefully that helps anyone else experiencing this.

from mkchromecast.

vannaka avatar vannaka commented on August 16, 2024 2

I'm running KDE on Manjaro and can confirm installing pyqt5 through pip fixed the system tray crash issue.
Here's the command I used:
sudo pip install --upgrade --force-reinstall pyqt5

from mkchromecast.

muammar avatar muammar commented on August 16, 2024

Can you install gir1.2-notify package and tell me if it works?

from mkchromecast.

chuqster avatar chuqster commented on August 16, 2024

Installing the package stops the python error and now the gui silently dies when running a search although I do now get the notification when devices are found. Also, it still won't default to the first discovered device at startup. Watching the terminal messages I can see the device index returns okay right after the gui dies. The process continues to run after the gui dies and no errors are returned.

Running it under sudo does work as mentioned before although I still need to run a search and select a device from the gui.

from mkchromecast.

chuqster avatar chuqster commented on August 16, 2024

Attached a strace file if it helps.

from mkchromecast.

muammar avatar muammar commented on August 16, 2024

Attached a strace file if it helps.

I do not see the attached file. The strace will help me to understand better. Thanks for your feedback.

from mkchromecast.

chuqster avatar chuqster commented on August 16, 2024

Sorry about that.

mkchromecast.strace.txt

from mkchromecast.

muammar avatar muammar commented on August 16, 2024

@chuqster thank you. Could you also send the errors shown in the terminal, please?.

from mkchromecast.

chuqster avatar chuqster commented on August 16, 2024

Hi,

Not getting any errors since adding gir-notify, the tray gui just quietly dies after searching for devices unless I run the command under sudo. See attached for the output I do get. This is just past running a search and after the gui died. Hope that helps!

BTW, if there's a way to increase verbosity of output or run it from python interpreter under a debug let me know how and I can do that if it helps. Also, is there anything like a file or device that I have to have any special permissions to? I just ask as it seems fine run under sudo. I'm using Pulse audio.

Thanks,
Chuck

mkchromecast.output.txt

from mkchromecast.

muammar avatar muammar commented on August 16, 2024

Just out of curiosity, could you delete the directory $HOME/.config/mkchromecast, and try to run again without sudo?. As a regular user, it should work. I haven't work yet in adding more verbosity. It is something I have to improve. Thanks again for your feedback!.

from mkchromecast.

chuqster avatar chuqster commented on August 16, 2024

Hi,

Yeah, same results other than it reloaded defaults because the conf file
was rm'd. I attached the output. Happy I can give you some feedback. I'm a
sysadmin by trade with a little bit of coding experience so feel free to
ask.

Neat project, by the way. Thanks for doing this! I just started collecting
chromecast audios as I'm building an inexpensive multi-room system so this
is good to have. I use quite a few chromecast devices at work too so I've
got all sorts of ideas brewing.

Just a suggestion for a future enhancement if I may. The ability to create
groups of devices and to multicast, please and thanks. It's supported on
the audio model with the Android and iOS clients.

Keep up the good work!

-Chuck

On Sun, Nov 20, 2016 at 5:49 PM, Muammar El Khatib <[email protected]

wrote:

Just out of curiosity, could you delete $HOME/.config/mkchromecast, and
try to run again without sudo?. As a regular user, it should work. I
haven't work yet in adding more verbosity. It is something I have to
improve. Thanks again for your feedback!.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#29 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVZTHFKKn6dr_TwWwbx-PaIJ6L1Wyq60ks5rAPikgaJpZM4K3ZYf
.

charles@muadib:$ rm -rf .config/mkchromecast/
charles@muadib:
$ mkchromecast --debug -t
('ALSA device name:', None)
('Google Cast name:', None)
('backends: ', ['ffmpeg', 'avconv', 'parec'])
('ALSA device name:', None)
('Google Cast name:', None)
('backends: ', ['ffmpeg', 'avconv', 'parec'])
USER =charles
PATH =/home/charles/bin:/home/charles/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
mkchromecast v0.3.6
(':::audio::: chunk_size: ', 1024)
:::audio::: Program /usr/bin/parec found in /usr/bin/parec
:::audio::: backend dictionary {'parec': 'parec', '/usr/bin/parec': 'parec'}
Selected backend: /usr/bin/parec
Selected audio codec: mp3
Default bitrate used: 192k
Default sample rate used: 44100Hz
:::audio::: command ['lame', '-b', '192', '-r', '-']
:::cast::: sockets method 192.168.105.153
:::systray::: self.notifications disabled
:::systray::: self.searchatlaunch disabled
:::systray::: self.colors black
(':::systray::: Screen resolution: ', 1920, 1080)
:::systray::: High-DPI screen detected...
:::systray::: self.notifications disabled
:::systray::: self.searchatlaunch disabled
:::systray::: self.colors black
:::cast::: sockets method 192.168.105.153
self.cclist [u'ChromecastAudio4032']
elif len(self.cclist) != 0 and self.select_cc == True and self.tray == True:

List of Google Cast devices available in your network:

Index Friendly name
===== =============
0 ChromecastAudio4032
availablecc received
:::systray::: self.notifications disabled
:::systray::: self.searchatlaunch disabled
:::systray::: self.colors black
('Available Google Cast Devices', [[0, u'ChromecastAudio4032']])
^C
charles@muadib:~$

from mkchromecast.

muammar avatar muammar commented on August 16, 2024

@chuqster I am sorry to get back so late, if you are still using the app, did it ever work for you?.

from mkchromecast.

chuqster avatar chuqster commented on August 16, 2024

from mkchromecast.

brockrob avatar brockrob commented on August 16, 2024

Hi Muammar, I'm trying to use this and came across this issue. If you're inclined to reopen, I'm happy to help test, or produce whatever debug outputs you might want.

from mkchromecast.

muammar avatar muammar commented on August 16, 2024

@brockrob I am reopening the issue. I would be glad if you could help me to debug this. Thanks.

from mkchromecast.

brockrob avatar brockrob commented on August 16, 2024

Sure thing. I'm on Kali-rolling, kernel 4.11.3, pulse-audio, and KDE plasma. Running mkchromecast from their repo, which mirrors debian-testing:

robert@CrashBox:~/Documents$ apt show mkchromecast
Package: mkchromecast
Version: 0.3.7+git20170130-2
Priority: optional
Section: sound
Maintainer: Muammar El Khatib <[email protected]>
Installed-Size: 4,911 kB
Depends: python:any (>= 2.7.5-5~), python-flask, python-pychromecast, python-psutil, vorbis-tools (>= 1.4.0), sox (>= 14.4.1), lame (>= 3.99.0), flac (>= 1.3.0), python-pyqt5, youtube-dl, gir1.2-notify-0.7
Suggests: libav-tools, ffmpeg, mkchromecast-pulseaudio, mkchromecast-alsa
Homepage: http://mkchromecast.com
Tag: admin::hardware, hardware::detection, hardware::video,
 interface::commandline, role::program, scope::utility, use::playing,
 works-with::audio
Download-Size: 1,430 kB
APT-Manual-Installed: yes
APT-Sources: http://http.kali.org/kali kali-rolling/main amd64 Packages
Description: Cast your Linux audio to your Google Cast devices
 It is written in Python, and it streams via node.js, ffmpeg, or avconv.
 mkchromecast is capable of using lossy and lossless audio formats provided
 that ffmpeg is installed. It also supports Multi-room group playback, and
 24-bits/96kHz high audio resolution. Additionally, a system tray menu is also
 available.
 .
 By default, mkchromecast streams with node.js (or parec in Linux) together
 with mp3 audio coding format at a sample rate of 44100Hz and average bitrate
 of 192k. These defaults can be changed using the --sample-rate and -b flags.
 It is useful to modify these parameters when your wireless router is not very
 powerful, or in the case you don't want to degrade the sound quality.
 .
 mkchromecast can cast using either pulseaudio or ALSA. The respective
 dependencies can be pulled by mkchromecast-pulseaudio and mkchromecast-alsa
 dependency packages respectively. For more information, please read the
 README.Debian file shipped in this package.

robert@CrashBox:~/Documents$

I didn't dig too hard. It works fine in the command line, but if I run the tray it disappears from the tray after I click the bit to find a chromecast device. There is still an mkchromecast process alive after this happens, however, and the debug output smells like a threading issue at first glance:

robert@CrashBox:~$ mkchromecast --debug -t
('ALSA device name:', None)
('Google Cast name:', None)
('backends: ', ['ffmpeg', 'avconv', 'parec', 'gstreamer'])
('ALSA device name:', None)
('Google Cast name:', None)
('backends: ', ['ffmpeg', 'avconv', 'parec', 'gstreamer'])
USER =robert
PATH =/home/robert/bin/Sencha/Cmd/6.1.2.15/..:/home/robert/bin/Sencha/Cmd:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
mkchromecast v0.3.7
(':::audio::: chunk_size: ', 1024)
:::audio::: tray =True
Configuration file exists
Using defaults set there
('parec', 'flac', '192', '44100', None)
:::audio::: Program /usr/bin/parec found in /usr/bin/parec
:::audio::: backend dictionary {'parec': 'parec', '/usr/bin/parec': 'parec'}
Selected backend: /usr/bin/parec
Selected audio codec: flac
Default bitrate used: 192k
Default sample rate used: 44100Hz
:::audio::: command ['flac', '-', '-c', '--channels', '2', '--bps', '16', '--sample-rate', '44100', '--endian', 'little', '--sign', 'signed', '-s']
:::cast::: sockets method 192.168.0.211
Configuration file exists
Using defaults set there
(':::systray::: Screen resolution: ', 1920, 1080)
:::systray::: High-DPI screen detected...
Configuration file exists
Using defaults set there
:::cast::: sockets method 192.168.0.211
self.cclist [u'Marantz']
elif len(self.cclist) != 0 and self.select_cc == True and self.tray == True:
 
List of Google Cast devices available in your network:
------------------------------------------------------
 
Index   Friendly name
=====   ============= 
0       Marantz
availablecc received
Configuration file exists
Using defaults set there
('Available Google Cast Devices', [[0, u'Marantz']])

Any other info you'd like?

from mkchromecast.

muammar avatar muammar commented on August 16, 2024

from mkchromecast.

brockrob avatar brockrob commented on August 16, 2024

No, it disappears entirely from the systray.

Note that if you want to reproduce in kali I have installed KDE and removed gnome. Given that OP was also using KDE, I'm thinking it's worthwhile you do the same?

from mkchromecast.

muammar avatar muammar commented on August 16, 2024

Note that if you want to reproduce in kali I have installed KDE and removed gnome. Given that OP was also using KDE, I'm thinking it's worthwhile you do the same?

Once I set up the vbox I will install only KDE.

from mkchromecast.

muammar avatar muammar commented on August 16, 2024

@brockrob you were right about the icon disappearing completely from the systray. I will try to fix this.

from mkchromecast.

DrNik avatar DrNik commented on August 16, 2024

Hi @muammar,
I'm facing the same non-appearing systray (actually before I set the search on launch option it was appearing and disappering on search) icon on Kubuntu 17.10 but executing via debug on cli I receive a slightly different output may be it helps to fix the issue:

[...]
Configuration file exists
Using defaults set there
:::systray::: Screen resolution: 1920 1080
:::systray::: High-DPI screen detected...
Icon theme "papirus" not found.
Invalid Context= "stock" line for icon theme: "/usr/share/icons/ubuntu-mono-dark/stock/16/"
Invalid Context= "stock" line for icon theme: "/usr/share/icons/ubuntu-mono-dark/stock/22/"
Invalid Context= "stock" line for icon theme: "/usr/share/icons/ubuntu-mono-dark/stock/24/"
Invalid Context= "stock" line for icon theme: "/usr/share/icons/ubuntu-mono-dark/stock/32/"
Invalid Context= "stock" line for icon theme: "/usr/share/icons/ubuntu-mono-dark/stock/48/"
Invalid Context= "stock" line for icon theme: "/usr/share/icons/ubuntu-mono-dark/stock/64/"
nvalid Context= "stock" line for icon theme: "/usr/share/icons/ubuntu-mono-dark/stock/128/"
Icon theme "Mint-X" not found.
Icon theme "elementary" not found.
Icon theme "gnome" not found.
Configuration file exists
Using defaults set there
:::cast::: sockets method 192.168.116.126
[...]

Of course if you'd need any other info let me know.

Bests,
Nicola

from mkchromecast.

muammar avatar muammar commented on August 16, 2024

I cannot reproduce this:
screenshot from 2018-09-19 23-20-30

from mkchromecast.

Yanislavcore avatar Yanislavcore commented on August 16, 2024

I have the same problem with KDE. I'm using KDE Neon 18.04.
Configuration is default.
Here the output:

➜  ~ mkchromecast --debug -t
ALSA device name: None.
Google Cast name: None.
backends:  ['ffmpeg', 'avconv', 'parec', 'gstreamer']
ALSA device name: None.
Google Cast name: None.
backends:  ['ffmpeg', 'avconv', 'parec', 'gstreamer']
USER =yanislavcore
PATH =/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
Mkchromecast v0.3.8.1
:::cast::: sockets method 10.0.12.105
:::audio::: chunk_size, frame_size, buffer_size: 64, 2048, 8192
:::audio::: Program /usr/bin/parec found in /usr/bin/parec
:::audio::: backend dictionary {'parec': 'parec', '/usr/bin/parec': 'parec'}
Selected backend: /usr/bin/parec
Selected audio codec: mp3
Default bitrate used: 192k
Default sample rate used: 44100Hz.
:::audio::: command ['lame', '-b', '192', '-r', '-']
:::cast::: sockets method 10.0.12.105
:::systray::: self.notifications disabled
:::systray::: self.searchatlaunch disabled
:::systray::: self.colors black
:::systray::: Screen resolution:  1920 1080
:::systray::: High-DPI screen detected...
:::systray::: self.notifications disabled
:::systray::: self.searchatlaunch disabled
:::systray::: self.colors black
:::cast::: sockets method 10.0.12.105
self.cclist [[0, 'MIBOX3', 'Gcast']]
elif len(self.cclist) != 0 and self.select_cc == True  and self.tray == True:
 
List of Devices Available in Network:
-------------------------------------

Index   Types   Friendly Name 
=====   =====   ============= 
0       Gcast   MIBOX3
availablecc received
:::systray::: self.notifications disabled
:::systray::: self.searchatlaunch disabled
:::systray::: self.colors black
Available Media Streaming Devices [[0, 'MIBOX3', 'Gcast']]

from mkchromecast.

r7xf avatar r7xf commented on August 16, 2024

Same is happening here as well./Systray Icon disappears when I press the search for devices option, totally gone and not just the icon.
Strange enough I can get things running normally when launched as su, which, for security reasons, is not a solution : ), let me know if I can run a test for you, ill gladly help. Kind regards.

from mkchromecast.

RitwickVerma avatar RitwickVerma commented on August 16, 2024

I have kind of isolated the issue. The difference in KDE comes between pyqt5 version 5.11.2 and pyqt5 version 5.12.2. When we use pyqt5 v 5.12.2 (latest), the problem comes into play and the icon disappears from the system tray when 'search for media streaming devices' is clicked. This problem does not occur when we use pyqt5 v 5.11.2 i.e. when we install from source and use requirements.txt to install the needed packages. Thus, problem will occur as in my case, when installing from AUR or pretty much any time when not installing from sources.

EDIT:
After tinkering a bit more, I found out that installing pyqt5 from pacman ie arch repos will result in the problem while if we install using pip, the problem goes away as experienced by @otlinton.
so,
Icon problem occurs when I run
sudo pacman -S python-pyqt5 which installs pyqt5 v5.12.2

Icon problem solves when I run
sudo pip install pyqt5 which installs pyqt5 v5.12

Thus finally, if you're experiencing the problem of disappearing system tray icon, use pip to install the pyqt5 package instead.
Still not sure though why the problem exists in one source but not in the other. Maybe the difference is in
versions of pyqt5.
(Tried installing older version of pyqt5 from arch archive. Problem still persists) This can only be answered by @muammar though.

I hope this helps out a bit.

from mkchromecast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.