Skip to content

fix: network-manager was not listening to device changes #130

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

clotodex
Copy link
Contributor

Just noticed this while implementing the iwd branch. I guess this was not on purpose.

Copy link
Owner

@MalpenZibo MalpenZibo left a comment

Choose a reason for hiding this comment

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

Ups 😅

@MalpenZibo
Copy link
Owner

I make some tests. There's something strange. With this fix, something doesn't work well when I switch to a new Wi-Fi, and the system asks for the password. This event is triggered multiple times and asks for the password of the current wifi and for the new one.

I need to investigate more on this O.o sadly the network service is a mess 🥲

@clotodex
Copy link
Contributor Author

clotodex commented May 8, 2025

Without checking the code - I ran into a similar thing in IWD.
What happend for me: trying to connect WITH a password can trigger the underlying network to still ask for the password - which would immediately be resolved but STILL trigger a request message in the service code.
In your case specifically this might trigger a device state change but keep it in "needs auth" which triggers the message.
Probably some (print) debugging needed.
And then it obviously gets triggered again when it realizes it needs a password for the new network

This is surprising thought that that was NOT the case before.

@clotodex
Copy link
Contributor Author

I dont understand the failing CI. Running the same clippy command locally shows no issues.

@MalpenZibo
Copy link
Owner

I dont understand the failing CI. Running the same clippy command locally shows no issues.

It could be a different clippy version? Have you already tried with a rustup update?

@clotodex
Copy link
Contributor Author

It could be a different clippy version? Have you already tried with a rustup update?

Actually, given iwd merged, the whole fix needs to be ported to there anyways, let me give that a go to.
Did you get around testing further if this fix did not break anything else?

@MalpenZibo
Copy link
Owner

The only thing is the wifi password is requested twice.

@clotodex
Copy link
Contributor Author

That was (is) not the case with the version before?

@MalpenZibo
Copy link
Owner

The problem doesn't happen in the main version. With this branch, when I switch wifi networks, ashell requests the wifi password twice. I will do more tests to understand why

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.

2 participants