Martichou / rquickshare

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

bug: open button navigates to web browser's file system view #91

Open jon-dez opened 1 month ago

jon-dez commented 1 month ago

For example, an image was transferred:

image

Clicking "open" navigates to a new browser tab, in my instance a firefox tab showing the file system directory the file was saved to:

image

I think it would make more sense if the open button navigates to the built-in file explorer, with the transferred file being highlighted (Show in folder). Another thing that would make sense would be to open the file directly (Open / View).

Also to make this a little more convenient for the end user it should display the file name also:

Received file
FILE.ext
Saved to DIRECTORY

Current:

Received
Saved to DIRECTORY
Martichou commented 1 week ago

I guess this is a duplicated of https://github.com/Martichou/rquickshare/issues/88

jon-dez commented 1 week ago

@Martichou I looked at #88 and I'm sure this is not a duplicate of that issue. Could you reopen this one?

Martichou commented 1 week ago

Indeed, my bad. Can I ask what was the name of the payload that triggered this issue?

Do you have the issue with EVERY payload?

jon-dez commented 1 week ago

I tried to reproduce this bug, but now it seems that the open button doesn't do anything anymore for me. To be fair I did recently update from Fedora 39 to Fedora 40 so that may have something to do with it. I am running the AppImage by the way. I ran the app image from the command line in order to see logs, but I didn't see any relevent errors in response to the open button in the output. This is part of the output from a payload I sent.

2024-06-20T11:37:04Z  INFO rquickshare::cmds::open_url: open: "https://github.com/Martichou/rquickshare"

It didn't trigger the web browser to open though.

jon-dez commented 1 week ago

Also, I didn't see any error output in web console inside the application.

Martichou commented 1 week ago

Can you give me the full log from the consol when setting the log level to trace? Like so https://github.com/Martichou/rquickshare/pull/104#issuecomment-2179485060.

jon-dez commented 1 week ago

Here you go:

$ ./r-quick-share_0.8.2_amd64.AppImage 
set_up_logging: level from config: "trace"
set_up_logging: level: Trace
2024-06-21T03:07:13Z DEBUG rquickshare::logger: Finished setting up logging! yay!
2024-06-21T03:07:13Z DEBUG rquickshare: Starting setup of RQuickShare app
2024-06-21T03:07:13Z TRACE rquickshare: Beginning of RQS start
2024-06-21T03:07:13Z  INFO rqs_lib: TcpListener on: 0.0.0.0:42541
2024-06-21T03:07:13Z  INFO rqs_lib::manager: TcpServer: service starting
2024-06-21T03:07:13Z  INFO rqs_lib::hdl::mdns: Broadcasting with: jon-dez-fed
2024-06-21T03:07:13Z  INFO rqs_lib::hdl::ble: BleListener: service starting
2024-06-21T03:07:13Z  INFO rqs_lib::hdl::mdns: MDnsServer: service starting
2024-06-21T03:07:13Z DEBUG rqs_lib::hdl::mdns: MDnsServer: visibility changed: Visible

