Could not load packages drupal/mailchimp in composer repo

Created on 28 June 2023, over 1 year ago

We're seeing composer errors when trying to get the latest Mailchimp...

composer update drupal/mailchimp

In ComposerRepository.php line 1419:

  Could not load packages drupal/mailchimp in composer repo (https://packages.drupal.org/8) from cached file (provider-drupal~mailchimp.json originating from https://packages.drupal.org/
  files/packages/8/p2/drupal/mailchimp.json): [UnexpectedValueException] Package drupal/mailchimp's source key should be specified as {"type": ..., "url": ..., "reference": ...},
  {"type":"git","url":"https:\/\/git.drupalcode.org\/project\/mailchimp.git","reference":null} given.


In ArrayLoader.php line 178:

  Package drupal/mailchimp's source key should be specified as {"type": ..., "url": ..., "reference": ...},
  {"type":"git","url":"https:\/\/git.drupalcode.org\/project\/mailchimp.git","reference":null} given.

💬 Support request
Status

Fixed

Version

2.2

Component

General

Created by

🇺🇸United States kruser

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kruser
  • 🇺🇸United States wolcen

    I am also seeing this after a composer clear cache. Looking at the reported URL, you will see that while the 2.2.2 release is fine, the second packages entry (2.2.1) has a null reference value.

  • 🇸🇮Slovenia joco_sp

    We have the same problem

  • 🇨🇦Canada turbogeek

    I'm getting this composer error as well and was about to add this to the issue queue. I also see the packages null values.

  • 🇺🇸United States aprice42

    Thanks for raising this issue, we are looking into it now!

  • 🇫🇷France laborouge

    Specifying a fixed version like 2.2.2 in the composer.json solved the problem for me, but it's not a real solution.

  • 🇺🇸United States wolcen

    Excellent point @laborouge! Thanks, that does the trick...for today!
    FWIW, given you have curl + jq, you can quickly see the problem section here:
    curl -s "https://packages.drupal.org/files/packages/8/p2/drupal/mailchimp.json" | jq '.packages."drupal/mailchimp"[1].dist' -
    Contrast this result when using [0] instead of [1].

  • 🇺🇸United States greggles Denver, Colorado, USA

    Sorry about that - looking now.

  • 🇺🇸United States aprice42

    This looks like an issue with drupal packagist, I am not sure why release 2.2.1 was given a null reference. I opened an issue with that team so hopefully they can resolve or provide some direction about how to fix!

    In the meantime as @laborouge pointed out you can manually change your composer.json file to require version 2.2.2 - something like this worked for me:

        "require": {
            "drupal/mailchimp": "^2.2.2"
        },
    

    Followed by:

    composer update drupal/mailchimp

  • 🇺🇸United States paulmckibben Atlanta, GA

    Thanks @aprice42. Here's a one-line version that also works:
    composer require drupal/mailchimp:^2.2.2 --update-with-all-dependencies

  • 🇺🇸United States freelock Seattle

    Bumping the priority -- this breaks "composer outdated" entirely, for any site that has Mailchimp installed... even after installing the updated version.

    This makes it impossible to discover available releases using composer on any affected site!

  • 🇺🇸United States srdtwc Skokie, IL

    @paulmckibben that works but it will update all composer packages, including other Drupal modules

  • 🇺🇸United States paulmckibben Atlanta, GA

    @srdtwc - thanks for your feedback. I have other out-of-date modules, and they did not get updated. But maybe I am misunderstanding what you mean.

  • Status changed to Fixed over 1 year ago
  • 🇺🇸United States greggles Denver, Colorado, USA

    Thanks for the updated feedback.

    Fixing this requires the folks from Drupal Infrastructure (i.e. Drupal Association) to fix and they are actively working on it.

    Since there's an issue in the packing queue I think this one is mostly like a support request that is "fixed" since there is a workaround here. I don't think we should choose a "closed" status as that would hide it from the queue.

  • 🇺🇸United States kruser

    It appears to be fixed now! Thanks for your help.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024