90 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. ---
  2. title: POST /notice/new] Handled serverError (500)
  3. author: notabug.org/spla
  4. time: Tue, 19 Nov 2019 11:15:40 UTC
  5. status: closed
  6. ---
  7. author: notabug.org
  8. time: Tue, 19 Nov 2019 11:15:40 UTC
  9. content: -----
  10. After last git pull of nightly branch it throws following error when posting a notice: POST /notice/new] Handled serverError (500) but cannot output into desired format (NULL): 'Argument 1 passed to Activitypub_explorer::lookup() must be of the type string, null given, called in /var/www/vhosts/matriu.cat/httpdocs/nightly/plugins/ActivityPub/lib/postman.php on line 430' cc @diogo
  11. -----
  12. author: notabug.org
  13. time: Wed, 20 Nov 2019 23:26:19 UTC
  14. content: -----
  15. Hi @spla, I will need more info this time. Can you send me your profile url? (So that I can see your followers list). here: https://notabug.org/diogo/gnu-social/src/nightly/plugins/ActivityPub/lib/postman.php#L430 please add the following one line above: common_error(print_r($discovery->lookup($sub, true)); and post the logs here. Thanks for your help debugging nightly :) Sidenote: GS v2 nightly isn't ready for production, this branch is reserved to devs.
  16. -----
  17. author: notabug.org
  18. time: Thu, 21 Nov 2019 00:28:31 UTC
  19. content: -----
  20. I don't get the bug when posting notices, but when deleting them... I'll try and report tomorrow what Diogo says.
  21. -----
  22. author: notabug.org
  23. time: Thu, 21 Nov 2019 10:38:16 UTC
  24. content: -----
  25. As soon as i added that line, this appears on logs: GET /notice/263583] ServerErrorAction: 500 syntax error, unexpected ';', expecting ')' #0 /var/www/html/lib/util/gnusocial.php(129): include_once() #1 /var/www/html/lib/util/gnusocial.php(285): GNUsocial::addPlugin('ActivityPub') #2 /var/www/html/lib/util/gnusocial.php(208): GNUsocial::initModules() #3 /var/www/html/lib/util/common.php(30): GNUsocial::init(NULL, NULL, NULL) #4 /var/www/html/index.php(172): require_once('/var/www/html/l...') #5 {main}
  26. -----
  27. author: notabug.org
  28. time: Thu, 21 Nov 2019 11:20:42 UTC
  29. content: -----
  30. Sorry, my bad, the instruction I gave was wrong, replace this line: https://notabug.org/diogo/gnu-social/src/nightly/plugins/ActivityPub/lib/postman.php#L430 with this instead: $cenas_fixes = $discovery->lookup($sub); common_error("the bug is here: ".print_r($cenas_fixes, true)); $this->to[]= Activitypub_profile::from_profile($cenas_fixes[0]);
  31. -----
  32. author: notabug.org
  33. time: Thu, 21 Nov 2019 11:23:54 UTC
  34. content: -----
  35. Hello @diogo, my profile url is https://matriu.cat/spla Just added 'common_error(print_r($discovery->lookup($sub, true));' It claims Internal server error, syntax error, unexpected ';', expecting ')' So i added ')' at the end, this way: common_error(print_r($discovery->lookup($sub, true))); and the internal server error is gone. Let's try it for a while and see what logs are spitting out. Here they come: POST /notice/new] Handled serverError (500) but cannot output into desired format (NULL): 'Call to undefined function common_error()' POST /notice/new] ServerErrorAction: 500 Call to undefined function common_error() @diogo Now I see your new help. Let's try: $cenas_fixes = $discovery->lookup($sub); common_error("the bug is here: ".print_r($cenas_fixes, true)); $this->to[]= Activitypub_profile::from_profile($cenas_fixes[0]); cc @aab
  36. -----
  37. author: notabug.org
  38. time: Thu, 21 Nov 2019 11:36:47 UTC
  39. content: -----
  40. @diogo, there we go. Logs are saying these lines: [matriu.cat:13678.6c4c4a03 POST /notice/new] Handled serverError (500) but cannot output into desired format (NULL): 'Argument 1 passed to Activitypub_explorer::lookup() must be of the type string, null given, called in /var/www/vhosts/matriu.cat/httpdocs/nightly/plugins/ActivityPub/lib/postman.php on line 430' [matriu.cat:13678.6c4c4a03 POST /notice/new] ServerErrorAction: 500 Argument 1 passed to Activitypub_explorer::lookup() must be of the type string, null given, called in /var/www/vhosts/matriu.cat/httpdocs/nightly/plugins/ActivityPub/lib/postman.php on line 430 Adding two more lines but I think are not related: [matriu.cat:13678.e78f9f2f GET /conversation/12296] Handled serverError (500) but cannot output into desired format (NULL): 'No result found on Conversation lookup.' [matriu.cat:13678.e78f9f2f GET /conversation/12296] ServerErrorAction: 500 No result found on Conversation lookup.
  41. -----
  42. author: notabug.org
  43. time: Thu, 21 Nov 2019 12:16:42 UTC
  44. content: -----
  45. that's part of the old log, search for the string "the bug is here" please...
  46. -----
  47. author: notabug.org
  48. time: Thu, 21 Nov 2019 12:19:58 UTC
  49. content: -----
  50. Found in a more contained way in https://notabug.org/diogo/gnu-social/issues/90
  51. -----
  52. author: notabug.org
  53. time: Thu, 21 Nov 2019 12:29:39 UTC
  54. content: -----
  55. @diogo can't find such string in the logs
  56. -----
  57. author: notabug.org
  58. time: Fri, 22 Nov 2019 00:04:33 UTC
  59. content: -----
  60. Ok, with new line i get "Call to undefined function common_error()" on gs UI when trying to delete a notice, but i also can't find that string...
  61. -----
  62. author: notabug.org
  63. time: Fri, 22 Nov 2019 11:51:19 UTC
  64. content: -----
  65. @aab what gs version are you running? thank you!
  66. -----
  67. author: notabug.org
  68. time: Sun, 24 Nov 2019 09:16:42 UTC
  69. content: -----
  70. @spla This one: https://notabug.org/diogo/gnu-social/src/aab, which is basically nightly modified to fit my hosting environment (thanks to @diogo).
  71. -----
  72. author: notabug.org
  73. time: Sun, 24 Nov 2019 12:13:49 UTC
  74. content: -----
  75. sigh, given that there's a common_debug, I wrongly assumed there would be a common_error. Replace with this snippet instead: $cenas_fixes = $discovery->lookup($sub); common_log(LOG_ERR, "the bug is here: " . print_r($cenas_fixes, true)); $this->to[]= Activitypub_profile::from_profile($cenas_fixes[0]);
  76. -----
  77. author: notabug.org
  78. time: Sun, 24 Nov 2019 12:14:51 UTC
  79. content: -----
  80. @spla, and haven't you experienced the same issue as aab? Anyway, with that new snippet, we should be able to catch a good debug trace, please try :)
  81. -----
  82. author: notabug.org
  83. time: Mon, 25 Nov 2019 12:13:33 UTC
  84. content: -----
  85. Ok, this time it is quite a long output: LOG_ERR: [khp.ignorelist.com:58665.a2ccb9e1 POST /notice/339523/delete] the bug is here: Array ( [0] => Profile Object ( [__table] => profile [id] => 14262 [nickname] => infoalmaina [fullname] => InfoAlmaina [profileurl] => https://khp.ignorelist.com/index.php/user/5218 [homepage] => [bio] => El informativo semanal de Radio Almaina con la actualidad de los movimientos sociales granadinos [location] => [lat] => [lon] => [location_id] => [location_ns] => [created] => 2019-11-03 13:04:20 [modified] => 2019-11-03 13:04:20 [_user:protected] => Array ( ) [_group:protected] => Array ( ) [_DB_DataObject_version] => 1.11.3 [N] => 1 [_database_dsn] => [_database_dsn_md5] => removido [_database] => gnusocial [_query] => Array ( [condition] => [group_by] => [order_by] => [having] => [useindex] => [limit_start] => [limit_count] => [data_select] => * [unions] => Array ( ) [derive_table] => [derive_select] => ) [_DB_resultid] => 209 [_resultFields] => [_link_loaded] => [_join] => [_lastError] => ) ) 2019-11-25 12:11:28 LOG_ERR: [khp.ignorelist.com:58665.a2ccb9e1 POST /notice/339523/delete] Handled serverError (500) but cannot output into desired format (NULL): 'Argument 1 passed to Activitypub_explorer::lookup() must be of the type string, null given, called in /var/www/html/plugins/ActivityPub/lib/postman.php on line 431' 2019-11-25 12:11:28 LOG_ERR: [khp.ignorelist.com:58665.a2ccb9e1 POST /notice/339523/delete] ServerErrorAction: 500 Argument 1 passed to Activitypub_explorer::lookup() must be of the type string, null given, called in /var/www/html/plugins/ActivityPub/lib/postman.php on line 431
  86. -----
  87. author: notabug.org
  88. time: Tue, 03 Dec 2019 15:06:23 UTC
  89. content: -----
  90. @diogo no, I did added your last snippet but for some reason I can't get "the bug is here" thing. It throws nothing but same former error: [matriu.cat:26296.05c63e16 POST /notice/new] Handled serverError (500) but cannot output into desired format (NULL): 'Argument 1 passed to Activitypub_explorer::lookup() must be of the type string, null given, called in /var/www/vhosts/matriu.cat/httpdocs/nightly/plugins/ActivityPub/lib/postman.php on line 430' [matriu.cat:26296.05c63e16 POST /notice/new] ServerErrorAction: 500 Argument 1 passed to Activitypub_explorer::lookup() must be of the type string, null given, called in /var/www/vhosts/matriu.cat/httpdocs/nightly/plugins/ActivityPub/lib/postman.php on line 430 Maybe I must enable something in php.ini to get debugging messages?
  91. -----
  92. author: notabug.org
  93. time: Wed, 18 Dec 2019 12:35:59 UTC
  94. content: -----
  95. @diogo just did a git pull and tested notices. The error is gone! it says "notice posted". Thanks!. Closing this.
  96. -----