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

Feature enabling log file upload to mediators #5953

Merged
merged 4 commits into from Jan 12, 2022
Merged

Feature enabling log file upload to mediators #5953

merged 4 commits into from Jan 12, 2022

Conversation

ghost
Copy link

@ghost ghost commented Jan 6, 2022

Closes #5906
@pazza83 asked for the process of submitting log files to be made easier. The solution presented here is basically a click and send option to transmit appropriate log files to a dispute's Mediator.

  • From dispute chat there is a button Send Log Files.
  • A popup is shown explaining the procedure with a progress bar.
  • User presses Send.
  • Logs which reference the tradeId are packaged in a zip file.
  • The zip file is sent to the Mediator.
  • User is notified that the upload is complete, or if there was an error.
  • A message in dispute chat alerts the Mediator that log files have been received.

Screenshots:

image

image

Mediator notification:

image

Mediator's received logs:

image


Implementation notes:

  • Log files (even compressed) are larger than the max network packet size, so the file is transmitted in a series of blocks, each ack'd by the receiver and assembled into the received zip file.
  • The zip file is named with the tradeId, the trader's role and a datestamp. This makes it easier to organize received files.
  • Within the zip, logs are created under a subdirectory named with the tradeId and trader's role; again this is to make it easier to organize the logs when support personnel extract them from the zip.

Testing notes:

  • In regtest, there are mediator and trader sessions. Start a trade, open a dispute, go to dispute chat and press [send logs].
  • Tested in Tor/mainnet environment by modifying the code to send logs to an alternate onion address.
  • The zip file handling code may have unforseen issues on different platforms. I have yet to verify in Windows or MacOS.
  • [edit]: Tested on Windows -> 3ea1543

@ghost ghost marked this pull request as ready for review January 8, 2022 02:46
@pazza83
Copy link

pazza83 commented Jan 8, 2022

Hi @jmacxx looks great. I think this will be really useful.

Please can you send a screenshot of the initial dispute screen for the user where the button Send Log Files is present.

Please can you let me know:

  • Will this also be present on arbitrator chat (this was not requested but I think it would be useful)
  • Will this send all log files of the user? If so do you have an idea of the time it would take for a user with lots of log files?
  • When the Send Log screen gets to 100% is there anything to indicate it is complete eg a popup etc?

@ghost
Copy link
Author

ghost commented Jan 9, 2022

send a screenshot of the initial dispute screen for the user where the button Send Log Files is present.

image

Will this also be present on arbitrator chat (this was not requested but I think it would be useful)

Not at the moment, but if this feature is successful it should be easy enough to enable for the arbitrator. I need to think about that a bit..

Will this send all log files of the user? If so do you have an idea of the time it would take for a user with lots of log files?

Log files referencing the tradeId will be added to the zip archive and sent. Tests on Tor have been in the order of a 1.5 minutes for 6 log files (zip size 7Mb). Most disputes are likely to only include a couple of log files and that takes about 30 seconds.

When the Send Log screen gets to 100% is there anything to indicate it is complete eg a popup etc?

Yes, see screenshot ->

image

@ripcurlx ripcurlx added this to the v1.8.1 milestone Jan 10, 2022
@ripcurlx
Copy link
Contributor

@jmacxx I just tried to send my log files on macOS on Regtest with following exception:

Jän.-11 12:22:59.135 [JavaFX Application Thread] ERROR bisq.common.setup.CommonSetup: Uncaught Exception from thread JavaFX Application Thread 
Jän.-11 12:22:59.136 [JavaFX Application Thread] ERROR bisq.common.setup.CommonSetup: throwableMessage= Illegal character in opaque part at index 48: jar:file:////Users/christoph/Library/Application Support/bisq-BTC_REGTEST_Alice_dao/0699932_BUYER_MAKER_20220111_122258.zip 
Jän.-11 12:22:59.136 [JavaFX Application Thread] ERROR bisq.common.setup.CommonSetup: throwableClass= class java.lang.IllegalArgumentException 
Jän.-11 12:22:59.144 [JavaFX Application Thread] ERROR bisq.common.setup.CommonSetup: Stack trace:
java.lang.IllegalArgumentException: Illegal character in opaque part at index 48: jar:file:////Users/christoph/Library/Application Support/bisq-BTC_REGTEST_Alice_dao/0699932_BUYER_MAKER_20220111_122258.zip
	at java.base/java.net.URI.create(URI.java:906)
	at bisq.core.support.dispute.mediation.FileTransferSender.createZipFileToSend(FileTransferSender.java:69)
	at bisq.desktop.main.overlays.windows.SendLogFilesWindow.lambda$addContent$1(SendLogFilesWindow.java:163)
	at bisq.common.reactfx.FxTimer.lambda$restart$0(FxTimer.java:93)
	at com.sun.scenario.animation.shared.TimelineClipCore.visitKeyFrame(TimelineClipCore.java:239)
	at com.sun.scenario.animation.shared.TimelineClipCore.playTo(TimelineClipCore.java:180)

@ripcurlx
Copy link
Contributor

I've also did some minor clean-ups and color improvements as the blue border color for mediation/arbitration chats always hurts my eye.

Bildschirmfoto 2022-01-11 um 12 38 07
Bildschirmfoto 2022-01-11 um 12 38 12
Bildschirmfoto 2022-01-11 um 12 38 18
Bildschirmfoto 2022-01-11 um 12 38 25
Bildschirmfoto 2022-01-11 um 12 38 30
Bildschirmfoto 2022-01-11 um 12 38 38

@ripcurlx
Copy link
Contributor

ripcurlx commented Jan 11, 2022

java.lang.IllegalArgumentException: Illegal character in opaque part at i

I guess it is the path issue again we had for the block file loading already.

@ghost
Copy link
Author

ghost commented Jan 11, 2022

at index 48 -- it is complaining about the space in the file path, solution will likely be to enclose the path with single quotes. I'll try it out and report back.

@ghost
Copy link
Author

ghost commented Jan 12, 2022

Fixed by replacing any space with %20 in the file path.

Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK - Tested it on Regtest with macOS Moneterey

@bisq-github-admin-3
Copy link
Contributor

I'm still merging this PR although as Codacy has permission issues (again)

@bisq-github-admin-3 bisq-github-admin-3 merged commit ddead5e into bisq-network:master Jan 12, 2022
@ghost ghost mentioned this pull request Jan 20, 2022
@ghost ghost deleted the logs_upload branch October 18, 2023 16:03
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

Successfully merging this pull request may close these issues.

Make it easier for users to provide logs to mediators and support agents
3 participants