Panopto/Moodle-2.0-plugin-for-Panopto

Adhoc task failed: block_panopto\task\sync_user_login,Undefined constant "STDOUT"

Closed this issue · 7 comments

We upgraded to Moodle 4.2.2 (PHP 8.0) and I get tons of these errors:

Execute adhoc task: block_panopto\task\sync_user_login
Adhoc task id: 240762
Adhoc task custom data: {"userid":"17733"}
... started 12:48:34. Current memory use 13.1 MB.
... used 0 dbqueries
... used 0.00016093254089355 seconds
Adhoc task failed: block_panopto\task\sync_user_login,Undefined constant "STDOUT"
Backtrace:

  • line 1709 of /blocks/panopto/lib/panopto_data.php: call to cli_writeln()
  • line 1741 of /blocks/panopto/lib/panopto_data.php: call to panopto_data::print_log()
  • line 922 of /blocks/panopto/lib/panopto_data.php: call to panopto_data::print_log_verbose()
  • line 61 of /blocks/panopto/classes/task/sync_user_login.php: call to panopto_data->sync_external_user()
  • line 508 of /lib/classes/cron.php: call to block_panopto\task\sync_user_login->execute()
  • line 302 of /lib/classes/cron.php: call to core\cron::run_inner_adhoc_task()
  • line 128 of /lib/classes/cron.php: call to core\cron::run_adhoc_tasks()
  • line 186 of /admin/cli/cron.php: call to core\cron::run_main_process()

Also, the course pages that have Panopto content on them crash parts of the course. This is a MAJOR issue right now. If it is not being solved we will have to start deleting all Panopto content from our pages to get courses to load.

image

I'm surprised that's failing... cli_writeln() and the default output stream STDOUT are all part of the Moodle core code. It looks like the Panopto block is doing the correct thing by checking CLI_SCRIPT before calling it. Any chance your adhoc tasks are not running via CLI?

Hm... They are running via CLI. I think. We start the cron.php from CLI.

Tomorrow I have a support call with Panopto for this.

Panopto support told me to wait for the Moodle 4.2.2 Panopto plugin release. I hope it's here soon :)

Unfortunately this keeps happening. Moodle 4.2.2, latest Panopto block installed:
Execute adhoc task: block_panopto\task\sync_user
Adhoc task id: 241609
Adhoc task custom data: {"courseid":"28882","userid":"22942"}
... started 12:42:37. Current memory use 13.0 MB.
Debugging increased temporarily due to faildelay of 86400
... used 1 dbqueries
... used 0.0035991668701172 seconds
Adhoc task failed: block_panopto\task\sync_user,Undefined constant "STDOUT"
Backtrace:

  • line 1831 of /blocks/panopto/lib/panopto_data.php: call to cli_writeln()
  • line 1863 of /blocks/panopto/lib/panopto_data.php: call to panopto_data::print_log()
  • line 940 of /blocks/panopto/lib/panopto_data.php: call to panopto_data::print_log_verbose()
  • line 55 of /blocks/panopto/classes/task/sync_user.php: call to panopto_data->sync_external_user()
  • line 508 of /lib/classes/cron.php: call to block_panopto\task\sync_user->execute()
  • line 302 of /lib/classes/cron.php: call to core\cron::run_inner_adhoc_task()
  • line 128 of /lib/classes/cron.php: call to core\cron::run_adhoc_tasks()
  • line 186 of /admin/cli/cron.php: call to core\cron::run_main_process()

Could this be that the task process doesn't have access to cli-commands?

@Richardvi Can you just post your reproduction steps in detail, so we have a full repro and I can create internal item to investigate this? Thank you.

Error has disappeared from our environment! You can close this.