WeBWorK Main Forum

Can't call method "server" on an undefined value at /usr/local/share/perl/5.34.0/Mojo/Server/Daemon.pm line 55.

Can't call method "server" on an undefined value at /usr/local/share/perl/5.34.0/Mojo/Server/Daemon.pm line 55.

by Szabolcs Horvát -
Number of replies: 3

Some students are getting the following error when trying to submit solutions for certain problem sets:

[2024-08-28 08:49:31.63448] [2160872] [warn] [HAuc6qyw7U_5] [/webwork2/CENSORED/week01-2/2] Submitting grade for user CENSORED and set week01-2.
[2024-08-28 08:49:31.63860] [2160872] [warn] [HAuc6qyw7U_5] [/webwork2/CENSORED/week01-2/2] Using current access token from database.
[2024-08-28 08:49:31.63888] [2160872] [warn] [HAuc6qyw7U_5] [/webwork2/CENSORED/week01-2/2] Found data required for submitting grades to LMS.
[2024-08-28 08:49:31.64167] [2160872] [error] [HAuc6qyw7U_5] Can't call method "server" on an undefined value at /usr/local/share/perl/5.34.0/Mojo/Server/Daemon.pm line 55.

I suspect that this may have something to do with the following situation:

We integrate WeBWorK 2.19 with Canvas, and are trying to set this up for the first time. Due to delays in getting the access to Canvas we requested from IT, last week our WeBWorK ran for a little with with plain password authentication and no LMS, and then a bit with LTI 1.1 integration. Now we finally have LTI 1.3 integration, as originally planned. According to the logs, the error occurs only with problem sets that were published during this transition period, but not with later problem sets (at least I haven't seen it yet for later sets).

My hypothesis is that the information WeBWorK stores to link problem sets with Canvas assignments is no longer valid.

If this could indeed be possible, is there any way we can reset this information, and re-link with the Canvas assignment?

In reply to Szabolcs Horvát

Re: Can't call method "server" on an undefined value at /usr/local/share/perl/5.34.0/Mojo/Server/Daemon.pm line 55.

by Szabolcs Horvát -

Does anyone have suggestions here?

In reply to Szabolcs Horvát

Re: Can't call method "server" on an undefined value at /usr/local/share/perl/5.34.0/Mojo/Server/Daemon.pm line 55.

by Szabolcs Horvát -

Deeper investigation revealed that problem sets (`set_user`) that are affected have the `lis_source_did` field set to a non-NULL value. Problem sets which work correctly have this field as NULL.

At least with our LTI 1.3 setup, it seems that setting that field to NULL fixes the issue.

That said, blindly making database changes (without proper backups and contingency plans in case something goes wrong) is definitely NOT something I'd recommend.

If WeBWorK developers could comment on whether this fix seems reasonable, or what to pay attention to when attempting it, that would be appreciated.

In reply to Szabolcs Horvát

Re: Can't call method "server" on an undefined value at /usr/local/share/perl/5.34.0/Mojo/Server/Daemon.pm line 55.

by Glenn Rice -

LTI 1.1 and LTI 1.3 share certain database columns for grade passback information.  As such if you switch from LTI 1.1 to LTI 1.3 for an active course, there generally will be problems.  LTI 1.1 saves the lis_sourced_id into the (incorrectly named) lis_source_did column of the user set.  LTI 1.3 saves the lineitem into the global set lis_source_did column.  So if the user set lis_source_did column is set by LTI 1.1 and then LTI 1.3 is switched to, then when the merged set is obtained from the database, the user set lis_source_did column will override the global set lis_sourced_did column value, and cause problems.

To fix this it would be perfectly save to delete all values of the lis_source_did column in all user sets in the database.  LTI 1.3 doesn't use any of those, and in fact expects them all to be NULL.  This can be done with

UPDATE courseID_set_user SET lis_source_did = NULL;
As usual, anytime you are making changes to the database, you should make a backup first.

Generally, we don't expect someone to start using LTI 1.1 in an active course, and then switch to LTI 1.3 while that course is still active.  Such a switch is problematic in general.