Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

Restore window doesn't work from GNOME Shell launcher or from GNOME notification center #294

Closed
dac73 opened this issue Nov 16, 2018 · 14 comments

Comments

@dac73
Copy link

dac73 commented Nov 16, 2018

Description:

Restore window doesn't work from GNOME Shell launcher or from GNOME notification center. It works fine from try icon (but I don't want to use those :))

Steps To Reproduce:

  1. Start MellowPlayer
  2. Press X (close icon on the main window)
  3. Try to restore window either via desktop file (GNOME Launcher) or notification center (Currently playing media)

Expected result: MellowPlayer opens with currently playing media
Current Result: New instance of MellowPlayer opens

Log Files

Paste the application logs (About > Show logs)

[2018-11-16 09:59:54.886] [All] [info] *******************************************************************************
[D] [2018-11-16 09-59-55:067824] [StreamingServiceLoader] skipping plugin directory: /builddir/build/BUILD/MellowPlayer-3.4.0/src/plugins/web (directory not found)
[D] [2018-11-16 09-59-55:067899] [StreamingServiceLoader] skipping plugin directory: /home/dario/plugins (directory not found)
[D] [2018-11-16 09-59-55:067937] [StreamingServiceLoader] looking for services in /usr/share/mellowplayer/plugins
[I] [2018-11-16 09-59-55:068583] [StreamingServiceLoader] 8tracks streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/8tracks")
[I] [2018-11-16 09-59-55:068890] [StreamingServiceLoader] Anghami streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/anghami")
[I] [2018-11-16 09-59-55:069180] [StreamingServiceLoader] Bandcamp streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/bandcamp")
[I] [2018-11-16 09-59-55:069472] [StreamingServiceLoader] Deezer streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/deezer")
[I] [2018-11-16 09-59-55:069777] [StreamingServiceLoader] Google Play Music streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/googleplaymusic")
[I] [2018-11-16 09-59-55:070072] [StreamingServiceLoader] HearThisAt streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/hearthisat")
[I] [2018-11-16 09-59-55:070338] [StreamingServiceLoader] HypeMachine streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/hypemachine")
[I] [2018-11-16 09-59-55:070610] [StreamingServiceLoader] Jamendo streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/jamendo")
[I] [2018-11-16 09-59-55:070949] [StreamingServiceLoader] Mixcloud streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/mixcloud")
[I] [2018-11-16 09-59-55:071221] [StreamingServiceLoader] Player FM streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/playerfm")
[I] [2018-11-16 09-59-55:071513] [StreamingServiceLoader] Plex streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/plex")
[I] [2018-11-16 09-59-55:071805] [StreamingServiceLoader] Pocket Casts streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/pocketcasts")
[I] [2018-11-16 09-59-55:072074] [StreamingServiceLoader] Radionomy streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/radionomy")
[I] [2018-11-16 09-59-55:072353] [StreamingServiceLoader] Soundcloud streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/soundcloud")
[I] [2018-11-16 09-59-55:072742] [StreamingServiceLoader] Spotify streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/spotify")
[I] [2018-11-16 09-59-55:073044] [StreamingServiceLoader] Tidal streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/tidal")
[I] [2018-11-16 09-59-55:073331] [StreamingServiceLoader] TuneIn streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/tunein")
[I] [2018-11-16 09-59-55:073667] [StreamingServiceLoader] Wynk streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/wynk")
[I] [2018-11-16 09-59-55:073952] [StreamingServiceLoader] Yandex Music streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/yandexmusic")
[I] [2018-11-16 09-59-55:074223] [StreamingServiceLoader] ympd streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/ympd")
[I] [2018-11-16 09-59-55:074602] [StreamingServiceLoader] Youtube streamingService successfully loaded (from "/usr/share/mellowplayer/plugins/youtube")
[D] [2018-11-16 09-59-55:074647] [StreamingServiceLoader] skipping plugin directory: /usr/bin/plugins (directory not found)
[D] [2018-11-16 09-59-55:074681] [StreamingServiceLoader] skipping plugin directory: /home/dario/.local/share/MellowPlayer/plugins (directory not found)
[D] [2018-11-16 09-59-55:074709] [StreamingServiceLoader] skipping plugin directory: /usr/local/share/mellowplayer/plugins (directory not found)

