Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

composer update on v2.4.2: Failed to write into cache: file_put_contents(%localappdata%/Composer/repo/...) In Cache.php line 147 #11076

Closed
aetonsi opened this issue Sep 22, 2022 · 6 comments
Labels

Comments

@aetonsi
Copy link

aetonsi commented Sep 22, 2022

My composer.json:

{
    "name": "appcard/backend",
    "type": "project",
    "description": "App Card backend.",
    "keywords": [
        "app card",
        "backend"
    ],
    "license": "proprietary",
    "require": {
        "php": "^8.0.2",
        "ext-pdo_pgsql": "*",
        "ext-pgsql": "*",
        "ext-fileinfo": "*",
        "guzzlehttp/guzzle": "^7.2",
        "intervention/image": "^2.7",
        "laravel/framework": "^9.2",
        "laravel/sanctum": "^2.14.1",
        "laravel/tinker": "^2.7",
        "spatie/laravel-google-cloud-storage": "^2.0"
    },
    "require-dev": {
        "barryvdh/laravel-ide-helper": "^2.12",
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.4",
        "nunomaduro/collision": "^6.1",
        "phpunit/phpunit": "^9.5.10",
        "spatie/laravel-ignition": "^1.0",
        "sven/artisan-view": "^3.5"
    },
    "autoload": {
        "files": [
            "app/helpers.php"
        ],
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "pre-update-cmd": [
            "php -f \"_scripts/composer_preinstall.php\""
        ],
        "post-update-cmd": [
            "php -f \"_scripts/composer_postinstall.php\"",
            "@php artisan vendor:publish --tag=laravel-assets --ansi --force"
        ],
        "pre-install-cmd": [
            "php -f \"_scripts/composer_preinstall.php\""
        ],
        "post-install-cmd": [
            "php -f \"_scripts/composer_postinstall.php\""
        ],
        "compile": [
            "php -f \"_scripts/composer_postinstall.php\""
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

Output of composer diagnose:

Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK git version 2.37.3
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys: 
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: You are not running the latest 2.2 version, run `composer self-update` to update (2.4.2 => 2.2.18)
Composer version: 2.4.2
PHP version: 8.1.10
PHP binary path: C:\tools\php81\php.exe
OpenSSL version: OpenSSL 1.1.1q  5 Jul 2022
cURL version: 7.77.0 libz 1.2.12 ssl OpenSSL/1.1.1q
zip: extension present, unzip present, 7-Zip present (7z)

When I run this command:

composer update -vvv

I get the following output:

PLEASE NOTE: i HAVE to truncate the output as it's too big for github (max 65536 characters). I will put "..." instead of portions of the output

Running 2.4.2 (2022-09-14 16:11:15) with PHP 8.1.10 on Windows NT / 10.0
Reading ./composer.json (A:\projects\app-card-backend\composer.json)
Loading config file ./composer.json (A:\projects\app-card-backend\composer.json)
Checked CA file A:\projects\app-card-backend\storage\framework\cache\cacert.pem: valid
Executing command (A:\projects\app-card-backend): git branch -a --no-color --no-abbrev -v
Executing command (A:\projects\app-card-backend): git describe --exact-match --tags
Executing command (CWD): git --version
Executing command (A:\projects\app-card-backend): git log --pretty="%H" -n1 HEAD --no-show-signature
Executing command (A:\projects\app-card-backend): hg branch
Executing command (A:\projects\app-card-backend): fossil branch list
Executing command (A:\projects\app-card-backend): fossil tag list
Executing command (A:\projects\app-card-backend): svn info --xml
Failed to initialize global composer: Composer could not find the config file: C:/Users/u6/AppData/Roaming/Composer/composer.json

Reading ./composer.lock (A:\projects\app-card-backend\composer.lock)
Reading A:\projects\app-card-backend/vendor/composer/installed.json (A:\projects\app-card-backend\vendor\composer\installed.json)
> pre-update-cmd: php -f "_scripts/composer_preinstall.php"
Executing command (CWD): php -f "_scripts/composer_preinstall.php"

>>> composer_preinstall.php
====== A:\projects\app-card-backend\_scripts\update_phpini.cmd ====== 
 

>>> update_phpini.php

php.ini already OK (C:\tools\php81\php.ini).

Loading composer repositories with package information
Downloading https://repo.packagist.org/packages.json
[200] https://repo.packagist.org/packages.json
Info from https://repo.packagist.org: #StandWithUkraine
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/packages.json into cache
Downloading https://repo.packagist.org/p2/guzzlehttp/guzzle.json
Downloading https://repo.packagist.org/p2/intervention/image.json
Downloading https://repo.packagist.org/p2/laravel/framework.json
Downloading https://repo.packagist.org/p2/laravel/sanctum.json
Downloading https://repo.packagist.org/p2/laravel/tinker.json
Downloading https://repo.packagist.org/p2/spatie/laravel-google-cloud-storage.json
Downloading https://repo.packagist.org/p2/barryvdh/laravel-ide-helper.json
Downloading https://repo.packagist.org/p2/fakerphp/faker.json
Downloading https://repo.packagist.org/p2/laravel/sail.json
Downloading https://repo.packagist.org/p2/mockery/mockery.json
Downloading https://repo.packagist.org/p2/nunomaduro/collision.json
Downloading https://repo.packagist.org/p2/phpunit/phpunit.json
[200] https://repo.packagist.org/p2/guzzlehttp/guzzle.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-guzzlehttp~guzzle.json into cache
Downloading https://repo.packagist.org/p2/spatie/laravel-ignition.json
[200] https://repo.packagist.org/p2/intervention/image.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-intervention~image.json into cache
Downloading https://repo.packagist.org/p2/sven/artisan-view.json
[200] https://repo.packagist.org/p2/laravel/framework.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-laravel~framework.json into cache
Downloading https://repo.packagist.org/p2/guzzlehttp/guzzle~dev.json
[200] https://repo.packagist.org/p2/laravel/sanctum.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-laravel~sanctum.json into cache
[200] https://repo.packagist.org/p2/laravel/tinker.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-laravel~tinker.json into cache
[200] https://repo.packagist.org/p2/spatie/laravel-google-cloud-storage.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-spatie~laravel-google-cloud-storage.json into cache
[200] https://repo.packagist.org/p2/barryvdh/laravel-ide-helper.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-barryvdh~laravel-ide-helper.json into cache
[200] https://repo.packagist.org/p2/fakerphp/faker.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-fakerphp~faker.json into cache
Downloading https://repo.packagist.org/p2/intervention/image~dev.json
Downloading https://repo.packagist.org/p2/laravel/framework~dev.json
Downloading https://repo.packagist.org/p2/laravel/sanctum~dev.json
Downloading https://repo.packagist.org/p2/laravel/tinker~dev.json
Downloading https://repo.packagist.org/p2/spatie/laravel-google-cloud-storage~dev.json
[200] https://repo.packagist.org/p2/laravel/sail.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-laravel~sail.json into cache
[200] https://repo.packagist.org/p2/mockery/mockery.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-mockery~mockery.json into cache
[200] https://repo.packagist.org/p2/nunomaduro/collision.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nunomaduro~collision.json into cache
[200] https://repo.packagist.org/p2/phpunit/phpunit.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpunit~phpunit.json into cache
Downloading https://repo.packagist.org/p2/barryvdh/laravel-ide-helper~dev.json
Downloading https://repo.packagist.org/p2/fakerphp/faker~dev.json
Downloading https://repo.packagist.org/p2/laravel/sail~dev.json
Downloading https://repo.packagist.org/p2/mockery/mockery~dev.json
[200] https://repo.packagist.org/p2/spatie/laravel-ignition.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-spatie~laravel-ignition.json into cache
[200] https://repo.packagist.org/p2/sven/artisan-view.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sven~artisan-view.json into cache





...





Downloading https://repo.packagist.org/p2/seld/phar-utils~dev.json
Downloading https://repo.packagist.org/p2/symfony/filesystem~dev.json
Downloading https://repo.packagist.org/p2/react/promise~dev.json
[200] https://repo.packagist.org/p2/doctrine/common~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine~common~dev.json into cache
[200] https://repo.packagist.org/p2/phpdocumentor/reflection-common~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpdocumentor~reflection-common~dev.json into cache
[200] https://repo.packagist.org/p2/composer/ca-bundle~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-composer~ca-bundle~dev.json into cache
[200] https://repo.packagist.org/p2/composer/metadata-minifier~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-composer~metadata-minifier~dev.json into cache
[200] https://repo.packagist.org/p2/composer/semver~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-composer~semver~dev.json into cache
Downloading https://repo.packagist.org/p2/seld/signal-handler~dev.json
Downloading https://repo.packagist.org/p2/sebastian/code-unit-reverse-lookup~dev.json
Downloading https://repo.packagist.org/p2/sebastian/complexity~dev.json
Downloading https://repo.packagist.org/p2/sebastian/lines-of-code~dev.json
Downloading https://repo.packagist.org/p2/theseer/tokenizer~dev.json
[200] https://repo.packagist.org/p2/composer/spdx-licenses~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-composer~spdx-licenses~dev.json into cache
[200] https://repo.packagist.org/p2/composer/xdebug-handler~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-composer~xdebug-handler~dev.json into cache
[200] https://repo.packagist.org/p2/justinrainbow/json-schema~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-justinrainbow~json-schema~dev.json into cache
[200] https://repo.packagist.org/p2/seld/jsonlint~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-seld~jsonlint~dev.json into cache
[200] https://repo.packagist.org/p2/seld/phar-utils~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-seld~phar-utils~dev.json into cache
[200] https://repo.packagist.org/p2/symfony/filesystem~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony~filesystem~dev.json into cache
[200] https://repo.packagist.org/p2/react/promise~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-react~promise~dev.json into cache
Downloading https://repo.packagist.org/p2/sebastian/recursion-context~dev.json
Downloading https://repo.packagist.org/p2/sebastian/object-reflector~dev.json
Downloading https://repo.packagist.org/p2/phpdocumentor/reflection-docblock~dev.json
Downloading https://repo.packagist.org/p2/illuminate/pipeline~dev.json
Downloading https://repo.packagist.org/p2/spatie/backtrace~dev.json
[200] https://repo.packagist.org/p2/seld/signal-handler~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-seld~signal-handler~dev.json into cache
[200] https://repo.packagist.org/p2/sebastian/code-unit-reverse-lookup~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian~code-unit-reverse-lookup~dev.json into cache
[200] https://repo.packagist.org/p2/sebastian/complexity~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian~complexity~dev.json into cache
[200] https://repo.packagist.org/p2/sebastian/lines-of-code~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian~lines-of-code~dev.json into cache
[200] https://repo.packagist.org/p2/theseer/tokenizer~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-theseer~tokenizer~dev.json into cache
[200] https://repo.packagist.org/p2/sebastian/recursion-context~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian~recursion-context~dev.json into cache
[200] https://repo.packagist.org/p2/sebastian/object-reflector~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian~object-reflector~dev.json into cache
[200] https://repo.packagist.org/p2/phpdocumentor/reflection-docblock~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpdocumentor~reflection-docblock~dev.json into cache
[200] https://repo.packagist.org/p2/illuminate/pipeline~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-illuminate~pipeline~dev.json into cache
[200] https://repo.packagist.org/p2/spatie/backtrace~dev.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-spatie~backtrace~dev.json into cache
Reading C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony~mime.json from cache
Reading C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine~lexer.json from cache
Reading C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpdocumentor~reflection-docblock.json from cache
Downloading https://repo.packagist.org/p2/symfony/property-access.json
Downloading https://repo.packagist.org/p2/symfony/property-info.json
Downloading https://repo.packagist.org/p2/symfony/serializer.json
Downloading https://repo.packagist.org/p2/symfony/contracts.json
Downloading https://repo.packagist.org/p2/symfony/debug.json
Reading C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian~diff.json from cache
Reading C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian~exporter.json from cache
Downloading https://repo.packagist.org/p2/symfony/polyfill-intl-normalizer.json
Downloading https://repo.packagist.org/p2/symfony/polyfill-php70.json
Downloading https://repo.packagist.org/p2/dflydev/dot-access-data.json
Downloading https://repo.packagist.org/p2/nette/schema.json
Downloading https://repo.packagist.org/p2/symfony/translation-contracts.json
Downloading https://repo.packagist.org/p2/symfony/polyfill-php81.json
Downloading https://repo.packagist.org/p2/symfony/polyfill-intl-grapheme.json
Reading C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine~inflector.json from cache
Reading C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony~mime~dev.json from cache
Reading C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine~lexer~dev.json from cache
Reading C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-phpdocumentor~reflection-docblock~dev.json from cache
Reading C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian~diff~dev.json from cache
Reading C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sebastian~exporter~dev.json from cache
Reading C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine~inflector~dev.json from cache
[200] https://repo.packagist.org/p2/symfony/property-access.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony~property-access.json into cache
Downloading https://repo.packagist.org/p2/symfony/event-dispatcher-contracts.json
[200] https://repo.packagist.org/p2/symfony/property-info.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony~property-info.json into cache
Downloading https://repo.packagist.org/p2/paragonie/random_compat.json
[200] https://repo.packagist.org/p2/symfony/serializer.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony~serializer.json into cache
[200] https://repo.packagist.org/p2/symfony/contracts.json


...


> post-update-cmd: @php artisan vendor:publish --tag=laravel-assets --ansi --force
Executing command (CWD): C:\tools\php81\php.exe -d allow_url_fopen=1 -d disable_functions="" -d memory_limit=1536M artisan vendor:publish --tag=laravel-assets --ansi --force

  �[37;44m INFO �[39;49m No publishable resources for tag �[1m[laravel-assets]�[22m.  

Downloading https://repo.packagist.org/p2/barryvdh/laravel-ide-helper.json
Downloading https://repo.packagist.org/p2/barryvdh/reflection-docblock.json
Downloading https://repo.packagist.org/p2/brick/math.json
Downloading https://repo.packagist.org/p2/composer/pcre.json
Downloading https://repo.packagist.org/p2/dflydev/dot-access-data.json
Downloading https://repo.packagist.org/p2/doctrine/cache.json
Downloading https://repo.packagist.org/p2/doctrine/dbal.json
Downloading https://repo.packagist.org/p2/doctrine/deprecations.json
Downloading https://repo.packagist.org/p2/doctrine/event-manager.json
Downloading https://repo.packagist.org/p2/doctrine/inflector.json
Downloading https://repo.packagist.org/p2/doctrine/instantiator.json
Downloading https://repo.packagist.org/p2/doctrine/lexer.json
[200] https://repo.packagist.org/p2/barryvdh/laravel-ide-helper.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-barryvdh~laravel-ide-helper.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-barryvdh~laravel-ide-helper.json.632cd8b1304873.82771019.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/barryvdh/reflection-docblock.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-barryvdh~reflection-docblock.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-barryvdh~reflection-docblock.json.632cd8b130d807.85051862.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/brick/math.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-brick~math.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-brick~math.json.632cd8b1313135.57047230.tmp): Failed to open stream: No such file or directory
Downloading https://repo.packagist.org/p2/dragonmantank/cron-expression.json
Downloading https://repo.packagist.org/p2/egulias/email-validator.json
Downloading https://repo.packagist.org/p2/fakerphp/faker.json
[200] https://repo.packagist.org/p2/composer/pcre.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-composer~pcre.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-composer~pcre.json.632cd8b13d4c34.87312214.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/dflydev/dot-access-data.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-dflydev~dot-access-data.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-dflydev~dot-access-data.json.632cd8b13d8824.62654711.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/doctrine/cache.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine~cache.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine~cache.json.632cd8b13ddba7.94218285.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/doctrine/dbal.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine~dbal.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine~dbal.json.632cd8b13e5c70.52422856.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/doctrine/deprecations.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine~deprecations.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine~deprecations.json.632cd8b13ea598.18283253.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/doctrine/event-manager.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine~event-manager.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine~event-manager.json.632cd8b13ed858.97468926.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/doctrine/inflector.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine~inflector.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-doctrine~inflector.json.632cd8b13f18d2.57662908.tmp): Failed to open stream: No such file or directory





...





Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-league~mime-type-detection.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-league~mime-type-detection.json.632cd8b176ae99.33805960.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/mockery/mockery.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-mockery~mockery.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-mockery~mockery.json.632cd8b176f9c1.64259592.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/monolog/monolog.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-monolog~monolog.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-monolog~monolog.json.632cd8b1776966.92814129.tmp): Failed to open stream: No such file or directory
Downloading https://repo.packagist.org/p2/phar-io/version.json
Downloading https://repo.packagist.org/p2/phpdocumentor/reflection-common.json
Downloading https://repo.packagist.org/p2/phpdocumentor/type-resolver.json
Downloading https://repo.packagist.org/p2/phpoption/phpoption.json
[200] https://repo.packagist.org/p2/myclabs/deep-copy.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-myclabs~deep-copy.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-myclabs~deep-copy.json.632cd8b17e16f5.46046449.tmp): Failed to open stream: No such file or directory
Downloading https://repo.packagist.org/p2/phpunit/php-code-coverage.json
[200] https://repo.packagist.org/p2/nesbot/carbon.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nesbot~carbon.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nesbot~carbon.json.632cd8b180fb69.90939029.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/nette/schema.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nette~schema.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nette~schema.json.632cd8b1813e10.86387838.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/nette/utils.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nette~utils.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-nette~utils.json.632cd8b18187c8.67259638.tmp): Failed to open stream: No such file or directory






...






[200] https://repo.packagist.org/p2/symfony/uid.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony~uid.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony~uid.json.632cd8b2054fa5.07756218.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/symfony/var-dumper.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony~var-dumper.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony~var-dumper.json.632cd8b20b1676.15643267.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/theseer/tokenizer.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-theseer~tokenizer.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-theseer~tokenizer.json.632cd8b20b6a36.07014149.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/tijsverkoyen/css-to-inline-styles.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-tijsverkoyen~css-to-inline-styles.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-tijsverkoyen~css-to-inline-styles.json.632cd8b20ba189.23682531.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/vlucas/phpdotenv.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-vlucas~phpdotenv.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-vlucas~phpdotenv.json.632cd8b20bfa93.92543777.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/voku/portable-ascii.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-voku~portable-ascii.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-voku~portable-ascii.json.632cd8b20c40f8.87636786.tmp): Failed to open stream: No such file or directory
[200] https://repo.packagist.org/p2/webmozart/assert.json
Writing C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-webmozart~assert.json into cache
Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-webmozart~assert.json.632cd8b20c8b41.78635378.tmp): Failed to open stream: No such file or directory

In Cache.php line 147:
                                                                                                                                                                                                                 
  [ErrorException]                                                                                                                                                                                               
  file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/https---repo.packagist.org/provider-barryvdh~laravel-ide-helper.json.632cd8b1304873.82771019.tmp): Failed to open stream: No such file or directory  
                                                                                                                                                                                                                 

Exception trace:
  at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Cache.php:147
 Composer\Util\ErrorHandler::handle() at n/a:n/a
 file_put_contents() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Cache.php:147
 Composer\Cache->write() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Repository/ComposerRepository.php:1646
 Composer\Repository\ComposerRepository->Composer\Repository\{closure}() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/react/promise/src/FulfilledPromise.php:28
 React\Promise\FulfilledPromise->then() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/react/promise/src/Promise.php:134
 React\Promise\Promise::React\Promise\{closure}() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/react/promise/src/Promise.php:168
 React\Promise\Promise->settle() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/react/promise/src/Promise.php:231
 React\Promise\Promise::React\Promise\{closure}() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/react/promise/src/FulfilledPromise.php:42
 React\Promise\FulfilledPromise->done() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/react/promise/src/Promise.php:135
 React\Promise\Promise::React\Promise\{closure}() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/react/promise/src/Promise.php:168
 React\Promise\Promise->settle() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/react/promise/src/Promise.php:231
 React\Promise\Promise::React\Promise\{closure}() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Util/Http/CurlDownloader.php:440
 Composer\Util\Http\CurlDownloader->tick() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Util/HttpDownloader.php:371
 Composer\Util\HttpDownloader->countActiveJobs() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Util/Loop.php:89
 Composer\Util\Loop->wait() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Repository/ComposerRepository.php:679
 Composer\Repository\ComposerRepository->getSecurityAdvisories() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Repository/RepositorySet.php:266
 Composer\Repository\RepositorySet->getSecurityAdvisoriesForConstraints() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Repository/RepositorySet.php:251
 Composer\Repository\RepositorySet->getMatchingSecurityAdvisories() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Advisory/Auditor.php:52
 Composer\Advisory\Auditor->audit() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Installer.php:397
 Composer\Installer->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/UpdateCommand.php:240
 Composer\Command\UpdateCommand->execute() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:1028
 Symfony\Component\Console\Application->doRunCommand() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:299
 Symfony\Component\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:370
 Composer\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:138
 Composer\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/bin/composer:88
 require() at C:\ProgramData\ComposerSetup\bin\composer.phar:29

update [--with WITH] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--no-autoloader] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>...]

And I expected this to happen:

All the errors Failed to write into cache: file_put_contents(C:/Users/u6/AppData/Local/Composer/repo/ [...] should not happen.

The given folder %localappdata%/Composer/repo doesn't exist.

Please note that with a composer.phar version 2.2 there's no error! There's actually no output after the last post-update-cmd (post-update-cmd: @php artisan vendor:publish --tag=laravel-assets --ansi --force).
With the current version 2.4.2, instead, it does all of that downloading after the last post-update-cmd.


Have a nice day

@Seldaek
Copy link
Member

Seldaek commented Oct 13, 2022

This doesn't make much sense to me at first sight, as it should check if the dir exists and if not create it before doing the write (

if ($this->enabled === null) {
$this->enabled = true;
if (
!$this->readOnly
&& (
(!is_dir($this->root) && !Silencer::call('mkdir', $this->root, 0777, true))
|| !is_writable($this->root)
)
) {
$this->io->writeError('<warning>Cannot create cache directory ' . $this->root . ', or directory is not writable. Proceeding without cache. See also cache-read-only config if your filesystem is read-only.</warning>');
$this->enabled = false;
}
}
&
if ($this->isEnabled() && !$this->readOnly) {
)

If there is a chance for you to run composer from source and try to debug this a bit that'd be valuable, because otherwise I don't see how we'll get to the bottom of this.

@aetonsi
Copy link
Author

aetonsi commented Oct 13, 2022

What really confuses me is that all the dependencies are re-downloaded after the last post-update-cmd. Why is that happening?

How would i run composer from source? can you kindly point me to some kind of instructions? Thanks

@stof
Copy link
Contributor

stof commented Oct 13, 2022

@aetonsi clone the composer git repository somewhere, run composer install into it. and then use path_to_clone/bin/composer to run composer

@stof
Copy link
Contributor

stof commented Oct 13, 2022

The downloading done at the end seems to be related to security advisories according to the stack trace when the error occurs.

@Seldaek
Copy link
Member

Seldaek commented Oct 25, 2022

@aetonsi can you try again after a composer self-update --snapshot to see if 86db6ff helps?

@aetonsi
Copy link
Author

aetonsi commented Oct 25, 2022

@aetonsi can you try again after a composer self-update --snapshot to see if 86db6ff helps?

hi, i did a self update to this version and i can confirm that now it works without error!!
closing the issue... let me know/reopen if anything else is needed.
have a nice day

@aetonsi aetonsi closed this as completed Oct 25, 2022
emahorvat52 pushed a commit to emahorvat52/composer that referenced this issue Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants