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

Show more informative error message when VFS hydration fails. Displaya popup and put an error into activity list. More detailed logs. #6140

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

allexzander
Copy link
Contributor

@allexzander allexzander commented Oct 13, 2023

image

For #6132

@allexzander allexzander changed the title Show more informative error message when VFS hydration fails. Display… Show more informative error message when VFS hydration fails. Displaya popup and put an error into activity list. More detailed logs. Oct 13, 2023
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ clang-tidy found issue(s) with the introduced code (1/1)

src/libsync/vfs/cfapi/hydrationjob.h Outdated Show resolved Hide resolved
src/libsync/vfs/cfapi/hydrationjob.h Outdated Show resolved Hide resolved
src/libsync/vfs/cfapi/hydrationjob.h Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

Merging #6140 (727cd79) into master (8b0d6dc) will increase coverage by 0.19%.
Report is 2 commits behind head on master.
The diff coverage is 88.88%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6140      +/-   ##
==========================================
+ Coverage   60.55%   60.74%   +0.19%     
==========================================
  Files         145      145              
  Lines       18814    18829      +15     
==========================================
+ Hits        11393    11438      +45     
+ Misses       7421     7391      -30     
Files Coverage Δ
src/common/vfs.h 52.38% <ø> (ø)
src/libsync/vfs/cfapi/hydrationjob.h 0.00% <ø> (ø)
src/libsync/vfs/cfapi/vfs_cfapi.cpp 84.52% <100.00%> (+0.11%) ⬆️
src/libsync/vfs/cfapi/hydrationjob.cpp 53.65% <87.50%> (+2.09%) ⬆️

... and 8 files with indirect coverage changes

@allexzander allexzander marked this pull request as ready for review October 16, 2023 08:46
@allexzander allexzander force-pushed the feature/better-error-messages-for-vfs branch from a6f6896 to 0a12b77 Compare October 16, 2023 10:28
@allexzander allexzander force-pushed the feature/better-error-messages-for-vfs branch from 0a12b77 to 2237cac Compare October 16, 2023 10:29
@allexzander
Copy link
Contributor Author

@jancborchardt @nimishavijay
We need a way to provide error details when VFS files download files due to server error but it is not visible to the user what caused it.
I came up with an idea to show a popup and add an activity to the list.
Any ideas on how to improve it? Or is it OK this way already?

@nimishavijay
Copy link
Member

If I see this error are there any steps I can take to fix it? (change some settings, check network connection, etc). We can simplify the error message to something like

Error downloading [filename]
[Filename] could not be downloaded. Please [action] and try again.

                              [Cancel button] [Try again button]

@allexzander
Copy link
Contributor Author

If I see this error are there any steps I can take to fix it? (change some settings, check network connection, etc). We can simplify the error message to something like

Error downloading [filename]
[Filename] could not be downloaded. Please [action] and try again.

                              [Cancel button] [Try again button]

@nimishavijay No, the whole reason for this popup is for user to make a screenshot and let developers know about the exact issue. The problem is, when user has an issue with VFS like the one on the screenshot, it is a server side problem but it is being treated by a desktop client but from user’s perspective. Then user creates a bug report and quite often forgets to attach logs. Then in 24 hours logs are rotated and we can no longer tell what happened, which error came from server. Then it is impossible to investigate in case of random errors on the server. And we are receiving such a ticket but with just a screenshot and no logs or something. With this pop up we will see on a screenshot if this was a server issue (only then popup will show up) and then ask server engineers to investigate. Otherwise we already have a system popup from Windows VFS but it does not provide any details to what happened and if it was a server issue or not.

@nimishavijay
Copy link
Member

Ah okay understood, in that case we could show it under a "More details" section. Showing a technical error up front would be confusing to non-technical users, who are the majority. We could do something like this:

Error downloading [filename]
[Filename] could not be downloaded.
> More details

[Cancel button] [Try again button]

On clicking "More details" the detailed info with the error code will be shown

In the tray menu also could we show a [More info] button which then exposes the error codes? So something like Error downloading file [More details] and clicking on "More details" would show the error message below. What do you think? :)

@allexzander allexzander force-pushed the feature/better-error-messages-for-vfs branch from e6c8108 to 1a0ec01 Compare October 19, 2023 14:08
@allexzander
Copy link
Contributor Author

allexzander commented Oct 19, 2023

Ah okay understood, in that case we could show it under a "More details" section. Showing a technical error up front would be confusing to non-technical users, who are the majority. We could do something like this:

Error downloading [filename]
[Filename] could not be downloaded.
> More details

[Cancel button] [Try again button]

On clicking "More details" the detailed info with the error code will be shown

In the tray menu also could we show a [More info] button which then exposes the error codes? So something like Error downloading file [More details] and clicking on "More details" would show the error message below. What do you think? :)
@nimishavijay Retry and Cancel buttons are impossible to add in this dialog, as this is not something we can control. The Retry and Cancel is possible via OS in another dialog that gets displayed by Windows but with no control of what is displayed in it.

I've now changed the custom dialog to show the "> More details" button, kindly check if it is enough.

As for activity item with button, I've removed this from activity list completely, as adding a button requires quite some changes in activity list system and it is not required for this PR.

@allexzander allexzander reopened this Oct 19, 2023
Copy link
Member

@nimishavijay nimishavijay left a comment

Choose a reason for hiding this comment

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

Nice! Looks good :)

@allexzander allexzander force-pushed the feature/better-error-messages-for-vfs branch from 1a0ec01 to a6dfac1 Compare October 19, 2023 15:32
… a popup and put an error into activity list. More detailed logs.

Signed-off-by: alex-z <[email protected]>
@allexzander allexzander force-pushed the feature/better-error-messages-for-vfs branch from 772d8ae to 727cd79 Compare October 20, 2023 12:54
@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-6140-727cd797ffed0309669cd4f3a7e5fd17bcab3be7-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data.

@sonarcloud
Copy link

sonarcloud bot commented Oct 20, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 8 Code Smells

3.8% 3.8% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@allexzander allexzander merged commit c4c9709 into master Oct 20, 2023
11 of 14 checks passed
@allexzander allexzander deleted the feature/better-error-messages-for-vfs branch October 20, 2023 14:56
@allexzander
Copy link
Contributor Author

/backport to stable-3.10

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.

5 participants