Additional Information:

  • Version: 3.4.0.0
  • Affected streaming services (if any): tried only on Deezer
  • Operating System: Fedora 29, GNOME, native package
@ColinDuquesnoy
Copy link
Owner

Thank you for reporting. Can you please post the log output when you run mellowplayer with -l 0? The single instance mechanism is disabled in debug builds and I'm wondering if the fedora package is built properly because single instance works fine with the packages I maintain myself for other distributions...

@dac73
Copy link
Author

dac73 commented Nov 18, 2018

Did 2 runs, first run, close on X, second run.
mellowplayer_first_run.txt
mellowplayer_second_run.txt

@ColinDuquesnoy
Copy link
Owner

Thank you! That confirms my suspicion. MellowPlayer is compiled in debug mode in the fedora package. When we run MellowPlayer in release mode, we should see the following line in the logs:

  • first run:
[I] [2018-11-18 11-01-34:579596] [SingleInstance] lock file: /tmp/MellowPlayer.lock
[D] [2018-11-18 11-01-34:581843] [SingleInstance] Initializing primary application
  • second run:
[I] [2018-11-18 11-04-36:427370] [SingleInstance] lock file: /tmp/MellowPlayer.lock
[D] [2018-11-18 11-04-36:528582] [SingleInstance] Running secondary application
[I] [2018-11-18 11-04-36:529460] [SingleInstance] connection with the primary application succeeded
[D] [2018-11-18 11-04-36:529530] [SingleInstance] sending action: restore-window

@martinkg Can you please make sure MellowPlayer is compiled in release mode? You need to use config:release when building with qbs >= 1.11

@martinkg
Copy link

new mellowplayer package was successfully built with config flag: config:release
https://koji.fedoraproject.org/koji/taskinfo?taskID=30966777

@ColinDuquesnoy
Copy link
Owner

Thank you @martinkg!

@krashekspres please try the latest package and let us know if it fixes your issue.

@dac73
Copy link
Author

dac73 commented Nov 19, 2018

dnf list | grep -i mellowplayer
mellowplayer.x86_64                                                    3.4.0-3.fc29                                                    @@commandline            
mellowplayer-doc.noarch                                                3.4.0-2.fc29                                                    fedora 

Problem still persists, no 'lock fie' string in logs.

@ColinDuquesnoy
Copy link
Owner

ColinDuquesnoy commented Nov 19, 2018

@krashekspres Thank you for testing.

@martinkg This may be caused by the qbs.debugInformation option. Maybe use qbs.separateDebugInformation. If that does not work, I can provide a patch that remove the DEBUG condition on the single instance mechanism. Just let me know if you need it.

@martinkg
Copy link

it doesn't work:
+ qbs build --no-install -d build qbs.installRoot:/usr modules.cpp.useRPaths:false qbs.separateDebugInformation:true config:release modules.cpp.linkerFlags:-fuse-ld=gold Build graph does not yet exist for configuration 'release'. Starting from scratch. Resolving project for configuration release ERROR: Loading module 'qbs' for product '' failed due to invalid values in profile '': Unknown property: qbs.separateDebugInformation

@ColinDuquesnoy
Copy link
Owner

My bad, it should be modules.cpp.separateDebugInformation:true (see https://doc-snapshots.qt.io/qbs/qml-qbsmodules-cpp.html#separateDebugInformation-prop)

@martinkg
Copy link

but then, the rpmbuild find a empty debug file

Provides: mellowplayer-doc = 3.4.0-4.fc29 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Processing files: mellowplayer-debugsource-3.4.0-4.fc29.x86_64 error: Empty %files file /home/martin/rpmbuild/BUILD/MellowPlayer-3.4.0/debugsourcefiles.list
https://fedoraproject.org/wiki/Packaging:Debuginfo

@ColinDuquesnoy
Copy link
Owner

Yes, separate debug information build a .debug in the build directory but does not install it. You can copy it manually or revert to qbs.debugInformation:true and use this Patch

Note that the patch won't be necessary for the next release.

@martinkg
Copy link

new mellowplayer package was successfully built with flag qbs.debugInformation:true and your Patch
https://koji.fedoraproject.org/koji/taskinfo?taskID=31001530

@dac73
Copy link
Author

dac73 commented Nov 19, 2018

@martinkg this build fixes the issue.
Thanks.

@ColinDuquesnoy
Copy link
Owner

Great! Thank you @martinkg

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

No branches or pull requests

3 participants