FoldingAtHome / fah-client-bastet

Folding@home client, code named Bastet
GNU General Public License v3.0
74 stars 13 forks source link

Make machine/account auto-linking clearer #258

Closed muziqaz closed 4 months ago

muziqaz commented 4 months ago

I just noticed that my Debian box is requesting CPU WUs as anonymous: 11:45:02:I1:WU4:Requesting WU assignment for user Anonymous team 0 I am logged into my fah account. And fahclient continues requesting new WUs as anonymous. p18803 (1, 240, 286) is reported by https://apps.foldingathome.org/wu#project=18803&run=1&clone=240&gen=286 as completed by Anonymous even though I completed this WU. I have another WU folding right now, which was requested as Anonymous, too. When I installed fahclient, before I started folding on it, I logged in to my account. I clicked on my account icon, and I see all my info filled in: username, team, passkey, node (as node1), token, plus all historic machines used before are listed, too. Question is, why this is happening, and how one fixes it.

Unfortunately, I am folding huge WU right now, which will take another 8 hours to finish, so even if I try anything, I won't know if this has been fixed. Latest v8 version (not aware of any recent alphas) fahclient was installed couple of days ago to test DNS issue someone else had in here

jcoffland commented 4 months ago

Please provide the log file from the misbehaving machine. Make sure to include the head of the log.

muziqaz commented 4 months ago

fah-client logs.tar.gz

Please, see attached. I archived all 3 txt files which were in /var/log/fah-client

jcoffland commented 4 months ago

This machine with ID dd9zBoBorcZt0F5P5lx9xftfw5xo8rfAczGYMzw15lo is not associated with any F@H accounts. You have to either manually link it to an account using the account-token option or open up a browser on the same machine and log in to your account. The later should auto link the local client to the account.

However, if you delete the local client's database either manually or by doing a uninstall with the purge option then the client will get a new F@H ID not associated with any accounts and will by default fold anonymously.

muziqaz commented 4 months ago

Wait wait wait. am I missing something here? Shouldn't fah client associate that machine/OS with the account I logged in before folding on that machine? Isn't the point of "global" account that user just logs in, starts folding and starts collecting points under that account username?

What about a completely new user? they create new account start folding, and fahclient decides not to associate that machine to that new account and person is unknowingly folding for Anonymous team 0

jcoffland commented 4 months ago

The machine ID can change if you wipe the client data.

muziqaz commented 4 months ago

So what does new user need to do in order for them to fold under their newly created account name? In my case there is an issue with fahclient, which does not associate my new machine with my account. I don't think this needs to be left as invalid issue and then start suggesting wiping FAH data, even though user just installed their fahclient.

kbernhagen commented 4 months ago

Web Control will show the local client whether or not it is associated with the logged in account.

By my understanding, the act of logging in with an unlinked client will cause it to be linked to the account you just logged into.

To change the account linking, you need to use the account settings page. From there you can link and unlink clients (machines).

muziqaz commented 4 months ago

My understanding would be the same, but yet here we are. What is being taken into account when machine ID is generated? Is any of the hardware taken into account? Or does fahclient simply sees a new client running and just generates new machine ID to that fahclient.

jcoffland commented 4 months ago

I don't get the problem. Do you think you should be able to wipe out all of the client's data and it should still know how to connect to your account?

kbernhagen commented 4 months ago

A new ID is generated if there is none, or if a change in hardware ID is detected. Hardware ID would normally only change if the data directory is transferred to another machine or container.

muziqaz commented 4 months ago

What is the point of account and passkey then if user, who formatted their old PC, log in to their account from newly installed OS, thinking that logging into account will allow to continue folding under same name. Ok here is the scenario: I have V8 on windows PC. That computer crashes takes the whole thing with it. I decide to go with Linux, install fahclient, log in, and my new fahclient install is no longer linked with the account, even though fahclient tells me nothing of the kind. Again, what is the point of passkey and account itself if the user has to still back up their original fahclient data, just in case they want to fold from another machine while original fahclient has been wiped? And why is fahclient not linking new fahclient to the account automatically? Even v7 data backup was not required as long as you knew your passkey and username and the team you are good to go. V8 account thingy provides all that info, it has my passkey, my username and my team in my account page on a new client, which now is not linked to that account just because new machine ID has been generated :/

