177 5.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. ---
  2. title: update_activitypub_profiles.php error
  3. author: notabug.org/aab
  4. time: Sun, 12 Jul 2020 11:54:35 UTC
  5. status: closed
  6. ---
  7. author: notabug.org
  8. time: Sun, 12 Jul 2020 11:54:35 UTC
  9. content: -----
  10. 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 ````
  11. -----
  12. author: notabug.org
  13. time: Tue, 21 Jul 2020 10:39:51 UTC
  14. content: -----
  15. 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?
  16. -----
  17. author: notabug.org
  18. time: Tue, 21 Jul 2020 11:03:12 UTC
  19. content: -----
  20. Fixed with https://notabug.org/diogo/gnu-social/commit/395fe8cb10de88678e0adccb2dad10686b4b8caa.
  21. -----
  22. author: notabug.org
  23. time: Tue, 21 Jul 2020 11:18:43 UTC
  24. content: -----
  25. 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 ````
  26. -----
  27. author: notabug.org
  28. time: Tue, 21 Jul 2020 11:28:53 UTC
  29. content: -----
  30. 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' ````
  31. -----
  32. author: notabug.org
  33. time: Tue, 21 Jul 2020 11:47:49 UTC
  34. content: -----
  35. That's due to issue: https://notabug.org/diogo/gnu-social/issues/171
  36. -----
  37. author: notabug.org
  38. time: Tue, 21 Jul 2020 12:04:57 UTC
  39. content: -----
  40. Ok, both servers are updating now; i'll confirm when they finish, but it seems to be working now :)
  41. -----
  42. author: notabug.org
  43. time: Tue, 21 Jul 2020 16:01:16 UTC
  44. content: -----
  45. 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 ````
  46. -----
  47. author: notabug.org
  48. time: Tue, 21 Jul 2020 22:23:14 UTC
  49. content: -----
  50. 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...
  51. -----