Moodle
  1. Moodle
  2. MDL-36494

Invalid info about available updates detected and will be ignored

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Installation
    • Labels:
      None
    • Testing Instructions:
      Hide

      Testing difficulty: MEDIUM (requires Moodle installation and upgrade)

      1. Install an older Moodle 2.3.x (eg 2.3.2 or 2.3.1 or so) and set $CFG->debugging level to maximum
      2. Check for available updates
      3. TEST: Make sure you are informed about the newest 2.3.y available
      4. Upgrade the server to 2.4
      5. TEST: Make sure there is no debugging "Invalid info about available updates ..." displayed during the upgrade
      6. TEST: Make sure there is no debugging "Invalid info about available updates ..." displayed at the Plugins overview page
      Show
      Testing difficulty: MEDIUM (requires Moodle installation and upgrade) Install an older Moodle 2.3.x (eg 2.3.2 or 2.3.1 or so) and set $CFG->debugging level to maximum Check for available updates TEST: Make sure you are informed about the newest 2.3.y available Upgrade the server to 2.4 TEST: Make sure there is no debugging "Invalid info about available updates ..." displayed during the upgrade TEST: Make sure there is no debugging "Invalid info about available updates ..." displayed at the Plugins overview page
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-36494-invalid-update-debugging
    • Rank:
      45952

      Description

      This is the message - under DEVELOPER debugging level - appeared in upgrading Moodle from the last 2.4alpha to the current 2.4beta.
      It has been shown two times:

      1. the first, when presenting the list of component to be updated:
        Invalid info about available updates detected and will be ignored: Unexpected version of the response format. Please try to re-check for available updates.
        line 916 of /lib/pluginlib.php: call to debugging()
        line 753 of /lib/pluginlib.php: call to available_update_checker->restore_response()
        line 2259 of /lib/pluginlib.php: call to available_update_checker->get_update_info()
        line 145 of /lib/pluginlib.php: call to plugininfo_base->check_available_updates()
        line 317 of /lib/pluginlib.php: call to plugin_manager->get_plugins()
        line 248 of /admin/index.php: call to plugin_manager->all_plugins_ok()
        
      2. the second, when presenting the list of new settings (note: the error logged you out i.e. you need to set the new settings twice):
        Invalid info about available updates detected and will be ignored: Unexpected version of the response format. Please try to re-check for available updates.
        line 916 of /lib/pluginlib.php: call to debugging()
        line 753 of /lib/pluginlib.php: call to available_update_checker->restore_response()
        line 2259 of /lib/pluginlib.php: call to available_update_checker->get_update_info()
        line 145 of /lib/pluginlib.php: call to plugininfo_base->check_available_updates()
        line 9 of /admin/settings/plugins.php: call to plugin_manager->get_plugins()
        line 6100 of /lib/adminlib.php: call to require()
        line 5987 of /lib/adminlib.php: call to admin_get_root()
        line 14 of /admin/upgradesettings.php: call to admin_externalpage_setup()
        

      The Moodle instance is able to connect to Internet (e.g. checked by performing the required git pull) so it's not related with the missing of external network accessibility.
      The Moodle instance has two contributed module installed, registered into the Plugins Directory:

      1. Attendance Register
      2. DAVRoot

        Activity

        Hide
        Matteo Scaramuccia added a comment -

        Checking the availability from both Notifications or Plugins overview returns no error: if this exception gives no ideas to the mantainer, this issue should be closed as not a bug.
        BTW, I was not able to recover the root for the text message of the exception as well as for those texts used into plugin_manager: :validate_response():

            protected function validate_response($response) {
        
                $response = $this->decode_response($response);
        
                if (empty($response)) {
                    throw new available_update_checker_exception('err_response_empty');
                }
        
                if (empty($response['status']) or $response['status'] !== 'OK') {
                    throw new available_update_checker_exception('err_response_status', $response['status']);
                }
        
                if (empty($response['apiver']) or $response['apiver'] !== '1.1') {
                    throw new available_update_checker_exception('err_response_format_version', $response['apiver']);
                }
        
                if (empty($response['forbranch']) or $response['forbranch'] !== moodle_major_version(true)) {
                    throw new available_update_checker_exception('err_response_target_version', $response['forbranch']);
                }
            }
        
        Show
        Matteo Scaramuccia added a comment - Checking the availability from both Notifications or Plugins overview returns no error: if this exception gives no ideas to the mantainer, this issue should be closed as not a bug . BTW, I was not able to recover the root for the text message of the exception as well as for those texts used into plugin_manager: :validate_response() : protected function validate_response($response) { $response = $ this ->decode_response($response); if (empty($response)) { throw new available_update_checker_exception('err_response_empty'); } if (empty($response['status']) or $response['status'] !== 'OK') { throw new available_update_checker_exception('err_response_status', $response['status']); } if (empty($response['apiver']) or $response['apiver'] !== '1.1') { throw new available_update_checker_exception('err_response_format_version', $response['apiver']); } if (empty($response['forbranch']) or $response['forbranch'] !== moodle_major_version( true )) { throw new available_update_checker_exception('err_response_target_version', $response['forbranch']); } }
        Hide
        Jean-Michel Vedrine added a comment -

        Just to say I experienced the exact same issue after upgrading my local git of master branch this morning. Debugging level is set to DEVELOPER too.

        Show
        Jean-Michel Vedrine added a comment - Just to say I experienced the exact same issue after upgrading my local git of master branch this morning. Debugging level is set to DEVELOPER too.
        Hide
        Andrew Davis added a comment -

        I'm getting this too. Here is the message I get on a course page.

        Invalid info about available updates detected and will be ignored: Unexpected version of the response format. Please try to re-check for available updates.
        
            line 916 of /lib/pluginlib.php: call to debugging()
            line 753 of /lib/pluginlib.php: call to available_update_checker->restore_response()
            line 2259 of /lib/pluginlib.php: call to available_update_checker->get_update_info()
            line 145 of /lib/pluginlib.php: call to plugininfo_base->check_available_updates()
            line 9 of /admin/settings/plugins.php: call to plugin_manager->get_plugins()
            line 6100 of /lib/adminlib.php: call to require()
            line 3268 of /lib/navigationlib.php: call to admin_get_root()
            line 3173 of /lib/navigationlib.php: call to settings_navigation->load_administration_settings()
            line 701 of /lib/pagelib.php: call to settings_navigation->initialise()
            line 717 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
            line 133 of /blocks/settings/block_settings.php: call to moodle_page->__get()
            line 284 of /blocks/moodleblock.class.php: call to block_settings->get_content()
            line 232 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
            line 953 of /lib/blocklib.php: call to block_base->get_content_for_output()
            line 1005 of /lib/blocklib.php: call to block_manager->create_block_contents()
            line 353 of /lib/blocklib.php: call to block_manager->ensure_content_created()
            line 6 of /theme/base/layout/general.php: call to block_manager->region_has_content()
            line 793 of /lib/outputrenderers.php: call to include()
            line 740 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
            line 230 of /course/view.php: call to core_renderer->header()
        
        Show
        Andrew Davis added a comment - I'm getting this too. Here is the message I get on a course page. Invalid info about available updates detected and will be ignored: Unexpected version of the response format. Please try to re-check for available updates. line 916 of /lib/pluginlib.php: call to debugging() line 753 of /lib/pluginlib.php: call to available_update_checker->restore_response() line 2259 of /lib/pluginlib.php: call to available_update_checker->get_update_info() line 145 of /lib/pluginlib.php: call to plugininfo_base->check_available_updates() line 9 of /admin/settings/plugins.php: call to plugin_manager->get_plugins() line 6100 of /lib/adminlib.php: call to require() line 3268 of /lib/navigationlib.php: call to admin_get_root() line 3173 of /lib/navigationlib.php: call to settings_navigation->load_administration_settings() line 701 of /lib/pagelib.php: call to settings_navigation->initialise() line 717 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav() line 133 of /blocks/settings/block_settings.php: call to moodle_page->__get() line 284 of /blocks/moodleblock.class.php: call to block_settings->get_content() line 232 of /blocks/moodleblock.class.php: call to block_base->formatted_contents() line 953 of /lib/blocklib.php: call to block_base->get_content_for_output() line 1005 of /lib/blocklib.php: call to block_manager->create_block_contents() line 353 of /lib/blocklib.php: call to block_manager->ensure_content_created() line 6 of /theme/base/layout/general.php: call to block_manager->region_has_content() line 793 of /lib/outputrenderers.php: call to include() line 740 of /lib/outputrenderers.php: call to core_renderer->render_page_layout() line 230 of /course/view.php: call to core_renderer->header()
        Hide
        Dan Poltawski added a comment -

        Added David here.

        He wrote, in a chat:

        that "Invalid info ..." is a DEBUGGING_ALL level message informing you that the most recent update info (stored locally) has been fetched with the previous version of Moodle and thence it is not valid any more.

        Show
        Dan Poltawski added a comment - Added David here. He wrote, in a chat: that "Invalid info ..." is a DEBUGGING_ALL level message informing you that the most recent update info (stored locally) has been fetched with the previous version of Moodle and thence it is not valid any more.
        Hide
        David Mudrak added a comment -

        Yeah, it turned out that this debugging message was not a good idea of mine. It just raises a lot of false alarm for no good reason. I am submitting a patch that removes the debugging completely.

        DEAR INTEGRATORS,

        there is no need to backport this to 2.3 IMHO.

        Show
        David Mudrak added a comment - Yeah, it turned out that this debugging message was not a good idea of mine. It just raises a lot of false alarm for no good reason. I am submitting a patch that removes the debugging completely. DEAR INTEGRATORS, there is no need to backport this to 2.3 IMHO.
        Hide
        Dan Poltawski added a comment -

        Thanks David, i've integrated this now.

        (ps. regaridng your comment in the chat 'that fact that the debugging was seen at so many pages worries me. It suggests that the whole pluginlib machinery is initialized')

        Do we have a bug to investigate this?

        Show
        Dan Poltawski added a comment - Thanks David, i've integrated this now. (ps. regaridng your comment in the chat 'that fact that the debugging was seen at so many pages worries me. It suggests that the whole pluginlib machinery is initialized') Do we have a bug to investigate this?
        Hide
        David Mudrak added a comment -

        Thanks Dan.

        I realized then that this is actually an expected result of MDL-35661. The commit 5cdb1893a9d7d331627c0f7d311ca32c922f5dc3 introduced loading of pluginlib.php for admins. We agreed with Marina that this was actually an improvement over other ways of loading list if installed plugins (which is needed to build the admin tree). And at the end, I probably over-reacted with that "whole pluginlib machinery". It does not fetch info from a remote server or so.

        So apart from the known sad fact that the navigation and settings blocks load a lot of information just to hide it in collapsed tree nodes, this does not need any extra investigation at the moment IMHO.

        Show
        David Mudrak added a comment - Thanks Dan. I realized then that this is actually an expected result of MDL-35661 . The commit 5cdb1893a9d7d331627c0f7d311ca32c922f5dc3 introduced loading of pluginlib.php for admins. We agreed with Marina that this was actually an improvement over other ways of loading list if installed plugins (which is needed to build the admin tree). And at the end, I probably over-reacted with that "whole pluginlib machinery". It does not fetch info from a remote server or so. So apart from the known sad fact that the navigation and settings blocks load a lot of information just to hide it in collapsed tree nodes, this does not need any extra investigation at the moment IMHO.
        Hide
        Jason Fowler added a comment -

        Upgraded without any issues at all David.

        Show
        Jason Fowler added a comment - Upgraded without any issues at all David.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Many, many thanks for your effort!

        Millions of people will enjoy the results of your work, yay!

        Closing as fixed. Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Many, many thanks for your effort! Millions of people will enjoy the results of your work, yay! Closing as fixed. Ciao

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: