cedaro / satispress

Expose installed WordPress plugins and themes as Composer packages.
500 stars 48 forks source link

Rejected by your constraint. #116

Closed minemindmedia closed 4 years ago

minemindmedia commented 4 years ago

Lately I've been getting the following errors for some plugins but not all of them.

The requested package satispress/advanced-forms-pro 1.6.6 exists as satispress/advanced-forms-pro[1.6.3] but these are rejected by your constraint.

The requested package satispress/woocommerce-cart-reports 1.2.5 exists as satispress/wo ocommerce-cart-reports[1.2.4] but these are rejected by your constraint.

image

image

As you can see, the releases are there and available.

All of these plugins are for the same project. I was able to update the composer file for the following Ninja Forms extensions 3.0.12 just fine but the others come back with the errors above.

image

I'm not sure I understand why some plugins aren't being recognized for their updated versions.

minemindmedia commented 4 years ago

Still having this problem and I can't find a solution. Installed a new plugin today, version 4.3 and receiving the same errors for this from composer.

image

bradyvercher commented 4 years ago

@minemindmedia Can you post your composer.json for a project where you're having this issue? It sounds like it might be a configuration issue rather than anything to do with SatisPress.

minemindmedia commented 4 years ago

@bradyvercher -- here you go sir. I've redacted some usernames, terms and keys but this is the file. The strange thing is, some of the satispress plugins work in this file when running composer update and some do not work and return the error I posted above.

{ "name": "roots/bedrock", "type": "project", "license": "MIT", "description": "WordPress boilerplate with modern development tools, easier configuration, and an improved folder structure", "homepage": "https://roots.io/bedrock/", "authors": [ { "name": "Scott Walkinshaw", "email": "scott.walkinshaw@gmail.com", "homepage": "https://github.com/swalkinshaw" }, { "name": "Ben Word", "email": "ben@benword.com", "homepage": "https://github.com/retlehs" } ], "keywords": [ "bedrock", "composer", "roots", "wordpress", "wp", "wp-config" ], "support": { "issues": "https://github.com/roots/bedrock/issues", "forum": "https://discourse.roots.io/category/bedrock" }, "config": { "preferred-install": "dist" }, "repositories": [ { "type": "composer", "url": "https://wpackagist.org" }, { "type": "package", "package": { "name": "advanced-custom-fields/advanced-custom-fields-pro", "version": "5.7.9", "type": "wordpress-muplugin", "dist": { "type": "zip", "url": "https://connect.advancedcustomfields.com/index.php?p=pro&a=download" }, "require": { "philippbaschke/acf-pro-installer": "^1.0", "composer/installers": "^1.0" } } }, { "type": "composer", "url": "https://composer.deliciousbrains.com/{key_redacted}" }, { "type": "composer", "url": "https://satispress.{user_redacted}.com/satispress/" }, { "type": "vcs", "url": "git@github.com:{user_redacted}/dtk-make-model-year-management.git"

    },
    {
        "type": "vcs",
        "url": "git@github.com:{user_redacted}/{term_redacted}-vendor-management.git"
    },
    {
        "type": "vcs",
        "url": "git@github.com:{user_redacted}/{term_redacted}-customer-admin-log.git"
    },
    {
        "type": "vcs",
        "url": "git@github.com:{user_redacted}/{term_redacted}-credited-balance.git"
    },
    {
        "type": "vcs",
        "url": "git@github.com:{user_redacted}/{term_redacted}-print-item-details.git"
    },
    {
        "type": "vcs",
        "url": "git@github.com:{user_redacted}/{term_redacted}-find-key.git"
    },
    {
        "type": "vcs",
        "url": "git@github.com:{user_redacted}/{term_redacted}-data-reports.git"
    },
    {
        "type": "vcs",
        "url": "git@github.com:{user_redacted}/{term_redacted}-bulk-report.git"
    },
    {
        "type": "vcs",
        "url": "git@github.com:{user_redacted}/{term_redacted}-{term_redacted}-search-keys.git"
    },
    {
        "type": "vcs",
        "url": "git@github.com:{user_redacted}/plugin-3rd-party-woocommerce-role-based-methods.git"
    },
    {
        "type": "vcs",
        "url": "git@github.com:{user_redacted}/plugin-3rd-party-woocommerce-print-invoices-packaging-lists.git"
    },
    {
        "type": "vcs",
        "url": "git@github.com:{user_redacted}/plugin-3rdparty-admin-menu-editor-pro.git"
    },
    {
        "type": "vcs",
        "url": "git@github.com:{user_redacted}/plugin-3rdparty-advanced-forms-pro.git"
    },
    {
        "type": "vcs",
        "url": "git@github.com:{user_redacted}/plugin-3rdparty-ninja-forms-user-management.git"
    },
    {
        "type": "vcs",
        "url": "git@github.com:{user_redacted}/plugin-3rdparty-login-with-ajax.git"
    }
],
"require": {
    "php": ">=7.1",
    "composer/installers": "^1.4",
    "vlucas/phpdotenv": "^2.0.1",
    "oscarotero/env": "^1.1.0",
    "roots/wordpress": "5.3",
    "roots/wp-config": "1.0.0",
    "roots/wp-password-bcrypt": "1.0.0",
    "advanced-custom-fields/advanced-custom-fields-pro": "^5.7.9",
    "deliciousbrains-plugin/wp-migrate-db-pro": "1.9.8",
    "deliciousbrains-plugin/wp-migrate-db-pro-cli": "^1.3.5",
    "deliciousbrains-plugin/wp-migrate-db-pro-media-files": "^1.4",
    "{user_redacted}/dtk-make-model-year-management": "@dev",
    "{user_redacted}/{term_redacted}-vendor-management": "@dev",
    "{user_redacted}/{term_redacted}-customer-admin-log": "@dev",
    "{user_redacted}/{term_redacted}-credited-balance": "@dev",
    "{user_redacted}/{term_redacted}-bulk-report": "@dev",
    "{user_redacted}/{term_redacted}-print-item-details": "@dev",
    "{user_redacted}/{term_redacted}-find-key": "@dev",
    "{user_redacted}/{term_redacted}-data-reports": "@dev",
    "{user_redacted}/{term_redacted}-{term_redacted}-search-keys": "@dev",
    "{user_redacted}/plugin-3rdparty-login-with-ajax": "@dev",
    "wpackagist-plugin/woocommerce": "3.7.0",
    "wpackagist-plugin/woocommerce-gateway-stripe": "4.2.4",
    "wpackagist-plugin/woocommerce-mailchimp": "2.3.3",
    "wpackagist-plugin/wc-fields-factory": "3.0.3",
    "wpackagist-plugin/search-by-sku-for-woocommerce": "0.6.2",
    "wpackagist-plugin/custom-post-type-widgets": "1.2.0",
    "wpackagist-plugin/acf-search": "2.1.7",
    "wpackagist-plugin/ninja-forms": "3.4.22",
    "wpackagist-plugin/acf-better-search":"3.4.3",
    "wpackagist-plugin/menu-exporter":"1.0",
    "wpackagist-plugin/woo-preview-emails":"1.5.1",
    "satispress/acf-quick-edit-fields-master": "3.0.1",
    "satispress/woocommerce-role-based-methods": "2.4.0",
    "satispress/woocommerce-pip": "3.7.1",
    "satispress/amazon-s3-and-cloudfront-pro": "2.1.1",
    "satispress/advanced-forms-pro": "1.6.6",
    "satispress/ninja-forms-user-management": "3.0.12",
    "satispress/ninja-forms-style": "3.0.28",
    "satispress/ninja-forms-conditionals": "3.0.26",
    "satispress/plugin-3rdparty-admin-menu-editor-pro-master": "2.6.2",
    "satispress/woocommerce-shipment-tracking": "1.6.8",
    "satispress/woocommerce-all-discounts": "4.3"
},
"require-dev": {
    "squizlabs/php_codesniffer": "^3.0.2",
    "roave/security-advisories": "dev-master"
},
"extra": {
    "installer-paths": {
        "web/app/mu-plugins/{$name}/": [
            "type:wordpress-muplugin"
        ],
        "web/app/plugins/{$name}/": [
            "type:wordpress-plugin"
        ],
        "web/app/themes/{$name}/": [
            "type:wordpress-theme"
        ]
    },
    "wordpress-install-dir": "web/wp"
},
"scripts": {
    "post-root-package-install": [
        "php -r \"copy('.env.example', '.env');\""
    ],
    "test": [
        "phpcs"
    ]
}

}

