Martichou / rquickshare

Rust implementation of NearbyShare/QuickShare from Android for Linux.
GNU General Public License v3.0
826 stars 16 forks source link

bug: open button borked #88

Open kazmath opened 1 month ago

kazmath commented 1 month ago

First of all, thanks for the app, I've been searching for a quickshare for linux for a few months now and this is just perfect.

I've installed the appimage and everything else apart from the "open" button works flawlessly, so I can't click it to open links, which also don't open automatically when the sharing is done, or files.

Here's vue console shows when clicking the button in two different transfers: image

If I start it from terminal, similar messages show up as well. Here's full log from application start to a url being received and some button spamming at the end:

$ ~/Applications/r-quick-share_0.7.1_amd64.AppImage
Gtk-Message: 02:21:07.783: Failed to load module "xapp-gtk3-module"
2024-05-24T05:21:08Z  INFO rqs_lib: TcpListener on: 0.0.0.0:37601
2024-05-24T05:21:08Z  INFO rqs_lib::manager: TcpServer: service starting
2024-05-24T05:21:08Z  INFO rqs_lib::hdl::mdns: Broadcasting with: Kazuma-AN5
2024-05-24T05:21:08Z  INFO rqs_lib::hdl::ble: BleListener: service starting
2024-05-24T05:21:08Z  INFO rqs_lib::hdl::mdns: MDnsServer: service starting
2024-05-24T05:21:08Z ERROR mdns_sd::service_daemon: unregister: cannot find such service i0xccll8n14aaa._fc9f5ed42c8a._tcp.local.
Gtk-Message: 02:21:08.064: Failed to load module "xapp-gtk3-module"
2024-05-24T05:21:41Z  INFO rquickshare::cmds::change_visibility: change_visibility: Temporarily
2024-05-24T05:21:43Z  INFO rqs_lib::hdl::inbound: RemoteDeviceInfo: RemoteDeviceInfo { name: "smartphone de Kazuma", device_type: Phone }
2024-05-24T05:21:43Z  INFO rqs_lib::hdl::inbound: Pin code: Some("2897")
2024-05-24T05:21:43Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-05-24T05:21:43Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-05-24T05:21:43Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-05-24T05:21:43Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-05-24T05:21:43Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-05-24T05:21:43Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-05-24T05:21:43Z  INFO rqs_lib::hdl::inbound: Asking for user consent: TransferMetadata { id: "192.168.1.52:37738", destination: None, source: Some(RemoteDeviceInfo { name: "smartphone deKazuma", device_type: Phone }), files: None, pin_code: Some("2897"), text_description: Some("https://youtu.be/_8yP7wml4Qs"), text_payload: None, total_bytes: 0, ack_bytes: 0 }
2024-05-24T05:21:43Z  INFO rquickshare: rs2js_channelmessage: ChannelMessage { id: "192.168.1.52:37738", direction: LibToFront, action: None, rtype: Some(Inbound), state: Some(WaitingForUserConsent), meta: Some(TransferMetadata { id: "192.168.1.52:37738", destination: None, source: Some(RemoteDeviceInfo { name: "smartphone de Kazuma", device_type: Phone }), files: None, pin_code: Some("2897"), text_description: Some("https://youtu.be/_8yP7wml4Qs"), text_payload: None, total_bytes: 0, ack_bytes: 0 }) }
2024-05-24T05:21:48Z ERROR rqs_lib::hdl::inbound: Unhandled offline frame encrypted: OfflineFrame { version: Some(V1), v1: Some(V1Frame { r#type: Some(12), connection_request: None, connection_response: None, payload_transfer: None, bandwidth_upgrade_negotiation: None, keep_alive: None, disconnection: None, paired_key_encryption: None }) }
2024-05-24T05:21:48Z  INFO rquickshare::cmds::send_to_rs: send_to_rs: ChannelMessage { id: "192.168.1.52:37738", direction: FrontToLib, action: Some(AcceptTransfer), rtype: None, state: None,meta: None }
2024-05-24T05:21:48Z  INFO rquickshare: rs2js_channelmessage: ChannelMessage { id: "192.168.1.52:37738", direction: LibToFront, action: None, rtype: Some(Inbound), state: Some(ReceivingFiles), meta: Some(TransferMetadata { id: "192.168.1.52:37738", destination: None, source: Some(RemoteDeviceInfo { name: "smartphone de Kazuma", device_type: Phone }), files: None, pin_code: Some("2897"), text_description: Some("https://youtu.be/_8yP7wml4Qs"), text_payload: None, total_bytes: 0, ack_bytes: 0 }) }
2024-05-24T05:21:48Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-05-24T05:21:48Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-05-24T05:21:48Z  INFO rqs_lib::hdl::inbound: Unhandled connection state in process_transfer_setup: ReceivingFiles
2024-05-24T05:21:48Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-05-24T05:21:48Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-05-24T05:21:48Z  INFO rqs_lib::hdl::inbound: Transfer finished
2024-05-24T05:21:48Z ERROR rqs_lib::hdl::inbound: Cannot open URL: Launcher "xdg-open" "https://youtu.be/_8yP7wml4Qs" failed with ExitStatus(unix_wait_status(1024))
2024-05-24T05:21:48Z  INFO rquickshare: rs2js_channelmessage: ChannelMessage { id: "192.168.1.52:37738", direction: LibToFront, action: None, rtype: Some(Inbound), state: Some(Finished), meta: Some(TransferMetadata { id: "192.168.1.52:37738", destination: None, source: Some(RemoteDeviceInfo { name: "smartphone de Kazuma", device_type: Phone }), files: None, pin_code: Some("2897"),text_description: Some("https://youtu.be/_8yP7wml4Qs"), text_payload: Some("https://youtu.be/_8yP7wml4Qs"), total_bytes: 0, ack_bytes: 0 }) }
2024-05-24T05:21:56Z  INFO rquickshare::cmds::open_url: open: "https://youtu.be/_8yP7wml4Qs"
2024-05-24T05:21:58Z  INFO rquickshare::cmds::open_url: open: "https://youtu.be/_8yP7wml4Qs"
2024-05-24T05:21:59Z  INFO rquickshare::cmds::open_url: open: "https://youtu.be/_8yP7wml4Qs"
2024-05-24T05:21:59Z  INFO rquickshare::cmds::open_url: open: "https://youtu.be/_8yP7wml4Qs"
2024-05-24T05:21:59Z  INFO rquickshare::cmds::open_url: open: "https://youtu.be/_8yP7wml4Qs"
2024-05-24T05:21:59Z  INFO rquickshare::cmds::open_url: open: "https://youtu.be/_8yP7wml4Qs"
2024-05-24T05:21:59Z  INFO rquickshare::cmds::open_url: open: "https://youtu.be/_8yP7wml4Qs"
2024-05-24T05:21:59Z  INFO rquickshare::cmds::open_url: open: "https://youtu.be/_8yP7wml4Qs"
Martichou commented 1 month ago

What's your default browser?

kazmath commented 1 month ago

Firefox. The .deb version, not flatpak.

Martichou commented 1 week ago

May I ask you if defining Chrome as the default browser does fix the issue?

kazmath commented 1 week ago

I don't have Chrome installed, but I tried with Ungoogled Chromium (Flatpak) and it had the same result with the same errors in the terminal. So since the same thing happened with Firefox installed from apt and a Chromium-like browser installed from flatpak, I think the browser is not the issue.

Also, I don't think #91 is the same issue, since they can use the "open" button, it just uses the wrong app for the protocol.

kazmath commented 1 week ago

I just tested with the recently released 0.8.2 version and the same behavior happens.

Martichou commented 1 week ago

Can you check:

$ xdg-settings --list
$ xdg-settings get default-web-browser
jon-dez commented 1 week ago

This is what I get, which doesn't appear abnormal. I'm sure #91 is a seperate issue.

xdg-settings --list

Known properties:
  default-url-scheme-handler    Default handler for URL scheme
  default-web-browser           Default web browser

xdg-settings get default-web-browser

org.mozilla.firefox.desktop
kazmath commented 1 week ago

Basically the same for me (dw about how prepending $ to the commands work, I used the same commands): image