#177 update_activitypub_profiles.php error

بسته‌شده
3 سال پیش باز شده توسط aab · 8 دیدگاه

I run the script every week with cron; today i've seen this in the logs. I've checked with previous executions, and it is the first time it happens.

ActivityPub Profiles updater will now start!
Summoning Diogo Cordeiro, Richard Stallman and Chuck Norris to help us with this task!
Found 15575 ActivityPub profiles:
[...] (After updating about 60 profiles)
PHP Fatal error:  Uncaught TypeError: Argument 2 passed to Activitypub_profile::update_profile() must be of the type array, bool given, called in /var/www/gnusocial/plugins/ActivityPub/scripts/update_activitypub_profiles.php on line 93 and defined in /var/www/gnusocial/plugins/ActivityPub/classes/Activitypub_profile.php:492

Stack trace:
#0 /var/www/gnusocial/plugins/ActivityPub/scripts/update_activitypub_profiles.php(93): Activitypub_profile::update_profile(Object(Activitypub_profile), false)
#1 {main}
  thrown in /var/www/gnusocial/plugins/ActivityPub/classes/Activitypub_profile.php on line 492
I run the script every week with cron; today i've seen this in the logs. I've checked with previous executions, and it is the first time it happens. ```` ActivityPub Profiles updater will now start! Summoning Diogo Cordeiro, Richard Stallman and Chuck Norris to help us with this task! Found 15575 ActivityPub profiles: [...] (After updating about 60 profiles) PHP Fatal error: Uncaught TypeError: Argument 2 passed to Activitypub_profile::update_profile() must be of the type array, bool given, called in /var/www/gnusocial/plugins/ActivityPub/scripts/update_activitypub_profiles.php on line 93 and defined in /var/www/gnusocial/plugins/ActivityPub/classes/Activitypub_profile.php:492 Stack trace: #0 /var/www/gnusocial/plugins/ActivityPub/scripts/update_activitypub_profiles.php(93): Activitypub_profile::update_profile(Object(Activitypub_profile), false) #1 {main} thrown in /var/www/gnusocial/plugins/ActivityPub/classes/Activitypub_profile.php on line 492 ````
aab نظر 3 سال پیش
نویسنده

More on this: i've used the script to update individual accounts, and it works fine. Maybe it is about something specific to some accounts?

In khp, it gets stuck with @merce@hispagatos.space. In gs.net, with https://social.tchncs.de/@DerEmil

EDIT: I've deleted DerEmil from activitypub_profile, re-run the script, and it gives the same error in the exact same position. Maybe it should be deleted from some other table?

More on this: i've used the script to update individual accounts, and it works fine. Maybe it is about something specific to some accounts? In khp, it gets stuck with @merce@hispagatos.space. In gs.net, with https://social.tchncs.de/@DerEmil EDIT: I've deleted DerEmil from activitypub_profile, re-run the script, and it gives the same error in the exact same position. Maybe it should be deleted from some other table?

Fixed with 395fe8cb10.

Fixed with https://notabug.org/diogo/gnu-social/commit/395fe8cb10de88678e0adccb2dad10686b4b8caa.
diogo 3 سال پیش بسته شد
aab نظر 3 سال پیش
نویسنده

After applying the update, i get this:

PHP Fatal error:  Uncaught Error: Class 'user_flag_profile' not found in /var/www/html/classes/Profile.php:991
Stack trace:
#0 /var/www/html/plugins/ActivityPub/classes/Activitypub_profile.php(497): Profile->delete()
#1 /var/www/html/plugins/ActivityPub/scripts/update_activitypub_profiles.php(93): Activitypub_profile::update_profile(Object(Activitypub_profile), false)
#2 {main}
  thrown in /var/www/html/classes/Profile.php on line 991
After applying the update, i get this: ```` PHP Fatal error: Uncaught Error: Class 'user_flag_profile' not found in /var/www/html/classes/Profile.php:991 Stack trace: #0 /var/www/html/plugins/ActivityPub/classes/Activitypub_profile.php(497): Profile->delete() #1 /var/www/html/plugins/ActivityPub/scripts/update_activitypub_profiles.php(93): Activitypub_profile::update_profile(Object(Activitypub_profile), false) #2 {main} thrown in /var/www/html/classes/Profile.php on line 991 ````
aab 3 سال پیش بازگشایی شد
aab نظر 3 سال پیش
نویسنده

This is what i get in the logs:

2020-07-21 11:27:15 LOG_ERR: [khp.ignorelist.com:update_activitypub_profiles.php:8496] HTTPClient: HTTP GET https://mastodon.social/users/Notxor - 410 Gone
2020-07-21 11:27:15 LOG_INFO: [khp.ignorelist.com:update_activitypub_profiles.php:8496] 'Empty primary key (\'id\') value was given to query for a "Notice" object'
This is what i get in the logs: ```` 2020-07-21 11:27:15 LOG_ERR: [khp.ignorelist.com:update_activitypub_profiles.php:8496] HTTPClient: HTTP GET https://mastodon.social/users/Notxor - 410 Gone 2020-07-21 11:27:15 LOG_INFO: [khp.ignorelist.com:update_activitypub_profiles.php:8496] 'Empty primary key (\'id\') value was given to query for a "Notice" object' ````

