Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No more ability to send or receive #2

Open
VDuchauffour opened this issue Aug 4, 2023 · 22 comments
Open

No more ability to send or receive #2

VDuchauffour opened this issue Aug 4, 2023 · 22 comments

Comments

@VDuchauffour
Copy link

Hello,
I used your program several times on my machine (archlinux) a few weeks ago but now I get this error message:

Could not register listener. Is the DBus service running?

Any idea where this issue is coming from? Of course, the dbus.service is active on my system.
Thanks!

@vicr123
Copy link
Owner

vicr123 commented Aug 4, 2023

Hi, can you check if com.vicr123.qnearbyshare.service is running?

@Angrrry
Copy link

Angrrry commented Aug 6, 2023

I am experiencing the same issue; it appears that there is no such service.

~ sudo systemctl status com.vicr123.qnearbyshare.service
Unit com.vicr123.qnearbyshare.service could not be found.

@vicr123
Copy link
Owner

vicr123 commented Aug 6, 2023

Looks like there were was an upstream change to protobuf. I've pushed a fix - could you please try rebuilding and let me know if this is fixed?

@VDuchauffour
Copy link
Author

Looks like there were was an upstream change to protobuf. I've pushed a fix - could you please try rebuilding and let me know if this is fixed?

It seems that it still doesn't work for me:

