Since I moved my node from 1.03 to Nightly with 2.0-dev I can't publish from AndStatus while I can read my timelines and get notifications at the app.
Also if I try to re-authenticate my credentials in AndStatus it fails, but this is only for publishing by now.
I'm running nightly with apache and php 7.3.
Andstatus v53.02.
config.php only has as extra plugins StoreRemoteMedia, ModPlus and ActivityPub.
After trying to publish a new message from AndStatus I got 4 lines related in GS log.
2020-04-07 14:07:44 LOG_DEBUG: [gnusocial.villanos.net:21370.1bacc357 GET /api/account/rate_limit_status.json] action.php - User error '401' on 'apiaccountratelimitstatus': No ha sido posible autenticarte.
2020-04-07 14:08:16 LOG_DEBUG: [gnusocial.villanos.net:21550.8ca916ea GET /api/direct_messages.json?count=20&user_id=8885] action.php - User error '401' on 'apidirectmessage': No ha sido posible autenticarte.
2020-04-07 14:08:38 LOG_DEBUG: [gnusocial.villanos.net:21692.b98be38e POST /api/statuses/update.json] action.php - User error '401' on 'apistatusesupdate': No ha sido posible autenticarte.
2020-04-07 14:08:39 LOG_DEBUG: [gnusocial.villanos.net:21692.66ff9222 POST /api/statuses/update.json] action.php - User error '401' on 'apistatusesupdate': No ha sido posible autenticarte.
(*) No ha sido posible autenticarte = No possible to authenticate you
Did attached the file for that period.
In Andstatus I got this:
E; Post , foreground "Testing publishing from andstatus",
Created two minutes ago,
executed:1, last:two minutes ago, retriesLeft:9, error:Hard,
updateNote; content:'Testing publishing from andstatus',
Status code=UNAUTHORIZED; hard;
; statusLine:'HTTP/1.1 401 Unauthorized'; statusCode:UNAUTHORIZED (401); url:'https://gnusocial.villanos.net/api/statuses/update.json'; legacy HTTP; authenticated; posted:'{"status":"Testing publishing from andstatus","source":"AndStatus"}'; response:'{"error":"No ha sido posible…'; error='No ha sido posible autenticarte.',
CommandData:{command: update-status, account: coleviajes@gnusocial.villanos.net/GnuSocial "Testing publishing from andstatus", itemId: 63963, foreground, created:3 seconds ago, CommandResult:{error:Hard}}
Hi!
this came from AndStatus issues here
https://github.com/andstatus/andstatus/issues/520
Since I moved my node from 1.03 to Nightly with 2.0-dev I can't publish from AndStatus while I can read my timelines and get notifications at the app.
Also if I try to re-authenticate my credentials in AndStatus it fails, but this is only for publishing by now.
I'm running nightly with apache and php 7.3.
Andstatus v53.02.
config.php only has as extra plugins StoreRemoteMedia, ModPlus and ActivityPub.
After trying to publish a new message from AndStatus I got 4 lines related in GS log.
```
2020-04-07 14:07:44 LOG_DEBUG: [gnusocial.villanos.net:21370.1bacc357 GET /api/account/rate_limit_status.json] action.php - User error '401' on 'apiaccountratelimitstatus': No ha sido posible autenticarte.
2020-04-07 14:08:16 LOG_DEBUG: [gnusocial.villanos.net:21550.8ca916ea GET /api/direct_messages.json?count=20&user_id=8885] action.php - User error '401' on 'apidirectmessage': No ha sido posible autenticarte.
2020-04-07 14:08:38 LOG_DEBUG: [gnusocial.villanos.net:21692.b98be38e POST /api/statuses/update.json] action.php - User error '401' on 'apistatusesupdate': No ha sido posible autenticarte.
2020-04-07 14:08:39 LOG_DEBUG: [gnusocial.villanos.net:21692.66ff9222 POST /api/statuses/update.json] action.php - User error '401' on 'apistatusesupdate': No ha sido posible autenticarte.
```
(*) No ha sido posible autenticarte = No possible to authenticate you
Did attached the file for that period.
In Andstatus I got this:
```
E; Post , foreground "Testing publishing from andstatus",
Created two minutes ago,
executed:1, last:two minutes ago, retriesLeft:9, error:Hard,
updateNote; content:'Testing publishing from andstatus',
Status code=UNAUTHORIZED; hard;
; statusLine:'HTTP/1.1 401 Unauthorized'; statusCode:UNAUTHORIZED (401); url:'https://gnusocial.villanos.net/api/statuses/update.json'; legacy HTTP; authenticated; posted:'{"status":"Testing publishing from andstatus","source":"AndStatus"}'; response:'{"error":"No ha sido posible…'; error='No ha sido posible autenticarte.',
CommandData:{command: update-status, account: coleviajes@gnusocial.villanos.net/GnuSocial "Testing publishing from andstatus", itemId: 63963, foreground, created:3 seconds ago, CommandResult:{error:Hard}}
```
```
# git log -1
commit f5aeab39b40db3f185e7da58700598828d362154 (HEAD -> nightly, origin/nightly, origin/experimental, origin/HEAD)
Author: Alexei Sorokin <sor.alexei@meowr.ru>
Date: Tue Jan 7 17:16:07 2020 +0300
[PEAR DB_DataObject] Make static methods in Cast actually static
```
Let me know what more info I can provide.
Regards!
Colegota
Unfortunately notabug isn't accepting attachments properly, can you link to it or post a new comment with it pasted?
> Did attached the file for that period.
Unfortunately notabug isn't accepting attachments properly, can you link to it or post a new comment with it pasted?
2020-04-10 19:24:41 LOG_DEBUG: [gnusocial.villanos.net:8130.349b65bb GET /api/account/rate_limit_status.json] action.php - User error '401' on 'apiaccountratelimitstatus': No ha sido posible autenticarte.
Let me know if I can check anything else.
Regards!
Colegota
Hi!
Did upgraded to last commit and the result keeps the same.
```
# git log -1
commit e58188d13640721d2da866bfbab9c036df7acb5d (HEAD -> nightly, origin/nightly, origin/HEAD)
Author: Diogo Cordeiro <diogo@fc.up.pt>
Date: Tue Apr 7 02:45:48 2020 +0100
[UI] Small improvement on attachment's visual
```
`2020-04-10 19:24:41 LOG_DEBUG: [gnusocial.villanos.net:8130.349b65bb GET /api/account/rate_limit_status.json] action.php - User error '401' on 'apiaccountratelimitstatus': No ha sido posible autenticarte.`
Let me know if I can check anything else.
Regards!
Colegota
Just trying to get a little more info on this I did increased logs.
I've found that flow reaches checkBasicAuthUser() in lib/api/apiauthaction.php with no data for user properties.
My traces:
function checkBasicAuthUser($required = true)
{
common_debug("[___colegota] start checkBasicAuthUser: with required '{$required}' " . print_r($this, true));
$this->basicAuthProcessHeader();
common_debug('[___colegota] checkBasicAuthUser after basicAuthProcessHeader: ' . print_r($this, true));
$realm = common_config('api', 'realm');
if (empty($realm)) {
$realm = common_config('site', 'name') . ' API';
}
if (empty($this->auth_user_nickname) && $required) {
header('WWW-Authenticate: Basic realm="' . $realm . '"');
common_debug('[___colegota] empty nickname before clientError: ' . print_r($this, true));
// show error if the user clicks 'cancel'
// TRANS: Client error thrown when authentication fails because a user clicked "Cancel".
$this->clientError(_('Could not authenticate you.'), 401);
} else {
// $this->auth_user_nickname - i.e. PHP_AUTH_USER - will have a value since it was not empty
$user = common_check_user($this->auth_user_nickname,
$this->auth_user_password);
common_debug("[___colegota] user '{$user}':" . print_r($this, true));
Event::handle('StartSetApiUser', array(&$user));
if ($user instanceof User) {
if (!$user->hasRight(Right::API)) {
// TRANS: Authorization exception thrown when a user without API access tries to access the API.
throw new AuthorizationException(_('Not allowed to use API.'));
}
$this->auth_user = $user;
Event::handle('EndSetApiUser', array($this->auth_user));
} else {
$this->auth_user = null;
}
if ($required && $this->auth_user instanceof User) {
// By default, basic auth users have rw access
$this->access = self::READ_WRITE;
} elseif ($required) {
$msg = sprintf(
"basic auth nickname = %s",
$this->auth_user_nickname
);
$this->logAuthFailure($msg);
// We must present WWW-Authenticate in accordance to HTTP status code 401
header('WWW-Authenticate: Basic realm="' . $realm . '"');
// TRANS: Client error thrown when authentication fails.
common_debug('[___colegota] before clientError?: ' . print_r($this, true));
$this->clientError(_('Could not authenticate you.'), 401);
} else {
// all get rw access for actions that don't require auth
$this->access = self::READ_WRITE;
}
}
}
That function it's called more times, just put above the one it shows 'Could not authenticate you' message.
The whole file for the test period can be found here:
Hi!
this came from AndStatus issues here https://github.com/andstatus/andstatus/issues/520
Since I moved my node from 1.03 to Nightly with 2.0-dev I can't publish from AndStatus while I can read my timelines and get notifications at the app.
Also if I try to re-authenticate my credentials in AndStatus it fails, but this is only for publishing by now.
I'm running nightly with apache and php 7.3. Andstatus v53.02.
config.php only has as extra plugins StoreRemoteMedia, ModPlus and ActivityPub.
After trying to publish a new message from AndStatus I got 4 lines related in GS log.
(*) No ha sido posible autenticarte = No possible to authenticate you
Did attached the file for that period.
In Andstatus I got this:
Let me know what more info I can provide.
Regards!
Colegota
Unfortunately notabug isn't accepting attachments properly, can you link to it or post a new comment with it pasted?
Here goes a long shot: can you try disabling the
DirectMessage
plugin?here is the file http://gnusocial.villanos.net/gs2-log-20200407-pub-coleviajes.txt
DirectMessage disabled
Hi!
Did upgraded to last commit and the result keeps the same.
2020-04-10 19:24:41 LOG_DEBUG: [gnusocial.villanos.net:8130.349b65bb GET /api/account/rate_limit_status.json] action.php - User error '401' on 'apiaccountratelimitstatus': No ha sido posible autenticarte.
Let me know if I can check anything else.
Regards!
Colegota
Just trying to get a little more info on this I did increased logs.
I've found that flow reaches checkBasicAuthUser() in lib/api/apiauthaction.php with no data for user properties.
My traces:
log output:
That function it's called more times, just put above the one it shows 'Could not authenticate you' message. The whole file for the test period can be found here:
http://gnusocial.villanos.net/gs22-log7.txt