Page 1 of 2

Mac OS getting HTTP_BAD_REQUST

Posted: Fri Mar 01, 2024 8:30 pm
by speed2048
05:20:11:I3:Connecting to api.foldingathome.org:443
05:20:11:I1:OUT7:> PUT https://api.foldingathome.org/machine/(largeestring HTTP/1.1
05:20:11:I1:OUT7:< HTTP/1.1 400 HTTP_BAD_REQUEST
05:20:11:E :OUT7:HTTP_BAD_REQUEST:

Re: Mac OS getting HTTP_BAD_REQUST

Posted: Fri Mar 01, 2024 10:03 pm
by calxalot
Don’t know what causes this.
I would try
- restart client
- logout of account, then login again
- unlink machine from account, then re-add to account

Re: Mac OS getting HTTP_BAD_REQUST

Posted: Sat Mar 02, 2024 12:31 am
by speed2048
I tried restarting and logging out and logging back in again with no luck.

I cannot unlink machine from account as the link is greyed out. Its a local machine and not remote. Also the machine text label has a red border around it.

Re: Mac OS getting HTTP_BAD_REQUST

Posted: Sat Mar 02, 2024 5:20 am
by calxalot
What version of macOS?
What web browser?
Are you comfortable with the command line and have python3 installed?

Re: Mac OS getting HTTP_BAD_REQUST

Posted: Sat Mar 02, 2024 6:44 am
by speed2048
Mac OS - Sonoma 14.3.1

I have tried chrome and MS Edge - same results.
Using safari does not connect to local fah client.

Yes I have python3 installed and comfortable using command line interface.

Re: Mac OS getting HTTP_BAD_REQUST

Posted: Sat Mar 02, 2024 7:40 am
by calxalot
Please try the following to relink to your account.
Adjust commands as needed if you don't use pip install --user or have PATH set appropriately.

Code: Select all

pip3 install lufah --user
Assuming local client, use

Code: Select all

"$(python3 -m site --user-base)/bin"/lufah . unlink-account
Open Web Control Account page.
Click link icon next to local machine.

It should link in a few seconds.
If not, try reloading web page.
If it still doesn't link, try restarting client.

Code: Select all

"$(python3 -m site --user-base)/bin"/lufah . stop
"$(python3 -m site --user-base)/bin"/lufah . start

Re: Mac OS getting HTTP_BAD_REQUST

Posted: Sat Mar 02, 2024 10:13 am
by calxalot
The machine name is outlined in red when it is not considered a valid name.
I think it can only be letters, numbers, dash, underscore.

Re: Mac OS getting HTTP_BAD_REQUST

Posted: Sat Mar 02, 2024 6:19 pm
by speed2048
The mac os hostname is wks-mac-mini-007.local and that was assigned by the os and appears I cannot remove the .local suffix.

Re: Mac OS getting HTTP_BAD_REQUST

Posted: Sat Mar 02, 2024 6:33 pm
by speed2048
Clarification I can change it in FAH client, cant easily change it from OS.

Once it was a valid name, I was able to link the machine name to the account and everything worked.

So it was the .local suffix causing this issue.

Thanks your for your help.

Re: Mac OS getting HTTP_BAD_REQUST

Posted: Sat Mar 02, 2024 8:32 pm
by calxalot
If you use “hostname” on the command line, do you get the .local suffix?

Re: Mac OS getting HTTP_BAD_REQUST

Posted: Sat Mar 02, 2024 9:16 pm
by speed2048
Yes.

Re: Mac OS getting HTTP_BAD_REQUST

Posted: Sun Mar 03, 2024 3:34 am
by calxalot

Re: Mac OS getting HTTP_BAD_REQUST

Posted: Sun Mar 03, 2024 4:12 am
by enroscado
speed2048 wrote: Sat Mar 02, 2024 6:33 pm Clarification I can change it in FAH client, cant easily change it from OS.

Once it was a valid name, I was able to link the machine name to the account and everything worked.

So it was the .local suffix causing this issue.

Thanks your for your help.
Having the same problem when trying to change the name. Can you share how did you manage to do it?

Re: Mac OS getting HTTP_BAD_REQUST

Posted: Sun Mar 03, 2024 7:44 am
by calxalot
Go to the bottom of
https://beta.foldingathome.org/account

The machine you need to rename will be outlined red.
Fix the name, click the save icon next to it, then click the link icon.

Re: Mac OS getting HTTP_BAD_REQUST

Posted: Sun Mar 03, 2024 8:05 am
by enroscado
Thank you calxalot.

Indeed, I can do that, but the "Save" button remains greyed out even after changing the name, therefore I can't save.

Let me know if I should post a video or series of screenshots to demonstrate.