123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- ---
- title: POST /notice/new] Handled serverError (500)
- author: notabug.org/spla
- time: Tue, 19 Nov 2019 11:15:40 UTC
- status: closed
- ---
- author: notabug.org
- time: Tue, 19 Nov 2019 11:15:40 UTC
- content: -----
- 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
- -----
- author: notabug.org
- time: Wed, 20 Nov 2019 23:26:19 UTC
- content: -----
- 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.
- -----
- author: notabug.org
- time: Thu, 21 Nov 2019 00:28:31 UTC
- content: -----
- I don't get the bug when posting notices, but when deleting them... I'll try and report tomorrow what Diogo says.
- -----
- author: notabug.org
- time: Thu, 21 Nov 2019 10:38:16 UTC
- content: -----
- 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}
- -----
- author: notabug.org
- time: Thu, 21 Nov 2019 11:20:42 UTC
- content: -----
- 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]);
- -----
- author: notabug.org
- time: Thu, 21 Nov 2019 11:23:54 UTC
- content: -----
- 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
- -----
- author: notabug.org
- time: Thu, 21 Nov 2019 11:36:47 UTC
- content: -----
- @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.
- -----
- author: notabug.org
- time: Thu, 21 Nov 2019 12:16:42 UTC
- content: -----
- that's part of the old log, search for the string "the bug is here" please...
- -----
- author: notabug.org
- time: Thu, 21 Nov 2019 12:19:58 UTC
- content: -----
- Found in a more contained way in https://notabug.org/diogo/gnu-social/issues/90
- -----
- author: notabug.org
- time: Thu, 21 Nov 2019 12:29:39 UTC
- content: -----
- @diogo can't find such string in the logs
- -----
- author: notabug.org
- time: Fri, 22 Nov 2019 00:04:33 UTC
- content: -----
- 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...
- -----
- author: notabug.org
- time: Fri, 22 Nov 2019 11:51:19 UTC
- content: -----
- @aab what gs version are you running? thank you!
- -----
- author: notabug.org
- time: Sun, 24 Nov 2019 09:16:42 UTC
- content: -----
- @spla This one: https://notabug.org/diogo/gnu-social/src/aab, which is basically nightly modified to fit my hosting environment (thanks to @diogo).
- -----
- author: notabug.org
- time: Sun, 24 Nov 2019 12:13:49 UTC
- content: -----
- 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]);
- -----
- author: notabug.org
- time: Sun, 24 Nov 2019 12:14:51 UTC
- content: -----
- @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 :)
- -----
- author: notabug.org
- time: Mon, 25 Nov 2019 12:13:33 UTC
- content: -----
- 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
- -----
- author: notabug.org
- time: Tue, 03 Dec 2019 15:06:23 UTC
- content: -----
- @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?
- -----
- author: notabug.org
- time: Wed, 18 Dec 2019 12:35:59 UTC
- content: -----
- @diogo just did a git pull and tested notices. The error is gone! it says "notice posted". Thanks!. Closing this.
- -----
|