Problem/Motivation

If you try to install the module via the GUI using for example https://ftp.drupal.org/files/projects/libraries-8.x-3.x-dev.tar.gz from /admin/modules/install, or update the module from /admin/reports/updates/update you get this error:

The website encountered an unexpected error. Please try again later.

From the error log:

Drupal\Core\Extension\InfoParserException: Missing required keys (type) in temporary://update-extraction-e51370ab/libraries/tests/example/example_info_file.libraries.info.yml in Drupal\Core\Extension\InfoParserDynamic->parse() (line 57 of /app/web/core/lib/Drupal/Core/Extension/InfoParserDynamic.php).

It looks like the /tests/example/example_info_file.libraries.info.yml file is missing a type definition, like this:

type: module

Also mentioned by @djween in #5

Possibly related issue: #1606606: Drupal.org release packager corrupts info files that are not modules, themes, or install profiles.

Steps to reproduce

Go to /admin/modules/install and try to add the module with for example https://ftp.drupal.org/files/projects/libraries-8.x-3.x-dev.tar.gz (or the latest release), or update already installed module from /admin/reports/updates/update.

Proposed resolution

Adding type in the /tests/example/example_info_file.libraries.info.yml file is not enough, it looks like more work is required, to make the tests pass ... probably the tests for D9 needs updating.

Original issue was #3186677: fix deprecated tests for D9x compatibility.

CommentFileSizeAuthor
#8 3190825-8.patch542 bytesmohit.bansal623
#5 3190825-5.patch388 bytesmohit.bansal623

Comments

ressa created an issue. See original summary.

dd 85’s picture

The problem is present for the version 8.x-3.0-beta1

ressa’s picture

Issue summary: View changes

Thanks for commenting @DD 85, I have added a bit of text in the Issue summary to clarify that the issue can be reproduced with both the dev-release, or latest official release.

bart lambert’s picture

having same problem, but only on 1 site. Another site took the update without problem

mohit.bansal623’s picture

Status: Active » Needs review
StatusFileSize
new388 bytes

Status: Needs review » Needs work

The last submitted patch, 5: 3190825-5.patch, failed testing. View results

ressa’s picture

Thanks @mohit.bansal623, please see Proposed resolution in this issue. We probably need to get the tests working first, possibly in #3186677: fix deprecated tests for D9x compatibility.

mohit.bansal623’s picture

StatusFileSize
new542 bytes

I have tried that proposed solution in #5, it failed one of the test case.
Uploading a new patch.

paulocs’s picture

This issue was fixed in #3186677: fix deprecated tests for D9x compatibility
Can you please confirm?

Try to install the last dev version of the site via GUI.

ressa’s picture

Thanks for working on that issue with the tests and got them working @paulocs!

I still get the same error ...:

The website encountered an unexpected error. Please try again later.

Drupal\Core\Extension\InfoParserException: Missing required keys (type) in temporary://update-extraction-d9921aa7/libraries/tests/example/example_info_file.libraries.info.yml in Drupal\Core\Extension\InfoParserDynamic->parse() (line 57 of core/lib/Drupal/Core/Extension/InfoParserDynamic.php).

dd 85’s picture

The problem persists when upgrading from 8.x-3.0-beta1 to 8.x-3.0-beta2

kazah’s picture

I confirm The problem persists when upgrading from 8.x-3.0-beta1 to 8.x-3.0-beta2
It doesn;t work.