That's due to issue: #171

That's due to issue: https://notabug.org/diogo/gnu-social/issues/171
diogo 3 سال پیش بسته شد
aab نظر 3 سال پیش
نویسنده

Ok, both servers are updating now; i'll confirm when they finish, but it seems to be working now :)

Ok, both servers are updating now; i'll confirm when they finish, but it seems to be working now :)
aab نظر 3 سال پیش
نویسنده

Gs.net is still upgrading; both nodes have lots of this:

2020-07-21 15:48:31 LOG_INFO: [khp.ignorelist.com:clean_profiles.php:49941] 'Empty primary key (\'id\') value was given to query for a "Notice" object'

2020-07-20 16:19:45 LOG_INFO: [gnusocial.net:clean_profiles.php:20003] 'Empty primary key (\'id\') value was given to query for a "Notice" object'

In khp it stops with this:

LOG_ERR: [khp.ignorelist.com:28628.f2d9a017 POST /inbox.json] Handled serverError (500) but cannot output into desired format (NULL): 'Argument 1 passed to Activitypub_explorer::get_profile_from_url() must be of the type string, array given, called in /var/www/html/plugins/ActivityPub/classes/Activitypub_profile.php on line 358'

LOG_ERR: [khp.ignorelist.com:28628.f2d9a017 POST /inbox.json] ServerErrorAction: 500 Argument 1 passed to Activitypub_explorer::get_profile_from_url() must be of the type string, array given, called in /var/www/html/plugins/ActivityPub/classes/Activitypub_profile.php on line 358
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Activitypub_explorer::validate_remote_response() must be of the type array, null given, called in /var/www/html/plugins/ActivityPub/lib/explorer.php on line 447 and defined in /var/www/html/plugins/ActivityPub/lib/explorer.php:292
Stack trace:
#0 /var/www/html/plugins/ActivityPub/lib/explorer.php(447): Activitypub_explorer::validate_remote_response(NULL)
#1 /var/www/html/plugins/ActivityPub/scripts/update_activitypub_profiles.php(92): Activitypub_explorer::get_remote_user_activity('https://bibeoga...')
#2 {main}
  thrown in /var/www/html/plugins/ActivityPub/lib/explorer.php on line 292
Gs.net is still upgrading; both nodes have lots of this: ```` 2020-07-21 15:48:31 LOG_INFO: [khp.ignorelist.com:clean_profiles.php:49941] 'Empty primary key (\'id\') value was given to query for a "Notice" object' 2020-07-20 16:19:45 LOG_INFO: [gnusocial.net:clean_profiles.php:20003] 'Empty primary key (\'id\') value was given to query for a "Notice" object' ```` In khp it stops with this: ```` LOG_ERR: [khp.ignorelist.com:28628.f2d9a017 POST /inbox.json] Handled serverError (500) but cannot output into desired format (NULL): 'Argument 1 passed to Activitypub_explorer::get_profile_from_url() must be of the type string, array given, called in /var/www/html/plugins/ActivityPub/classes/Activitypub_profile.php on line 358' LOG_ERR: [khp.ignorelist.com:28628.f2d9a017 POST /inbox.json] ServerErrorAction: 500 Argument 1 passed to Activitypub_explorer::get_profile_from_url() must be of the type string, array given, called in /var/www/html/plugins/ActivityPub/classes/Activitypub_profile.php on line 358 ```` ```` PHP Fatal error: Uncaught TypeError: Argument 1 passed to Activitypub_explorer::validate_remote_response() must be of the type array, null given, called in /var/www/html/plugins/ActivityPub/lib/explorer.php on line 447 and defined in /var/www/html/plugins/ActivityPub/lib/explorer.php:292 Stack trace: #0 /var/www/html/plugins/ActivityPub/lib/explorer.php(447): Activitypub_explorer::validate_remote_response(NULL) #1 /var/www/html/plugins/ActivityPub/scripts/update_activitypub_profiles.php(92): Activitypub_explorer::get_remote_user_activity('https://bibeoga...') #2 {main} thrown in /var/www/html/plugins/ActivityPub/lib/explorer.php on line 292 ````

The first one prolly is something that @XRevan86 would know better but may as well not be a relevant bug but rather something circumstantial and side-effected from the state of the art...

For the second, this commit should help us figuring what's going wrong: 6db56cc949

For the third one, I would need the inbox logs for that time period, but prolly was a simple network issue, I would guess...

The first one prolly is something that @XRevan86 would know better but may as well not be a relevant bug but rather something circumstantial and side-effected from the state of the art... For the second, this commit should help us figuring what's going wrong: https://notabug.org/diogo/gnu-social/commit/6db56cc949dc0c63d38f25cab27f7e1161dc0f67 For the third one, I would need the inbox logs for that time period, but prolly was a simple network issue, I would guess...
برای پیوستن به گفتگو، وارد شودید.
بدون نقطه عطف
بدون مسئول رسیدگی
2 مشارکت کننده
درحال بارگذاری...
لغو
ذخيره
هنوز محتوایی ایجاد نشده.