bradyvercher commented 4 years ago

I don't know that this will have any effect, but you might try removing VCS repositories for plugins that you're managing with SatisPress. For instance, you shouldn't need this repo:

{
        "type": "vcs",
        "url": "git@github.com:{user_redacted}/plugin-3rdparty-advanced-forms-pro.git"
}

Aside from that, check the /satispress/packages.json endpoint to make sure the versions you're requesting are available. Another possibility is that packages.json is being cached somewhere, so Composer isn't seeing the newer versions.

minemindmedia commented 4 years ago

Hi Brady, thanks for the response. I remove all my VCS repos just for testing purposes and it's still a problem here:

The requested package satispress/advanced-forms-pro 1.6.6 exists as satispress/advanced-forms-pro[1.6.3] but these are rejected by your constraint.

It shows that 1.6.6 is available here: image

But the package.json endpoint has no reference to 1.6.6 in the file.

bradyvercher commented 4 years ago

In that case, check the following location to see if the artifact has been cached for that version: wp-content/uploads/satispress-***/packages/plugins/advanced-forms-pro/advanced-forms-pro-1.6.6.zip

If that zip file doesn't exist, try clicking the 1.6.6 button in the admin panel (the one in your screenshot), then click the Download 1.6.6 button that appears. That should cause the zip file to be created just-in-time. Check to make sure it exists in the cache directory.

If it does exist, it should now be included in packages.json. That endpoint requires the file to exist so that it can include a checksum for Composer to verify it.

If it's still not showing up, then my best guess is that it might be a caching issue for that endpoint.

It does look like automatic caching isn't working for that particular plugin for some reason. 1.6.4 and 1.6.5 both appear to be missing, so you might verify that the plugin is set up to receive updates. You can also check the update_plugins site transient to see if it includes a URL to download version 1.6.6.

tyrann0us commented 4 years ago

@bradyvercher, we also have the problem described by @minemindmedia from time to time.

[…] check the /satispress/packages.json endpoint to make sure the versions you're requesting are available.

In my tests, the packages.json indeed did not contain the latest version of the affected plugin(s). Since the problem does not occur at the moment, I cannot tell if the artifact was cached for that version. Will check it the next time the problem occurs.

minemindmedia commented 4 years ago

@bradyvercher -- ok great! Downlading the version, refreshing and checking the package.json file now includes the 1.6.6 and I was able to run composer update without issue. Thanks so much for your help with this!

bradyvercher commented 4 years ago

@tyrann0us Thanks for confirming that!

@minemindmedia Glad to hear you were able to get the latest release to show up. I'm still concerned that a couple of releases are missing, which means they weren't automatically cached, so you'll likely have the same problem the next time an update is released.

I'm going to close this out, but If it does happen again, check the update_plugins site transient and verify that there is a publicly accessible package URL for the plugin in question. Feel free to reopen this issue with that information. Thanks!