pivvenit / acf-composer-bridge

Provides a static composer repository that references all Advanced Custom Fields Pro versions
MIT License
47 stars 8 forks source link

Unable to update ACF #12

Closed Sandy-Garrido closed 3 years ago

Sandy-Garrido commented 3 years ago

[Composer\Downloader\TransportException]
The "https://connect.advancedcustomfields.com/v2/plugins/download?p=pro&t=5.9.5" file could not be downloaded (HTTP/1.1 404 Not Found)

Looks like this URL is returning a 404? Anyone else getting this issue?

Qrious commented 3 years ago

Hi,

I've just tried to reproduce your issue, but unfortunately i'm unable to reproduce it. In order to help you, can you provide me with the following information:

  1. Which composer repository do you use?
  2. Which is your composer version? You can obtain it by running composer --version.
  3. Does the below composer.json example work for you with the following command: composer install --no-cache -vvv Can you please provide me with the relevant lines i've posted below (mind to remove your key)

    {
    "name": "example/test",
    "repositories": [
     {
       "type": "composer",
       "url": "https://pivvenit.github.io/acf-composer-bridge/composer/v3/wordpress-muplugin/"
     }
    ],
    "require": {
     "advanced-custom-fields/advanced-custom-fields-pro": "^5.9.5"
    }
    }
    [...]  // Lots of lines before this
    > pre-file-download: PivvenIT\Composer\Installers\ACFPro\ACFProInstallerPlugin->onPreFileDownload
    - Downloading advanced-custom-fields/advanced-custom-fields-pro (5.9.5)
    Downloading https://connect.advancedcustomfields.com/v2/plugins/download?p=pro&t=5.9.5&k={KEY HERE}
    - Installing composer/installers (v1.9.0): Extracting archive
    Executing command (CWD): rmdir /S /Q "{PATH}\vendor\composer\installers"
    Executing command (CWD): rmdir /S /Q "{PATH}\vendor\composer\1c21e311"
    Loading plugin Composer\Installers\Plugin
    - Installing advanced-custom-fields/advanced-custom-fields-pro (5.9.5): Extracting archive
    Executing command (CWD): rmdir /S /Q "{PATH}\wp-content\mu-plugins\advanced-custom-fields-pro"
    Executing command (CWD): rmdir /S /Q "{PATH}\vendor\composer\6adea1ba"
    Executing command (CWD): rmdir /S /Q "{PATH}\vendor\advanced-custom-fields\advanced-custom-fields-pro"
Sandy-Garrido commented 3 years ago

Hey! thanks for the fast response. Oh, damn, I really thought there was an issue, but thanks for assisting!

Here's what I have

Composer: 1.10.20

{
  "name": "xxx",

  "repositories": [
    {
      "type": "composer",
      "url": "https://pivvenit.github.io/acf-composer-bridge/composer/v3/wordpress-plugin/"
    }
  ],
  "require": {
    "advanced-custom-fields/advanced-custom-fields-pro": "^5.9.4"
  }
}
Sandy-Garrido commented 3 years ago

Also, I used solely your example but I just get

Package operations: 1 install, 0 updates, 0 removals
  - Installing advanced-custom-fields/advanced-custom-fields-pro (5.9.5): Downloading (failed)       

  [Composer\Downloader\TransportException]                                                                                                
  The "https://connect.advancedcustomfields.com/v2/plugins/download?p=pro&t=5.9.5" file could not be downloaded (HTTP/1.1 404 Not Found)  
Sandy-Garrido commented 3 years ago

Ah, okay! It's not reading and appending my key for some reason.. :/

Sandy-Garrido commented 3 years ago

Seems that there was a problem with dotenv version & the fact I was using lando composer install (lando is a 3rd party tool) but I'm all good now thanks! closing

Qrious commented 3 years ago

Glad I could be of assistance :) I'm curious about the issue with the dotenv version, since we aim to be compatible with all release versions of dotenv >= 3. @Sandy-Garrido Can you provide a bit more details, so I might be able to fix this problem, and for any future visitors?

alfie-bowen commented 2 years ago

@Qrious I am also getting this error while using Lando's Wordpress recipe on Windows 10. Reproduction steps:

  1. Setup wordpress project with acf-composer-bridge mu-plugin variant
  2. run lando init and select the wordpress starter recipe
  3. run lando start
  4. run lando ssh and then composer install
  5. Error in console shows [Composer\Downloader\TransportException] The "https://connect.advancedcustomfields.com/v2/plugins/download?p=pro&t=5.11.4" file could not be downloaded (HTTP/1.1 404 Not Found)
  6. As can be seen, the url doesn't include the &k=XXX so ACF returns a 404

I can't see where the key is appended in the build.php script so not sure where it's going wrong.

Qrious commented 2 years ago

@alfie-bowen Since setting up lando takes quite a few steps, could you please first verify that the output of composer install --no-cache -vvv includes the key you expect (as shown below)?

[...]  // Lots of lines before this
Downloading https://api.github.com/repos/composer/installers/zipball/d20a64ed3c94748397ff5973488761b22f6d3f19
pre-file-download: PivvenIT\Composer\Installers\ACFPro\ACFProInstallerPlugin->onPreFileDownload
 - Downloading advanced-custom-fields/advanced-custom-fields-pro (5.11.4)
Downloading https://connect.advancedcustomfields.com/v2/plugins/download?p=pro&t=5.11.4&k={YOURKEYHERE}