Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-83037

Badges Behat tests trigger file not found errors

XMLWordPrintable

    • MOODLE_404_STABLE
    • MOODLE_404_STABLE
    • MDL-83037-404
    • Hide
      1. Run the scenario `Filter managed badges` using mdk, docker or your favourite way to run behat tests:

        $ bin/moodle-docker-compose exec --user www-data webserver php admin/tool/behat/cli/run.php --name="Filter managed badges"
        

      2. Examine webserver log
      3. Confirm there are no errors similar to the following:

        [Fri Sep 06 10:36:18.053418 2024] [php:notice] [pid 97] [client 172.18.0.4:43268] Default exception handler: Sorry, the requested file could not be found Debug: 
        Error code: filenotfound
        * line 2148 of /lib/filelib.php: core\\exception\\moodle_exception thrown
        * line 4584 of /lib/filelib.php: call to send_file_not_found()
        * line 44 of /pluginfile.php: call to file_pluginfile()
        , referer: http://webserver/badges/index.php?type=1
        1

      Show
      Run the scenario `Filter managed badges` using mdk, docker or your favourite way to run behat tests: $ bin/moodle-docker-compose exec --user www-data webserver php admin/tool/behat/cli/run.php --name="Filter managed badges" Examine webserver log Confirm there are no errors similar to the following: [Fri Sep 06 10:36:18.053418 2024] [php:notice] [pid 97] [client 172.18.0.4:43268] Default exception handler: Sorry, the requested file could not be found Debug: Error code: filenotfound * line 2148 of /lib/filelib.php: core\\exception\\moodle_exception thrown * line 4584 of /lib/filelib.php: call to send_file_not_found() * line 44 of /pluginfile.php: call to file_pluginfile() , referer: http://webserver/badges/index.php?type=1 1

      See MDL-81614

      531861:[Fri Sep 06 07:09:33.561352 2024] [php:notice] [pid 5472:tid 5472] [client 192.168.64.16:37716] Default exception handler: Sorry, the requested file could not be found Debug: \nError code: filenotfound\n* line 2148 of /lib/filelib.php: core\\exception\\moodle_exception thrown\n* line 4584 of /lib/filelib.php: call to send_file_not_found()\n* line 44 of /pluginfile.php: call to file_pluginfile()\n, referer: http://webserver20d05a70a702807e/behatrun1/badges/index.php?type=1
      532083:[Fri Sep 06 07:09:41.207409 2024] [php:notice] [pid 5597:tid 5597] [client 192.168.64.16:48462] Default exception handler: Sorry, the requested file could not be found Debug: \nError code: filenotfound\n* line 2148 of /lib/filelib.php: core\\exception\\moodle_exception thrown\n* line 4584 of /lib/filelib.php: call to send_file_not_found()\n* line 44 of /pluginfile.php: call to file_pluginfile()\n, referer: http://webserver20d05a70a702807e/behatrun1/badges/index.php?type=1
      532314:[Fri Sep 06 07:09:48.851479 2024] [php:notice] [pid 5539:tid 5539] [client 192.168.64.16:50372] Default exception handler: Sorry, the requested file could not be found Debug: \nError code: filenotfound\n* line 2148 of /lib/filelib.php: core\\exception\\moodle_exception thrown\n* line 4584 of /lib/filelib.php: call to send_file_not_found()\n* line 44 of /pluginfile.php: call to file_pluginfile()\n, referer: http://webserver20d05a70a702807e/behatrun1/badges/index.php?type=1
      533119:[Fri Sep 06 07:10:13.170986 2024] [php:notice] [pid 5597:tid 5597] [client 192.168.64.16:55852] Default exception handler: Sorry, the requested file could not be found Debug: \nError code: filenotfound\n* line 2148 of /lib/filelib.php: core\\exception\\moodle_exception thrown\n* line 4584 of /lib/filelib.php: call to send_file_not_found()\n* line 44 of /pluginfile.php: call to file_pluginfile()\n, referer: http://webserver20d05a70a702807e/behatrun1/badges/index.php?type=1
      533122:[Fri Sep 06 07:10:13.218162 2024] [php:notice] [pid 5402:tid 5402] [client 192.168.64.16:55842] Default exception handler: Sorry, the requested file could not be found Debug: \nError code: filenotfound\n* line 2148 of /lib/filelib.php: core\\exception\\moodle_exception thrown\n* line 4584 of /lib/filelib.php: call to send_file_not_found()\n* line 44 of /pluginfile.php: call to file_pluginfile()\n, referer: http://webserver20d05a70a702807e/behatrun1/badges/index.php?type=1
      

      It's because some of the test generator calls from badge tests are creating badges without images (it was me! MDL-76392 & MDL-81073):

          Given the following "core_badges > Badges" exist:
            | name     | status | version |
            | Badge #2 | 1      | 2.0     |
      

      The Behat generator should disallow this

            pholden Paul Holden
            pholden Paul Holden
            Carlos Castillo Carlos Castillo
            Ferran Recio Ferran Recio
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 55 minutes
                3h 55m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.