-
-
Notifications
You must be signed in to change notification settings - Fork 438
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
[Feat] Offer option to upload logs to a pastebin #3873
Conversation
2ad4971
to
2ee9db3
Compare
src/frontend/screens/Settings/sections/LogSettings/components/UploadedLogFilesList/index.tsx
Outdated
Show resolved
Hide resolved
|
||
const formData = new FormData() | ||
formData.set('file', fileBlob, filename) | ||
formData.set('expires', '24') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
24hs sounds too short for me, I can imagine some users sharing a log during a weekend and nobody sees it and expires
it should be easy to re-upload though, so maybe this is not really a problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly it is rather uncommon for support requests to go unnoticed for 24 hours (and if that does happen, as you said, reuploading the file isn't hard to do)
We can easily change this if this does end up being a problem, I'd like to take the safer (in terms of server bandwidth used) route here first
2ee9db3
to
d031704
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me, I tested with some logs and works fine
I left 2 minor style comments, not blockers though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh wait, now I'm getting an error when I try to delete a log file
(11:37:11) ERROR: [LogUploader]: Failed to send data to 0x0.st: TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:12293:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at AS (/home/ariel/dev/oss/HeroicGamesLauncher/src/backend/logger/uploader.ts:114:20)
at WebContents.<anonymous> (node:electron/js2c/browser_init:2:79404) {
cause: AggregateError:
at internalConnectMultiple (node:net:1114:18)
at internalConnectMultiple (node:net:1177:5)
at Timeout.internalConnectMultipleTimeout (node:net:1687:3)
at listOnTimeout (node:internal/timers:575:11)
at processTimers (node:internal/timers:514:7) {
code: 'ETIMEDOUT',
[errors]: [ [Error], [Error] ]
}
}
also sometimes when I try to upload a log file (same timeout error, but it's weird, I can access those urls fine)
(11:39:35) ERROR: [LogUploader]: Failed to send data to 0x0.st: TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:12293:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at $S (/home/ariel/dev/oss/HeroicGamesLauncher/src/backend/logger/uploader.ts:72:20)
at WebContents.<anonymous> (node:electron/js2c/browser_init:2:79404) {
cause: AggregateError:
at internalConnectMultiple (node:net:1114:18)
at internalConnectMultiple (node:net:1177:5)
at Timeout.internalConnectMultipleTimeout (node:net:1687:3)
at listOnTimeout (node:internal/timers:575:11)
at processTimers (node:internal/timers:514:7) {
code: 'ETIMEDOUT',
[errors]: [ [Error], [Error] ]
}
}
Could it be some kind of rate limiter for uploading/deleting? cause opening the log links works fine, but fails to upload/delete after using those things for a bit
d031704
to
515f683
Compare
I can't reproduce these errors. Are you still getting them? Looks like your connection to the site is failing, which wouldn't be "our fault" anyways |
I can't reproduced the error today either. No idea what happened there (I thought it was maybe some rate limiter from that site, but I clicked upload and delete many times now and no problems) |
When displaying a game log, a new button to directly upload the log file to a pastebin service is now presented. This button will upload the log file to `https://0x0.st` and copy the resulting sharable URL into the user's clipboard. To alleviate privacy concerns, logs are (1) only kept valid for 24 hours and (2) can be deleted from within Heroic: In the "Settings" -> "Logs" tab specifically, a new button to view uploaded logs was added. It lists all logs which are still valid, the user can then open the sharable URL again or request file deletion Behind the scenes, two new Zustand states have been added: - `useGlobalState`, which is my attempt at slowly migrating the current Global State to Zustand. It holds global information (specifically, whether the log file upload dialog or the upload list dialog are open) - `useUploadedLogFiles`, holding data on uploaded log files. The Backend pushes updates to this using two new Frontend messages
515f683
to
d1fd34a
Compare
When displaying a game log, a new button to directly upload the log file to a pastebin service is now presented. This button will upload the log file to
https://0x0.st
and copy the resulting sharable URL into the user's clipboard.To alleviate privacy concerns, logs are (1) only kept valid for 24 hours and (2) can be deleted from within Heroic:
In the "Settings" -> "Logs" tab specifically, a new button to view uploaded logs was added. It lists all logs which are still valid, the user can then open the sharable URL again or request file deletion
Behind the scenes, two new Zustand states have been added:
useGlobalState
, which is my attempt at slowly migrating the current Global State to Zustand. It holds global information (specifically, whether the log file upload dialog or the upload list dialog are open)useUploadedLogFiles
, holding data on uploaded log files. The Backend pushes updates to this using two new Frontend messagesCloses #3863
Use the following Checklist if you have changed something on the Backend or Frontend: