#90 POST /notice/new] Handled serverError (500)

بسته‌شده
5 سال پیش باز شده توسط spla · 17 دیدگاه

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

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

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.

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.

I don't get the bug when posting notices, but when deleting them...

I'll try and report tomorrow what Diogo says.

I don't get the bug when posting notices, but when deleting them... I'll try and report tomorrow what Diogo says.

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}
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}

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]);
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]);
spla نظر 5 سال پیش
نویسنده

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

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
spla نظر 5 سال پیش
نویسنده

@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.
@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.

that's part of the old log, search for the string "the bug is here" please...

that's part of the old log, search for the string "the bug is here" please...

Found in a more contained way in #90

Found in a more contained way in https://notabug.org/diogo/gnu-social/issues/90
spla نظر 5 سال پیش
نویسنده

@diogo can't find such string in the logs

@diogo can't find such string in the logs

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...

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...
spla نظر 5 سال پیش
نویسنده

@aab what gs version are you running? thank you!

@aab what gs version are you running? thank you!

@spla This one: https://notabug.org/diogo/gnu-social/src/aab, which is basically nightly modified to fit my hosting environment (thanks to @diogo).

@spla This one: https://notabug.org/diogo/gnu-social/src/aab, which is basically nightly modified to fit my hosting environment (thanks to @diogo).

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]);
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]);

@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 :)

@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 :)

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
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
spla نظر 5 سال پیش
نویسنده

@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?

@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?
spla نظر 5 سال پیش
نویسنده

@diogo just did a git pull and tested notices. The error is gone! it says "notice posted". Thanks!. Closing this.

@diogo just did a git pull and tested notices. The error is gone! it says "notice posted". Thanks!. Closing this.
spla 5 سال پیش بسته شد
برای پیوستن به گفتگو، وارد شودید.
بدون نقطه عطف
بدون مسئول رسیدگی
3 مشارکت کننده
درحال بارگذاری...
لغو
ذخيره
هنوز محتوایی ایجاد نشده.