** (r-quick-share:3107831): WARNING **: 23:07:38.984: atk-bridge: get_device_events_reply: unknown signature
2024-06-21T03:12:29Z DEBUG rqs_lib::hdl::ble: BleListener: A device (hci0/dev_D4_3A_2C_64_EA_0B) is sharing ({0000fe2c-0000-1000-8000-00805f9b34fb: [252, 18, 142, 5, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 159, 75, 200, 67, 217, 226, 51, 93, 0]}) nearby
2024-06-21T03:12:29Z DEBUG rqs_lib::hdl::mdns: MDnsServer: ble_receiver: got event
2024-06-21T03:12:29Z TRACE rquickshare: Tauri: ble received: Visible
2024-06-21T03:12:38Z TRACE rqs_lib::manager: TcpServer: new client: 192.168.1.200:50542
2024-06-21T03:12:39Z DEBUG rqs_lib::hdl::inbound: Handling State::Initial frame
2024-06-21T03:12:39Z  INFO rqs_lib::hdl::inbound: RemoteDeviceInfo: RemoteDeviceInfo { name: "Jonathan's Pixel 8 Pro", device_type: Phone }
2024-06-21T03:12:39Z DEBUG rqs_lib::hdl::inbound: Handling State::ReceivedConnectionRequest frame
2024-06-21T03:12:39Z TRACE rqs_lib::hdl::inbound: CipherCommitment: P256Sha512
2024-06-21T03:12:39Z DEBUG rqs_lib::hdl::inbound: Handling State::SentUkeyServerInit frame
2024-06-21T03:12:39Z  INFO rqs_lib::hdl::inbound: Pin code: Some("7844")
2024-06-21T03:12:39Z DEBUG rqs_lib::hdl::inbound: Handling State::ReceivedUkeyClientFinish frame
2024-06-21T03:12:39Z DEBUG rqs_lib::hdl::inbound: Handling SecureMessage frame
2024-06-21T03:12:39Z TRACE rqs_lib::hdl::inbound: Received FrameType::PayloadTransfer
2024-06-21T03:12:39Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-06-21T03:12:39Z DEBUG rqs_lib::hdl::inbound: Handling SecureMessage frame
2024-06-21T03:12:39Z TRACE rqs_lib::hdl::inbound: Received FrameType::PayloadTransfer
2024-06-21T03:12:39Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-06-21T03:12:39Z DEBUG rqs_lib::hdl::inbound: Chunk flags & 1 == 1 ?? End of data ??
2024-06-21T03:12:39Z DEBUG rqs_lib::hdl::inbound: Processing State::SentConnectionResponse
2024-06-21T03:12:39Z DEBUG rqs_lib::hdl::inbound: Handling SecureMessage frame
2024-06-21T03:12:39Z TRACE rqs_lib::hdl::inbound: Received FrameType::PayloadTransfer
2024-06-21T03:12:39Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-06-21T03:12:39Z DEBUG rqs_lib::hdl::inbound: Handling SecureMessage frame
2024-06-21T03:12:39Z TRACE rqs_lib::hdl::inbound: Received FrameType::PayloadTransfer
2024-06-21T03:12:39Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-06-21T03:12:39Z DEBUG rqs_lib::hdl::inbound: Chunk flags & 1 == 1 ?? End of data ??
2024-06-21T03:12:39Z DEBUG rqs_lib::hdl::inbound: Processing State::SentPairedKeyResult
2024-06-21T03:12:40Z DEBUG rqs_lib::hdl::inbound: Handling SecureMessage frame
2024-06-21T03:12:40Z TRACE rqs_lib::hdl::inbound: Received FrameType::PayloadTransfer
2024-06-21T03:12:40Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-06-21T03:12:40Z DEBUG rqs_lib::hdl::inbound: Handling SecureMessage frame
2024-06-21T03:12:40Z TRACE rqs_lib::hdl::inbound: Received FrameType::PayloadTransfer
2024-06-21T03:12:40Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-06-21T03:12:40Z DEBUG rqs_lib::hdl::inbound: Chunk flags & 1 == 1 ?? End of data ??
2024-06-21T03:12:40Z DEBUG rqs_lib::hdl::inbound: Processing State::ReceivedPairedKeyResult
2024-06-21T03:12:40Z TRACE rqs_lib::hdl::inbound: process_introduction: handling text_metadata
2024-06-21T03:12:40Z  INFO rqs_lib::hdl::inbound: Asking for user consent: TransferMetadata { id: "192.168.1.200:50542", destination: None, source: Some(RemoteDeviceInfo { name: "Jonathan's Pixel 8 Pro", device_type: Phone }), files: None, pin_code: Some("7844"), text_description: Some("https://github.com/Martichou/rqu…"), text_payload: None, total_bytes: 0, ack_bytes: 0 }
2024-06-21T03:12:40Z TRACE rqs_lib::hdl::inbound: Sending msg into the channel
2024-06-21T03:12:40Z  INFO rquickshare: rs2js_channelmessage: ChannelMessage { id: "192.168.1.200:50542", direction: LibToFront, action: None, rtype: Some(Inbound), state: Some(WaitingForUserConsent), meta: Some(TransferMetadata { id: "192.168.1.200:50542", destination: None, source: Some(RemoteDeviceInfo { name: "Jonathan's Pixel 8 Pro", device_type: Phone }), files: None, pin_code: Some("7844"), text_description: Some("https://github.com/Martichou/rqu…"), text_payload: None, total_bytes: 0, ack_bytes: 0 }) }
2024-06-21T03:12:44Z  INFO rquickshare::cmds::send_to_rs: send_to_rs: ChannelMessage { id: "192.168.1.200:50542", direction: FrontToLib, action: Some(AcceptTransfer), rtype: None, state: None, meta: None }
2024-06-21T03:12:44Z DEBUG rqs_lib::hdl::inbound: inbound: got: ChannelMessage { id: "192.168.1.200:50542", direction: FrontToLib, action: Some(AcceptTransfer), rtype: None, state: None, meta: None }
2024-06-21T03:12:44Z TRACE rqs_lib::hdl::inbound: Sending msg into the channel
2024-06-21T03:12:44Z  INFO rquickshare: rs2js_channelmessage: ChannelMessage { id: "192.168.1.200:50542", direction: LibToFront, action: None, rtype: Some(Inbound), state: Some(ReceivingFiles), meta: Some(TransferMetadata { id: "192.168.1.200:50542", destination: None, source: Some(RemoteDeviceInfo { name: "Jonathan's Pixel 8 Pro", device_type: Phone }), files: None, pin_code: Some("7844"), text_description: Some("https://github.com/Martichou/rqu…"), text_payload: None, total_bytes: 0, ack_bytes: 0 }) }
2024-06-21T03:12:44Z DEBUG rqs_lib::hdl::inbound: Handling SecureMessage frame
2024-06-21T03:12:44Z 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-06-21T03:12:44Z DEBUG rqs_lib::hdl::inbound: Handling SecureMessage frame
2024-06-21T03:12:44Z TRACE rqs_lib::hdl::inbound: Received FrameType::PayloadTransfer
2024-06-21T03:12:44Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-06-21T03:12:44Z DEBUG rqs_lib::hdl::inbound: Handling SecureMessage frame
2024-06-21T03:12:44Z TRACE rqs_lib::hdl::inbound: Received FrameType::PayloadTransfer
2024-06-21T03:12:44Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-06-21T03:12:44Z DEBUG rqs_lib::hdl::inbound: Chunk flags & 1 == 1 ?? End of data ??
2024-06-21T03:12:44Z  INFO rqs_lib::hdl::inbound: Unhandled connection state in process_transfer_setup: ReceivingFiles
2024-06-21T03:12:44Z DEBUG rqs_lib::hdl::inbound: Handling SecureMessage frame
2024-06-21T03:12:44Z TRACE rqs_lib::hdl::inbound: Received FrameType::PayloadTransfer
2024-06-21T03:12:44Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-06-21T03:12:44Z DEBUG rqs_lib::hdl::inbound: Handling SecureMessage frame
2024-06-21T03:12:44Z TRACE rqs_lib::hdl::inbound: Received FrameType::PayloadTransfer
2024-06-21T03:12:44Z  INFO rqs_lib::hdl::inbound: Processing PayloadType::Bytes
2024-06-21T03:12:44Z DEBUG rqs_lib::hdl::inbound: Chunk flags & 1 == 1 ?? End of data ??
2024-06-21T03:12:44Z  INFO rqs_lib::hdl::inbound: Transfer finished
2024-06-21T03:12:44Z TRACE rqs_lib::hdl::inbound: Sending msg into the channel
2024-06-21T03:12:44Z  INFO rquickshare: rs2js_channelmessage: ChannelMessage { id: "192.168.1.200:50542", direction: LibToFront, action: None, rtype: Some(Inbound), state: Some(Finished), meta: Some(TransferMetadata { id: "192.168.1.200:50542", destination: None, source: Some(RemoteDeviceInfo { name: "Jonathan's Pixel 8 Pro", device_type: Phone }), files: None, pin_code: Some("7844"), text_description: Some("https://github.com/Martichou/rqu…"), text_payload: Some("https://github.com/Martichou/rquickshare"), total_bytes: 0, ack_bytes: 0 }) }
2024-06-21T03:12:46Z  INFO rquickshare::cmds::open_url: open: "https://github.com/Martichou/rquickshare"