brick icon indicating copy to clipboard operation
brick copied to clipboard

Authorization failed ERR_INVALID_RESPONSE/320

Open Artalus opened this issue 7 years ago • 9 comments

In logs:

getrlimit(RLIMIT_NOFILE) failed
[0903/103623:ERROR:auth_client.cc(144)] Failed to parse auth response
* Line 1, Column 1
  Syntax error: value, object or array expected.


[0903/103623:WARNING:auth_client.cc(153)] Auth failed (can't find status in response): {"success":true,"sessionId":"9nf9mee4dv8g9ihhp8l4qt7bs3","bitrixSessionId":"d39ef131b04ee64e22dcc8878461f557"}

Artalus avatar Sep 03 '18 07:09 Artalus

Hello! Yesterday (August 3, 2018) in the datacenter was an accident and there were problems with authorization on the portal. Today should work fine.

shurik2k5 avatar Sep 04 '18 10:09 shurik2k5

I do hope you meant September 3. I am having this issue since Friday, Aug 31, and it is still present. The authorization on our portal website works fine.

Artalus avatar Sep 04 '18 10:09 Artalus

Yes I mean September 3. Try remove file ~/.config/brick/accounts.json and add account again. If you copy account details from email - check no extra spaces in input fields.

shurik2k5 avatar Sep 04 '18 11:09 shurik2k5

Same.

[0904/145136:WARNING:auth_client.cc(153)] Auth failed (can't find status in response): {"success":false,"needOtp":true}

Looks suspiciously similar to #58 .

Artalus avatar Sep 04 '18 11:09 Artalus

I see in response "needOtp":true it's mean that you enable two factor authorization ( https://www.bitrix24.com/about/blogs/updates/how-to-activate-two-factor-authorization-for-your-bitrix24-account.php ) you need to disable it in setting on portal. If you need two factor authorization use passwords from bitrix24 otp application - https://play.google.com/store/apps/details?id=com.bitrixsoft.otp

shurik2k5 avatar Sep 04 '18 12:09 shurik2k5

Yes, I have two factor auth, and previously Brick asked me for OTP password right after I click "Add account". Now it just shows the error.

Artalus avatar Sep 04 '18 12:09 Artalus

Also if I simply enter incorrect username and password, I get almost the same Auth failed (can't find status in response): {"success":false}. Can it be that Bitrix has updated and doesn't send "expected" data anymore, making Brick obsolete?

Artalus avatar Sep 06 '18 08:09 Artalus

Okay, I've pulled brick sources and building it manually. It seems that {"success":false,"needOtp":true} is considered a bad JSON by JsonCPP, so it is considered an empty object without success field.

edit: byte-per-byte printing of response body shows that before { symbol, #123, there are three symbols #239 #187 #191 in the string. Which is, according to Wiki, is a UTF-8 Byte Order Mark.

Artalus avatar Sep 10 '18 11:09 Artalus

You can try new official bitrx24 Linux client (now beta) - https://www.bitrix24.ru/features/desktop.php (check for linux (beta)) Bitrix Disk work, multiaccount work, but the interface is based on xlib, as far as I understood

shurik2k5 avatar Oct 25 '18 15:10 shurik2k5