laravel-enso / addresses

Free-form addresses manager
https://docs.laravel-enso.com/#addressesmanager
MIT License
6 stars 4 forks source link

The archive may contain identical file names with different capitalization - database\cities\GBR/CON.json): Failed to open stream: Invalid argument #131

Closed robbykrlos closed 3 years ago

robbykrlos commented 3 years ago

This is a bug(windows).

Prerequisites

Description

Has any of you got this error on composer update:

 - Installing laravel-enso/addresses (4.6.17): Extracting archive
    Install of laravel-enso/addresses failed
  - Installing symfony/var-exporter (v5.3.7): Extracting archive
  - Installing symfony/cache-contracts (v2.4.0): Extracting archive
  - Installing symfony/cache (v5.3.7): Extracting archive
  - Installing squizlabs/php_codesniffer (3.6.0): Extracting archive
  - Installing slevomat/coding-standard (7.0.15): Extracting archive
  - Installing symfony/stopwatch (v5.3.4): Extracting archive
  - Installing symfony/filesystem (v5.3.4): Extracting archive
  - Installing seld/phar-utils (1.1.2): Extracting archive
  - Installing seld/jsonlint (1.8.3): Extracting archive
    0 [>---------------------------]

  [RuntimeException]
  The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems): ZipArchive::extractTo(c:\myproject/vendor/composer/267b1069/laravel-enso-addresses-86d7466\
  database\cities\GBR/CON.json): Failed to open stream: Invalid argument

  [ErrorException]
  ZipArchive::extractTo(c:\myproject/vendor/composer/267b1069/laravel-enso-addresses-86d7466\database\cities\GBR/CON.json): Failed to open stream: Invalid argument

This happens on windows.

I've tried composer clearcache. Not working.

robbykrlos commented 3 years ago

Update:

I've tried composer update from MINGW64 and got a warning (yellow), instead of red [RuntimeException], with the fallback Unzip with ZipArchive class failed, falling back to unzip command:

Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing laravel-enso/addresses (4.6.17): Extracting archive
    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems): ZipArchive::extractTo(C:\myproject/vendor/composer/e7344ef3/laravel-enso-addresses-86d7466\database\cities\GBR/CON.json): Failed to open stream: Invalid argument
    Unzip with ZipArchive class failed, falling back to unzip command
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
....
robbykrlos commented 3 years ago

Update:

On git add I get this:

error: open("vendor/laravel-enso/addresses/database/cities/GBR/CON.json"): No such file or directory
error: unable to index file 'vendor/laravel-enso/addresses/database/cities/GBR/CON.json'
fatal: adding files failed
robbykrlos commented 3 years ago

Actual Windows issue:

https://superuser.com/questions/86999/why-cant-i-name-a-folder-or-file-con-in-windows/844514#:~:text=CON%20is%20a%20reserved%20name,%2C%20NUL%20%2C%20LPT1%20and%20others.&text=To%20delete%20the%20folder%2C%20you,else%20it%20won't%20work.&text=My%20advice%20though%20is%20to%20just%20use%20a%20different%20name.

CON is a reserved name in Windows. So are PRN , AUX , NUL , LPT1 and others. To delete the folder, you have to reference it the same way, or else it won't work. My advice though is to just use a different name.

So... @GITmanuela if possible to change this filename to something more "Windows-friendly" will be much appreciated for all our MS users:)

GITmanuela commented 3 years ago

Hello, composer update should fix the issue