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

Fix for network validation issues on wireless (fixes Issue #4331) #5542

Closed
wants to merge 2 commits into from

Conversation

owenjm
Copy link

@owenjm owenjm commented Mar 22, 2023

There is an issue on linux (and maybe other OSes?) where reconnecting to the wifi network leads to a network validation error (unsure why, but previous code comments suggest it stems from an issue in QNAM). See Issue #4331 for more details and comments.

This PR uses the procedure from gui/networksettings.cpp to force a fresh connection attempt following a validation error. This ultimately leads to code in AccountState::checkConnectivity() that appears to have added to catch very similar issues (but was never reached in this error case).

@codecov
Copy link

codecov bot commented Mar 22, 2023

Codecov Report

Merging #5542 (56a9c52) into master (38ae92b) will decrease coverage by 0.35%.
The diff coverage is n/a.

❗ Current head 56a9c52 differs from pull request most recent head 9a55ef9. Consider uploading reports for the commit 9a55ef9 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5542      +/-   ##
==========================================
- Coverage   59.28%   58.94%   -0.35%     
==========================================
  Files         143      143              
  Lines       18445    18314     -131     
==========================================
- Hits        10936    10795     -141     
- Misses       7509     7519      +10     

see 24 files with indirect coverage changes

Copy link
Collaborator

@claucambra claucambra left a comment

Choose a reason for hiding this comment

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

Small nitpick, but otherwise looks ok :)

src/gui/creds/webflowcredentials.cpp Outdated Show resolved Hide resolved
@EmixamPP
Copy link

EmixamPP commented Apr 3, 2023

This fix solved the problem for me too

@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-5542-9a55ef9d47ea9ceb4139afaec62db4c366a299b0-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.

Comment on lines +231 to +234
const auto accounts = AccountManager::instance()->accounts();
for (auto account : accounts) {
account->freshConnectionAttempt();
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

should you not call this only if the error is related to network issues ?
for example, imagine the desktop client doing a get request that will return a 404 result code, you do nto want to execute freshConnectionAttempt() after a 404

an easy way to spot the issue is to have a client wihtout end-to-end encryption enabled but a server with the app installed and enabled

then if you open the settings dialog, we check if the server has a public end-to-end encryption key, gets a 404 and disconnects the session turning the tray icon to the disconnected state for some time before turning connected again

second thing is that most probably such a fix would be needed for all credentials classes not only when using the web flow v2 related code (i.e. this WebFlowCredentials class) but also other authentication methods

@timinator2020
Copy link

Do you have any estimation of which client version this will make it into? I have this problem on all of my Windows 10 and Linux Mint clients.

@Svampebob1
Copy link

Hi. I also have this issue and are hoping for a fix soon.

@bobbles911
Copy link

This fixes for me. Please include it as it's kind of broken without. Who wants a sync tool that constantly goes offline?!

@Rello
Copy link
Contributor

Rello commented Dec 20, 2024

Hello,

Thank you for your contribution to the Desktop Client with this pull request.
We are closing this request as it is outdated, no longer relevant (e.g., due to Qt 6), or does not align with the current roadmap.

We truly value your support and hope to see more contributions from you in the future!

Best regards,
Nextcloud Desktop Team

@Rello Rello closed this Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants