Composer for premium extension not working

Support General Composer for premium extension not workingResolved

  • This topic has 7 replies, 2 voices, and was last updated 1 year ago by PeterPeter.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #45206
    Jai IvarssonJai Ivarsson
    Participant

    I'm trying to use composer to load a premium extension for the first time following these instructions https://docs.metabox.io/integration/#using-composer. Note in the below I have removed my actual license key for obvious reasons.

    My composer.json file works if I only try for free extensions but when I run composer install or update I get this error:
    curl error 23 while downloading https://packages.metabox.io/packages.php?key=<my-key>: Failed writing received data to disk/application

    This is my composer.json file:

    {
        "repositories":[
            {
                "type": "composer",
                "url": "https://wpackagist.org"
            },
            {
                "type": "composer",
                "url": "https://packages.metabox.io/<my-key>"
            }
        ],
        "require": {
            "wpackagist-plugin/meta-box": "^5",
            "wpackagist-plugin/mb-settings-page": "dev-master"
        },
        "extra": {
            "installer-paths": {
                "vendor/meta-box/{$name}": [
                    "vendor:wpackagist-plugin",
                    "vendor:meta-box"
                ]
            }
        },
        "autoload": {
            "files": [
                "vendor/meta-box/meta-box/meta-box.php",
                "vendor/meta-box/mb-settings-page/mb-settings-page.php"
            ]
        },
        "config": {
          "allow-plugins": {
            "composer/installers": true
          }
        }
    

    Anyone know what could cause this?

    #45211
    PeterPeter
    Moderator

    Hello Jai,

    I check the composer feature on my local site but don't see that issue. Please double-check the key on your account and ensure it is correct.

    #45213
    Jai IvarssonJai Ivarsson
    Participant

    Thanks for your reply Peter.

    The key definitely is fine as I have it working on multiple sites. But to make sure I generated a new one and tried that and got the same error.

    #45217
    PeterPeter
    Moderator

    Hello,

    It could be a permission issue. Please get in touch with your hosting support and ask them for more information about the error "curl error 23" when downloading a premium plugin from the URL https://packages.metabox.io/
    Also, please share a screen record of the steps you do on your end.

    #45225
    Jai IvarssonJai Ivarsson
    Participant

    Thanks Peter.

    This curl error is returned running composer in my local dev environment. There isn't hosting involved.

    To clarify, I'm running the composer command from my local terminal and getting that error.

    #45234
    PeterPeter
    Moderator

    Hello,

    Can you share a screen record of steps you do on the local site?

    #45264
    Jai IvarssonJai Ivarsson
    Participant

    Hi, I managed to fix this and thought I'd put the answer here for anyone else that comes across it.

    Short answer is found on this page https://github.com/composer/composer/issues/11913

    Seems that something with the a curl version installed on my Mac. Updating curl fixed it. Doesn't seem to have been the fix for everyone.

    In particular this problem only happened when trying to download and install the premium extensions.

    #45265
    PeterPeter
    Moderator

    Thanks for sharing the solution.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.