muziqaz commented 4 months ago

We at least need a notification, that, hey do you want to link this client to your account if automatic linking is not an option.

muziqaz commented 4 months ago

How do I know that I linked my machine is to the account? When I click a little chain icon in Account Settings page nothing happens on that page. Ah, except on fahlog page it states that account is linked. Again, it would be nice to have some sort of visual indicator that my linking action was successful.

kbernhagen commented 4 months ago

I agree it needs to be obvious if the local machine is not linked to the logged in account.

Were you already logged into your account in web control before you installed the client?

kbernhagen commented 4 months ago

I think the account settings page doesn’t always update when changes are made to linking and names.

a browser reload should show the current state. If so, this is a bug.

muziqaz commented 4 months ago

So, when I booted in to my Debian install, I couldn't remember if I had v8 previously installed or not, so I did launch web control to quickly double check (I had no previous installation). Though I did not log in at that moment yet. Then I downloaded v8, installed it. Logged into my account, waited for like 5-10 second, page reloaded with client version and available controls. Then I fiddled with some GPU stuff, restarted the PC, and started folding

muziqaz commented 4 months ago

An update: yesterday I linked he client to the account mid WU. WU returned as finished by Anonymous. I downloaded a new WU, this time it is mentioning that I downloaded it for my team. Do I need to create a request for client to auto link to an account, though I cannot believe I would need to even ask for this, this should be by default, I mean if a user logged in with certain account with new client, it is pretty obvious that user wants to fold under that account with that client, no?

jcoffland commented 4 months ago

The client already auto links to an account but it cannot do this unless you login and connect to it with your browser one time.

It looks to me like you reinstalled the client and forgot to connect it to your account via the browser. This is a lot of time spent messaging back and forth for such a simple thing.

The only useful information I've gotten out of this is that the Web Control could make it more obvious when a client is not linked to an account and when the auto linking happens.

muziqaz commented 4 months ago

As I said, I installed the fahclient, logged in to my account and then started folding. If you think that this is out of ordinary execution from people who want to fold, you have a shocker coming in the future. One would assume that fahclient would link up with the account which I just logged into without user intervention or bother. Or do you expect every user to go into Settings and start checking of the client they just downloaded is even folding for their team? Yes, there is a lot of back and forth, because you seem to brush it off by assuming I done something out of the ordinary, yet all I've done is simply started folding, as would any other user do.

jcoffland commented 4 months ago

Your log files do not show any interaction with Web Control.

muziqaz commented 4 months ago

So I am imagining things when I say that I downloaded fahclient.deb, installed it, logged in to my account started folding? I've been with fah since the beginning of time, I know the sequence of things to do to get folding under my own name and team. Remember our push for "start fahclient in paused state"? Yeah, this is one of the reasons, why we pushed for this, to be able to configure the client before it starts folding for Anonymous team 0. If fahlog is not reflecting these activities, there is another data point which needs to be looked at. Why is it not recording my log in before start folding?

jcoffland commented 4 months ago

Provide evidence.

muziqaz commented 4 months ago

I'm not sure if I would be able to reproduce this on regular basis. I tried on various different Linux distros, some inside VMs. All of them either link the client straight away or manage to do it after a little while. I have a video of one instance where non VM Kubuntu linking was very delayed, to the point of me managing to download a WU under Anonymous. Right after I downloaded that WU, client got linked. No idea why client showed two identical machines in the settings. https://www.youtube.com/watch?v=tbmy8HXw1Ws While I can spend the rest of my holidays trying different instances of distros to try and replicate this without much of the success, I think we can agree that some sort of pop up or message needs to inform a user in case linking fails, or does not happen at all for some reason.

jcoffland commented 4 months ago

The next release will have a few changes:

  1. Web Control will show Unlinked in orange on the machine view if the machine is not linked to the logged in account.
  2. A dialog will popup when auto-linking occurs explaining what just happened.
jcoffland commented 4 months ago

Completed in v8.4.0 alpha.

muziqaz commented 4 months ago

8 4

pop up works. Just wording is a bit confusing. This is on Kubuntu, installed over v8.3.18

jcoffland commented 4 months ago

Wording updated.

kbernhagen commented 4 months ago

I got the linked pop up on my phone, which has no local client.

jcoffland commented 4 months ago

Should be fixed now.