D8 - Google Analytics 8.x-2.5 not compatible with Drupal 8.8.5 or lower

By xngo on August 29, 2020

Issue

I recently move my Drupal 8 website to another webserver. When I tried to upgrade Google Analytics to version 8.x-2.5 from Drupal's user interface and got the following error message:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /batch?id=53&op=do_nojs&op=do
StatusText: 500 Service unavailable (with message)
ResponseText: The website encountered an unexpected error. Please try again later.

Looking into the log messages, it showed the following error mesasge:

Drupal\Core\Extension\InfoParserException: The 'core' or the 'core_version_requirement' key must be present in temporary://update-extraction-a2517041/google_analytics/tests/modules/google_analytics_test/google_analytics_test.info.yml in Drupal\Core\Extension\InfoParserDynamic->parse() (line 68 of /var/www/theholidaybreak.com/public_html/core/lib/Drupal/Core/Extension/InfoParserDynamic.php).

Solution

I initially thought the issue was due to the permission set on my Temporary directory folder. I even set it to chmod 777 but in vain. I finally gave up and manually downloaded and extracted it over the old folder. Then, I logged in Drupal and navigate to admin/modules. It stated that version 8.x-2.5 is not compatible with my Drupal 8.8.1.

To resolve this issue, I upgraded my Drupal to 8.9.3.

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.