❯ git clone --recursive git@github.com:vicr123/QNearbyShare.git
Cloning into 'QNearbyShare'...
remote: Enumerating objects: 527, done.
remote: Counting objects: 100% (527/527), done.
remote: Compressing objects: 100% (330/330), done.
remote: Total 527 (delta 415), reused 306 (delta 194), pack-reused 0
Receiving objects: 100% (527/527), 149.45 KiB | 784.00 KiB/s, done.
Resolving deltas: 100% (415/415), done.
Submodule 'libqnearbyshare/QtZeroConf' (https://github.com/jbagg/QtZeroConf.git) registered for path 'libqnearbyshare-server/QtZeroConf'
Submodule 'test/googletest' (https://github.com/google/googletest.git) registered for path 'test/googletest'
Cloning into '/home/voigtk/QNearbyShare/libqnearbyshare-server/QtZeroConf'...
remote: Enumerating objects: 629, done.
remote: Counting objects: 100% (230/230), done.
remote: Compressing objects: 100% (73/73), done.
remote: Total 629 (delta 169), reused 189 (delta 155), pack-reused 399
Receiving objects: 100% (629/629), 425.35 KiB | 5.91 MiB/s, done.
Resolving deltas: 100% (365/365), done.
Cloning into '/home/voigtk/QNearbyShare/test/googletest'...
remote: Enumerating objects: 26720, done.
remote: Counting objects: 100% (297/297), done.
remote: Compressing objects: 100% (139/139), done.
remote: Total 26720 (delta 181), reused 207 (delta 142), pack-reused 26423
Receiving objects: 100% (26720/26720), 12.46 MiB | 14.19 MiB/s, done.
Resolving deltas: 100% (19816/19816), done.
Submodule path 'libqnearbyshare-server/QtZeroConf': checked out '473d8520f954d22f8ad45e0d9a945c97b7282264'
Submodule path 'test/googletest': checked out '12a5852e451baabc79c63a86c634912c563d57bc'cd QNearbyShare
❯cmake -B build -S .
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /sbin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /sbin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
CMake Warning at /home/voigtk/.pyenv/versions/3.10.11/envs/main/lib/python3.10/site-packages/cmake/data/share/cmake-3.26/Modules/FindProtobuf.cmake:524 (message):
  Protobuf compiler version 23.4 doesn't match library version 4.23.4
Call Stack (most recent call first):
  libqnearbyshare-server/CMakeLists.txt:1 (find_package)


-- Found Protobuf: /usr/lib/libprotobuf.so (found version "4.23.4")
-- Found PkgConfig: /sbin/pkg-config (found version "1.8.1")
-- Checking for module 'libcryptopp'
--   Found libcryptopp, version 8.8
CMake Warning at /home/voigtk/.pyenv/versions/3.10.11/envs/main/lib/python3.10/site-packages/cmake/data/share/cmake-3.26/Modules/FindProtobuf.cmake:524 (message):
  Protobuf compiler version 23.4 doesn't match library version 4.23.4
Call Stack (most recent call first):
  qnearbyshared/CMakeLists.txt:1 (find_package)


-- Found OpenSSL: /usr/lib/libcrypto.so (found version "3.1.2")
-- Configuring done (0.6s)
-- Generating done (0.0s)
-- Build files have been written to: /home/voigtk/QNearbyShare/build
❯ cmake --build build
[  1%] Automatic MOC and UIC for target libqnearbyshare-dbus-types
[  1%] Built target libqnearbyshare-dbus-types_autogen
[  3%] Building CXX object dbus-types/CMakeFiles/libqnearbyshare-dbus-types.dir/libqnearbyshare-dbus-types_autogen/mocs_compilation.cpp.o
[  4%] Building CXX object dbus-types/CMakeFiles/libqnearbyshare-dbus-types.dir/sendingfile.cpp.o
[  6%] Building CXX object dbus-types/CMakeFiles/libqnearbyshare-dbus-types.dir/qnearbysharedbus.cpp.o
[  8%] Building CXX object dbus-types/CMakeFiles/libqnearbyshare-dbus-types.dir/nearbysharetarget.cpp.o
[  9%] Building CXX object dbus-types/CMakeFiles/libqnearbyshare-dbus-types.dir/transferprogress.cpp.o
[ 11%] Linking CXX static library liblibqnearbyshare-dbus-types.a
[ 11%] Built target libqnearbyshare-dbus-types
[ 13%] Running cpp protocol buffer compiler on wire_format.proto
[ 14%] Running cpp protocol buffer compiler on device_to_device_messages.proto
[ 16%] Running cpp protocol buffer compiler on offline_wire_formats.proto
[ 18%] Running cpp protocol buffer compiler on securegcm.proto
[ 19%] Running cpp protocol buffer compiler on securemessage.proto
[ 21%] Running cpp protocol buffer compiler on ukey.proto
[ 22%] Automatic MOC and UIC for target qnearbyshared-proto
[ 22%] Built target qnearbyshared-proto_autogen
[ 24%] Building CXX object libqnearbyshare-server/proto/CMakeFiles/qnearbyshared-proto.dir/qnearbyshared-proto_autogen/mocs_compilation.cpp.o
[ 26%] Building CXX object libqnearbyshare-server/proto/CMakeFiles/qnearbyshared-proto.dir/device_to_device_messages.pb.cc.o
[ 27%] Building CXX object libqnearbyshare-server/proto/CMakeFiles/qnearbyshared-proto.dir/offline_wire_formats.pb.cc.o
In file included from /home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.cc:4:
/home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.h:1041:49: warning: ‘location::nearby::connections::ConnectionRequestFrame_Medium_MDNS’ is deprecated [-Wdeprecated-declarations]
 1041 |   [[deprecated]] static constexpr Medium MDNS = ConnectionRequestFrame_Medium_MDNS;
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.h:258:3: note: declared here
  258 |   ConnectionRequestFrame_Medium_MDNS [[deprecated]] = 1,
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.h:3594:49: warning: ‘location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_MDNS’ is deprecated [-Wdeprecated-declarations]
 3594 |   [[deprecated]] static constexpr Medium MDNS = BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_MDNS;
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.h:387:3: note: declared here
  387 |   BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_MDNS [[deprecated]] = 1,
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 29%] Building CXX object libqnearbyshare-server/proto/CMakeFiles/qnearbyshared-proto.dir/securegcm.pb.cc.o
[ 31%] Building CXX object libqnearbyshare-server/proto/CMakeFiles/qnearbyshared-proto.dir/securemessage.pb.cc.o
[ 32%] Building CXX object libqnearbyshare-server/proto/CMakeFiles/qnearbyshared-proto.dir/ukey.pb.cc.o
[ 34%] Building CXX object libqnearbyshare-server/proto/CMakeFiles/qnearbyshared-proto.dir/wire_format.pb.cc.o
[ 36%] Linking CXX static library libqnearbyshared-proto.a
[ 36%] Built target qnearbyshared-proto
[ 37%] Automatic MOC and UIC for target QtZeroConf
[ 37%] Built target QtZeroConf_autogen
[ 39%] Building CXX object libqnearbyshare-server/QtZeroConf/CMakeFiles/QtZeroConf.dir/QtZeroConf_autogen/mocs_compilation.cpp.o
[ 40%] Building CXX object libqnearbyshare-server/QtZeroConf/CMakeFiles/QtZeroConf.dir/qzeroconfservice.cpp.o
[ 42%] Building CXX object libqnearbyshare-server/QtZeroConf/CMakeFiles/QtZeroConf.dir/avahi-qt/qt-watch.cpp.o
[ 44%] Building CXX object libqnearbyshare-server/QtZeroConf/CMakeFiles/QtZeroConf.dir/avahiclient.cpp.o
[ 45%] Linking CXX static library libQtZeroConf.a
[ 45%] Built target QtZeroConf
[ 47%] Automatic MOC and UIC for target libqnearbyshare-server
[ 47%] Built target libqnearbyshare-server_autogen
[ 49%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/libqnearbyshare-server_autogen/mocs_compilation.cpp.o
[ 50%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/nearbyshareserver.cpp.o
[ 52%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/nearbysocket.cpp.o
In file included from /home/voigtk/QNearbyShare/libqnearbyshare-server/nearbyshare/nearbysocket.cpp:28:
/home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.h:1041:49: warning: ‘location::nearby::connections::ConnectionRequestFrame_Medium_MDNS’ is deprecated [-Wdeprecated-declarations]
 1041 |   [[deprecated]] static constexpr Medium MDNS = ConnectionRequestFrame_Medium_MDNS;
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.h:258:3: note: declared here
  258 |   ConnectionRequestFrame_Medium_MDNS [[deprecated]] = 1,
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.h:3594:49: warning: ‘location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_MDNS’ is deprecated [-Wdeprecated-declarations]
 3594 |   [[deprecated]] static constexpr Medium MDNS = BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_MDNS;
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.h:387:3: note: declared here
  387 |   BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_MDNS [[deprecated]] = 1,
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 54%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/endpointinfo.cpp.o
[ 55%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/cryptography.cpp.o
[ 57%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/nearbyshareclient.cpp.o
[ 59%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/abstractnearbypayload.cpp.o
[ 60%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/nearbypayload.cpp.o
[ 62%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/nearbysharediscovery.cpp.o
[ 63%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/cryptography/cryptoppcryptograhy.cpp.o
[ 65%] Linking CXX static library libqnearbyshare-server.a
[ 65%] Built target libqnearbyshare-server
[ 67%] Automatic MOC and UIC for target QNearbyShare-daemon
[ 67%] Built target QNearbyShare-daemon_autogen
[ 68%] Building CXX object qnearbyshared/CMakeFiles/QNearbyShare-daemon.dir/QNearbyShare-daemon_autogen/mocs_compilation.cpp.o
[ 70%] Building CXX object qnearbyshared/CMakeFiles/QNearbyShare-daemon.dir/main.cpp.o
[ 72%] Building CXX object qnearbyshared/CMakeFiles/QNearbyShare-daemon.dir/dbus/dbusnearbysharemanager.cpp.o
[ 73%] Building CXX object qnearbyshared/CMakeFiles/QNearbyShare-daemon.dir/dbus/dbusnearbysharesession.cpp.o
[ 75%] Building CXX object qnearbyshared/CMakeFiles/QNearbyShare-daemon.dir/dbus/dbushelpers.cpp.o
[ 77%] Building CXX object qnearbyshared/CMakeFiles/QNearbyShare-daemon.dir/dbus/dbusnearbysharelistener.cpp.o
[ 78%] Building CXX object qnearbyshared/CMakeFiles/QNearbyShare-daemon.dir/dbus/dbusnearbysharediscovery.cpp.o
[ 80%] Linking CXX executable qnearbyshared
[ 80%] Built target QNearbyShare-daemon
[ 81%] Automatic MOC and UIC for target QNearbyShare-receive
[ 81%] Built target QNearbyShare-receive_autogen
[ 83%] Building CXX object qnearbyshare-receive/CMakeFiles/QNearbyShare-receive.dir/QNearbyShare-receive_autogen/mocs_compilation.cpp.o
[ 85%] Building CXX object qnearbyshare-receive/CMakeFiles/QNearbyShare-receive.dir/main.cpp.o
[ 86%] Building CXX object qnearbyshare-receive/CMakeFiles/QNearbyShare-receive.dir/receiver.cpp.o
[ 88%] Linking CXX executable qnearbyshare-receive
[ 88%] Built target QNearbyShare-receive
[ 90%] Automatic MOC and UIC for target QNearbyShare-send
[ 90%] Built target QNearbyShare-send_autogen
[ 91%] Building CXX object qnearbyshare-send/CMakeFiles/QNearbyShare-send.dir/QNearbyShare-send_autogen/mocs_compilation.cpp.o
[ 93%] Building CXX object qnearbyshare-send/CMakeFiles/QNearbyShare-send.dir/main.cpp.o
[ 95%] Building CXX object qnearbyshare-send/CMakeFiles/QNearbyShare-send.dir/devicediscovery.cpp.o
[ 96%] Building CXX object qnearbyshare-send/CMakeFiles/QNearbyShare-send.dir/console.cpp.o
[ 98%] Building CXX object qnearbyshare-send/CMakeFiles/QNearbyShare-send.dir/sendjob.cpp.o
[100%] Linking CXX executable qnearbyshare-send
[100%] Built target QNearbyShare-send
❯ sudo cmake --install build
-- Install configuration: ""
-- Installing: /usr/local/lib/qnearbyshared
-- Installing: /usr/local/share/dbus-1/services/com.vicr123.qnearbyshare.service
-- Installing: /usr/local/bin/qnearbyshare-receive
-- Installing: /usr/local/bin/qnearbyshare-send
❯ qnearbyshare-receive
Could not register listener. Is the DBus service running?

@vicr123
Copy link
Owner

vicr123 commented Aug 7, 2023

Can you show me the contents of /usr/local/share/dbus-1/services/com.vicr123.qnearbyshare.service, and can you try running /usr/local/lib/qnearbyshared and tell me what happens?

@VDuchauffour
Copy link
Author

VDuchauffour commented Aug 7, 2023

❯ cat /usr/local/share/dbus-1/services/com.vicr123.qnearbyshare.service
[D-BUS Service]
Name=com.vicr123.qnearbyshare
Exec=/usr/lib/qnearbyshared
❯ /usr/local/lib/qnearbyshared
Server Running

On another shell I ran qnearbyshare-receive and I get this:

Awaiting a Nearby Share connection.
Use Nearby Share on another device to connect to this device to share files.

This Device Name: voigt

Maybe not related but I see on my android device that no receiver has been found.
EDIT: it found it after waiting 1 or 2 minutes but it failed to send.

@vicr123
Copy link
Owner

vicr123 commented Aug 8, 2023

My apologies for the delay - would you be able to try building again and telling me if you are able to use qnearbyshare-receive without running qnearbyshared?

@VDuchauffour
Copy link
Author

My apologies for the delay - would you be able to try building again and telling me if you are able to use qnearbyshare-receive without running qnearbyshared?

Sure, no problem! Yes, it works now!

❯ sudo cmake --install build
-- Install configuration: ""
-- Installing: /usr/local/lib/qnearbyshared
-- Installing: /usr/local/share/dbus-1/services/com.vicr123.qnearbyshare.service
-- Installing: /usr/local/bin/qnearbyshare-receive
-- Installing: /usr/local/bin/qnearbyshare-send
❯ qnearbyshare-receive
Awaiting a Nearby Share connection.
Use Nearby Share on another device to connect to this device to share files.

This Device Name: voigt

@vicr123
Copy link
Owner

vicr123 commented Aug 8, 2023

Great to hear :D

Confirming that receiving from Android is also still functioning?

@VDuchauffour
Copy link
Author

I tried to share a picture from my phone but the sending always seems to fail... :/

@vicr123
Copy link
Owner

vicr123 commented Aug 13, 2023

At what stage does it fail? Do you get to see a PIN on the sending device, for example?

@spaceserver
Copy link

spaceserver commented Sep 23, 2023

Looks like there were was an upstream change to protobuf. I've pushed a fix - could you please try rebuilding and let me know if this is fixed?

It seems that it still doesn't work for me:

❯ git clone --recursive git@github.com:vicr123/QNearbyShare.git
Cloning into 'QNearbyShare'...
remote: Enumerating objects: 527, done.
remote: Counting objects: 100% (527/527), done.
remote: Compressing objects: 100% (330/330), done.
remote: Total 527 (delta 415), reused 306 (delta 194), pack-reused 0
Receiving objects: 100% (527/527), 149.45 KiB | 784.00 KiB/s, done.
Resolving deltas: 100% (415/415), done.
Submodule 'libqnearbyshare/QtZeroConf' (https://github.com/jbagg/QtZeroConf.git) registered for path 'libqnearbyshare-server/QtZeroConf'
Submodule 'test/googletest' (https://github.com/google/googletest.git) registered for path 'test/googletest'
Cloning into '/home/voigtk/QNearbyShare/libqnearbyshare-server/QtZeroConf'...
remote: Enumerating objects: 629, done.
remote: Counting objects: 100% (230/230), done.
remote: Compressing objects: 100% (73/73), done.
remote: Total 629 (delta 169), reused 189 (delta 155), pack-reused 399
Receiving objects: 100% (629/629), 425.35 KiB | 5.91 MiB/s, done.
Resolving deltas: 100% (365/365), done.
Cloning into '/home/voigtk/QNearbyShare/test/googletest'...
remote: Enumerating objects: 26720, done.
remote: Counting objects: 100% (297/297), done.
remote: Compressing objects: 100% (139/139), done.
remote: Total 26720 (delta 181), reused 207 (delta 142), pack-reused 26423
Receiving objects: 100% (26720/26720), 12.46 MiB | 14.19 MiB/s, done.
Resolving deltas: 100% (19816/19816), done.
Submodule path 'libqnearbyshare-server/QtZeroConf': checked out '473d8520f954d22f8ad45e0d9a945c97b7282264'
Submodule path 'test/googletest': checked out '12a5852e451baabc79c63a86c634912c563d57bc'cd QNearbyShare
❯cmake -B build -S .
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /sbin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /sbin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
CMake Warning at /home/voigtk/.pyenv/versions/3.10.11/envs/main/lib/python3.10/site-packages/cmake/data/share/cmake-3.26/Modules/FindProtobuf.cmake:524 (message):
  Protobuf compiler version 23.4 doesn't match library version 4.23.4
Call Stack (most recent call first):
  libqnearbyshare-server/CMakeLists.txt:1 (find_package)


-- Found Protobuf: /usr/lib/libprotobuf.so (found version "4.23.4")
-- Found PkgConfig: /sbin/pkg-config (found version "1.8.1")
-- Checking for module 'libcryptopp'
--   Found libcryptopp, version 8.8
CMake Warning at /home/voigtk/.pyenv/versions/3.10.11/envs/main/lib/python3.10/site-packages/cmake/data/share/cmake-3.26/Modules/FindProtobuf.cmake:524 (message):
  Protobuf compiler version 23.4 doesn't match library version 4.23.4
Call Stack (most recent call first):
  qnearbyshared/CMakeLists.txt:1 (find_package)


-- Found OpenSSL: /usr/lib/libcrypto.so (found version "3.1.2")
-- Configuring done (0.6s)
-- Generating done (0.0s)
-- Build files have been written to: /home/voigtk/QNearbyShare/build
❯ cmake --build build
[  1%] Automatic MOC and UIC for target libqnearbyshare-dbus-types
[  1%] Built target libqnearbyshare-dbus-types_autogen
[  3%] Building CXX object dbus-types/CMakeFiles/libqnearbyshare-dbus-types.dir/libqnearbyshare-dbus-types_autogen/mocs_compilation.cpp.o
[  4%] Building CXX object dbus-types/CMakeFiles/libqnearbyshare-dbus-types.dir/sendingfile.cpp.o
[  6%] Building CXX object dbus-types/CMakeFiles/libqnearbyshare-dbus-types.dir/qnearbysharedbus.cpp.o
[  8%] Building CXX object dbus-types/CMakeFiles/libqnearbyshare-dbus-types.dir/nearbysharetarget.cpp.o
[  9%] Building CXX object dbus-types/CMakeFiles/libqnearbyshare-dbus-types.dir/transferprogress.cpp.o
[ 11%] Linking CXX static library liblibqnearbyshare-dbus-types.a
[ 11%] Built target libqnearbyshare-dbus-types
[ 13%] Running cpp protocol buffer compiler on wire_format.proto
[ 14%] Running cpp protocol buffer compiler on device_to_device_messages.proto
[ 16%] Running cpp protocol buffer compiler on offline_wire_formats.proto
[ 18%] Running cpp protocol buffer compiler on securegcm.proto
[ 19%] Running cpp protocol buffer compiler on securemessage.proto
[ 21%] Running cpp protocol buffer compiler on ukey.proto
[ 22%] Automatic MOC and UIC for target qnearbyshared-proto
[ 22%] Built target qnearbyshared-proto_autogen
[ 24%] Building CXX object libqnearbyshare-server/proto/CMakeFiles/qnearbyshared-proto.dir/qnearbyshared-proto_autogen/mocs_compilation.cpp.o
[ 26%] Building CXX object libqnearbyshare-server/proto/CMakeFiles/qnearbyshared-proto.dir/device_to_device_messages.pb.cc.o
[ 27%] Building CXX object libqnearbyshare-server/proto/CMakeFiles/qnearbyshared-proto.dir/offline_wire_formats.pb.cc.o
In file included from /home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.cc:4:
/home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.h:1041:49: warning: ‘location::nearby::connections::ConnectionRequestFrame_Medium_MDNS’ is deprecated [-Wdeprecated-declarations]
 1041 |   [[deprecated]] static constexpr Medium MDNS = ConnectionRequestFrame_Medium_MDNS;
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.h:258:3: note: declared here
  258 |   ConnectionRequestFrame_Medium_MDNS [[deprecated]] = 1,
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.h:3594:49: warning: ‘location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_MDNS’ is deprecated [-Wdeprecated-declarations]
 3594 |   [[deprecated]] static constexpr Medium MDNS = BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_MDNS;
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.h:387:3: note: declared here
  387 |   BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_MDNS [[deprecated]] = 1,
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 29%] Building CXX object libqnearbyshare-server/proto/CMakeFiles/qnearbyshared-proto.dir/securegcm.pb.cc.o
[ 31%] Building CXX object libqnearbyshare-server/proto/CMakeFiles/qnearbyshared-proto.dir/securemessage.pb.cc.o
[ 32%] Building CXX object libqnearbyshare-server/proto/CMakeFiles/qnearbyshared-proto.dir/ukey.pb.cc.o
[ 34%] Building CXX object libqnearbyshare-server/proto/CMakeFiles/qnearbyshared-proto.dir/wire_format.pb.cc.o
[ 36%] Linking CXX static library libqnearbyshared-proto.a
[ 36%] Built target qnearbyshared-proto
[ 37%] Automatic MOC and UIC for target QtZeroConf
[ 37%] Built target QtZeroConf_autogen
[ 39%] Building CXX object libqnearbyshare-server/QtZeroConf/CMakeFiles/QtZeroConf.dir/QtZeroConf_autogen/mocs_compilation.cpp.o
[ 40%] Building CXX object libqnearbyshare-server/QtZeroConf/CMakeFiles/QtZeroConf.dir/qzeroconfservice.cpp.o
[ 42%] Building CXX object libqnearbyshare-server/QtZeroConf/CMakeFiles/QtZeroConf.dir/avahi-qt/qt-watch.cpp.o
[ 44%] Building CXX object libqnearbyshare-server/QtZeroConf/CMakeFiles/QtZeroConf.dir/avahiclient.cpp.o
[ 45%] Linking CXX static library libQtZeroConf.a
[ 45%] Built target QtZeroConf
[ 47%] Automatic MOC and UIC for target libqnearbyshare-server
[ 47%] Built target libqnearbyshare-server_autogen
[ 49%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/libqnearbyshare-server_autogen/mocs_compilation.cpp.o
[ 50%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/nearbyshareserver.cpp.o
[ 52%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/nearbysocket.cpp.o
In file included from /home/voigtk/QNearbyShare/libqnearbyshare-server/nearbyshare/nearbysocket.cpp:28:
/home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.h:1041:49: warning: ‘location::nearby::connections::ConnectionRequestFrame_Medium_MDNS’ is deprecated [-Wdeprecated-declarations]
 1041 |   [[deprecated]] static constexpr Medium MDNS = ConnectionRequestFrame_Medium_MDNS;
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.h:258:3: note: declared here
  258 |   ConnectionRequestFrame_Medium_MDNS [[deprecated]] = 1,
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.h:3594:49: warning: ‘location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_MDNS’ is deprecated [-Wdeprecated-declarations]
 3594 |   [[deprecated]] static constexpr Medium MDNS = BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_MDNS;
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/voigtk/QNearbyShare/build/libqnearbyshare-server/proto/offline_wire_formats.pb.h:387:3: note: declared here
  387 |   BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_MDNS [[deprecated]] = 1,
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 54%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/endpointinfo.cpp.o
[ 55%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/cryptography.cpp.o
[ 57%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/nearbyshareclient.cpp.o
[ 59%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/abstractnearbypayload.cpp.o
[ 60%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/nearbypayload.cpp.o
[ 62%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/nearbysharediscovery.cpp.o
[ 63%] Building CXX object libqnearbyshare-server/CMakeFiles/libqnearbyshare-server.dir/nearbyshare/cryptography/cryptoppcryptograhy.cpp.o
[ 65%] Linking CXX static library libqnearbyshare-server.a
[ 65%] Built target libqnearbyshare-server
[ 67%] Automatic MOC and UIC for target QNearbyShare-daemon
[ 67%] Built target QNearbyShare-daemon_autogen
[ 68%] Building CXX object qnearbyshared/CMakeFiles/QNearbyShare-daemon.dir/QNearbyShare-daemon_autogen/mocs_compilation.cpp.o
[ 70%] Building CXX object qnearbyshared/CMakeFiles/QNearbyShare-daemon.dir/main.cpp.o
[ 72%] Building CXX object qnearbyshared/CMakeFiles/QNearbyShare-daemon.dir/dbus/dbusnearbysharemanager.cpp.o
[ 73%] Building CXX object qnearbyshared/CMakeFiles/QNearbyShare-daemon.dir/dbus/dbusnearbysharesession.cpp.o
[ 75%] Building CXX object qnearbyshared/CMakeFiles/QNearbyShare-daemon.dir/dbus/dbushelpers.cpp.o
[ 77%] Building CXX object qnearbyshared/CMakeFiles/QNearbyShare-daemon.dir/dbus/dbusnearbysharelistener.cpp.o
[ 78%] Building CXX object qnearbyshared/CMakeFiles/QNearbyShare-daemon.dir/dbus/dbusnearbysharediscovery.cpp.o
[ 80%] Linking CXX executable qnearbyshared
[ 80%] Built target QNearbyShare-daemon
[ 81%] Automatic MOC and UIC for target QNearbyShare-receive
[ 81%] Built target QNearbyShare-receive_autogen
[ 83%] Building CXX object qnearbyshare-receive/CMakeFiles/QNearbyShare-receive.dir/QNearbyShare-receive_autogen/mocs_compilation.cpp.o
[ 85%] Building CXX object qnearbyshare-receive/CMakeFiles/QNearbyShare-receive.dir/main.cpp.o
[ 86%] Building CXX object qnearbyshare-receive/CMakeFiles/QNearbyShare-receive.dir/receiver.cpp.o
[ 88%] Linking CXX executable qnearbyshare-receive
[ 88%] Built target QNearbyShare-receive
[ 90%] Automatic MOC and UIC for target QNearbyShare-send
[ 90%] Built target QNearbyShare-send_autogen
[ 91%] Building CXX object qnearbyshare-send/CMakeFiles/QNearbyShare-send.dir/QNearbyShare-send_autogen/mocs_compilation.cpp.o
[ 93%] Building CXX object qnearbyshare-send/CMakeFiles/QNearbyShare-send.dir/main.cpp.o
[ 95%] Building CXX object qnearbyshare-send/CMakeFiles/QNearbyShare-send.dir/devicediscovery.cpp.o
[ 96%] Building CXX object qnearbyshare-send/CMakeFiles/QNearbyShare-send.dir/console.cpp.o
[ 98%] Building CXX object qnearbyshare-send/CMakeFiles/QNearbyShare-send.dir/sendjob.cpp.o
[100%] Linking CXX executable qnearbyshare-send
[100%] Built target QNearbyShare-send
❯ sudo cmake --install build
-- Install configuration: ""
-- Installing: /usr/local/lib/qnearbyshared
-- Installing: /usr/local/share/dbus-1/services/com.vicr123.qnearbyshare.service
-- Installing: /usr/local/bin/qnearbyshare-receive
-- Installing: /usr/local/bin/qnearbyshare-send
❯ qnearbyshare-receive
Could not register listener. Is the DBus service running?

for me it only works when running it via the dbus launcher:

$ dbus-launch qnearbyshare-receive

just make sure avahi-daemon is up & running:
$ sudo systemctl status avahi-daemon.service

if its not running, start it up by firing:
$ sudo systemctl start avahi-daemon.service

and u would likely want to have it running on bootup, so enable it by kicking-in that one:

$ sudo systemctl enable avahi-daemon.service

@vicr123
Copy link
Owner

vicr123 commented Sep 24, 2023

Hmm, I wonder why DBus isn't starting the daemon automatically. In theory, it should automatically start the daemon when it detects a call to the service.

@spaceserver
Copy link

Hmm, I wonder why DBus isn't starting the daemon automatically. In theory, it should automatically start the daemon when it detects a call to the service.

I had tested it again later some times.. always worked flawlessly by then - without having it to launch via dbus-launcher.. Maybe the necessary services just have to be started up while booting the OS. I had these problems only if i manually started the services prior to running qnearbyshare.. (i forgot to enable the services to start on boot when i tried to run it for the first few times)

best regards

@vicr123
Copy link
Owner

vicr123 commented Dec 3, 2023

It could be because Avahi wasn't running maybe?

@ThatOneCalculator
Copy link

Can repro. Installed from AUR.

@vicr123
Copy link
Owner

vicr123 commented Dec 22, 2023

@ThatOneCalculator Hey, can you confirm that Avahi is running? You can check with systemctl status avahi-daemon

@ThatOneCalculator
Copy link

It is.

     Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; enabled; preset: disabled)
     Active: active (running) since Thu 2023-12-21 15:22:49 PST; 22h ago
TriggeredBy: ● avahi-daemon.socket
   Main PID: 763 (avahi-daemon)
     Status: "avahi-daemon 0.8 starting up."
      Tasks: 2 (limit: 38399)
     Memory: 1.7M (peak: 2.6M)
        CPU: 638ms
     CGroup: /system.slice/avahi-daemon.service
             ├─763 "avahi-daemon: running [mendocino.local]"
             └─790 "avahi-daemon: chroot helper"

@vicr123
Copy link
Owner

vicr123 commented Dec 24, 2023

As a workaround you can try starting /usr/lib/qnearbyshared manually in a terminal before you run any qnearbyshare commands. I'll have to have a look and see if I can figure out why it's not being started :(

@naleo
Copy link

naleo commented Mar 28, 2024

Is there any update on this? I am still having to manually start qnearbyshare before I can transfer files.

@vicr123
Copy link
Owner

vicr123 commented Mar 29, 2024

Hello, sorry, no updates as of yet. What distro are you running?

@naleo
Copy link

naleo commented Mar 29, 2024 via email

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

No branches or pull requests

6 participants