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.json contains a malformed UTF-8 character #88

Closed
ezekg opened this issue Aug 3, 2016 · 3 comments
Closed

Composer.json contains a malformed UTF-8 character #88

ezekg opened this issue Aug 3, 2016 · 3 comments

Comments

@ezekg
Copy link

ezekg commented Aug 3, 2016

When I run this command:

composer create-project jokkedk/webgrind webgrind -vvv

I get this output:

Loading config file /Users/EzekielGabrielse/.composer/config.json
Loading config file /Users/EzekielGabrielse/.composer/auth.json
Failed to initialize global composer: Composer could not find the config file: /Users/EzekielGabrielse/.composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Running 08ef916beded8c738be11acc4f463c450e277d64 (2016-06-06 10:22:06) with PHP 5.5.29 on Darwin / 14.5.0
Checked CA file /private/var/folders/qy/g7zbb_ns25n51yh5mpv_mr240000gn/T/composer-cacert-bcf331364fef73d53e4368ba519a6c3fcb21ea7836c3d8efad4ec32731e8152a.pem: valid
Downloading https://packagist.org/packages.json
Writing /Users/EzekielGabrielse/.composer/cache/repo/https---packagist.org/packages.json into cache
Reading /Users/EzekielGabrielse/.composer/cache/repo/https---packagist.org/p-provider-2013.json from cache
Reading /Users/EzekielGabrielse/.composer/cache/repo/https---packagist.org/p-provider-2014.json from cache
Reading /Users/EzekielGabrielse/.composer/cache/repo/https---packagist.org/p-provider-2015.json from cache
Reading /Users/EzekielGabrielse/.composer/cache/repo/https---packagist.org/p-provider-2015-10.json from cache
Reading /Users/EzekielGabrielse/.composer/cache/repo/https---packagist.org/p-provider-2016-01.json from cache
Downloading http://packagist.org/p/provider-2016-04%241d610eb4b4b3601e03090c557182ec9d64e58887a022dd31d736eb68f627fbb1.json
Writing /Users/EzekielGabrielse/.composer/cache/repo/https---packagist.org/p-provider-2016-04.json into cache
Downloading http://packagist.org/p/provider-2016-07%2453a9185054ca449cbf781c12dea7ec03b91cdc20acdb79fd4dfe2b6591fbcdfe.json
Writing /Users/EzekielGabrielse/.composer/cache/repo/https---packagist.org/p-provider-2016-07.json into cache
Downloading http://packagist.org/p/provider-archived%24146eae44b579598d9877b8264553e6288cceb80d8af4e86abbfc3dbb095ee64a.json
Writing /Users/EzekielGabrielse/.composer/cache/repo/https---packagist.org/p-provider-archived.json into cache
Downloading http://packagist.org/p/provider-latest%2402c24d26e0f736214403794da18610db4177907ad16629edfd078541818e6c11.json
Writing /Users/EzekielGabrielse/.composer/cache/repo/https---packagist.org/p-provider-latest.json into cache
Downloading http://packagist.org/p/jokkedk/webgrind%24f4f2c7768c9ca9f54b92cad49b9062e1da193614bdf2165f3d5872827c645efc.json
Writing /Users/EzekielGabrielse/.composer/cache/repo/https---packagist.org/provider-jokkedk$webgrind.json into cache
Installing jokkedk/webgrind (v1.4.0)
  - Installing jokkedk/webgrind (v1.4.0)
Downloading https://api.github.com/repos/jokkedk/webgrind/zipball/905299852cf35f040b0cd31c3fed083de24f2d32
    Downloading: Connecting...Following redirect (2) https://codeload.github.com/jokkedk/webgrind/legacy.zip/905299852cf35f040b0cd31c3fed083de24f2d32
Downloading https://codeload.github.com/jokkedk/webgrind/legacy.zip/905299852cf35f040b0cd31c3fed083de24f2d32
    Downloading: 100%
Writing /Users/EzekielGabrielse/.composer/cache/files/jokkedk/webgrind/736af5a2ee0ad45db69de381f0e2025615cb5b36.zip into cache from webgrind//ac4c8a861a663a515debfe1c83ce23c5
    Extracting archive
Executing command (CWD): unzip 'webgrind//ac4c8a861a663a515debfe1c83ce23c5' -d '/Users/EzekielGabrielse/vendor/composer/d496c609' && chmod -R u+w '/Users/EzekielGabrielse/vendor/composer/d496c609'

Created project in webgrind


  [UnexpectedValueException]
  "./composer.json" is not UTF-8, could not parse as JSON


Exception trace:
 () at phar:///usr/bin/composer/src/Composer/Json/JsonFile.php:290
 Composer\Json\JsonFile::validateSyntax() at phar:///usr/bin/composer/src/Composer/Json/JsonFile.php:156
 Composer\Json\JsonFile->validateSchema() at phar:///usr/bin/composer/src/Composer/Factory.php:272
 Composer\Factory->createComposer() at phar:///usr/bin/composer/src/Composer/Factory.php:554
 Composer\Factory::create() at phar:///usr/bin/composer/src/Composer/Command/CreateProjectCommand.php:161
 Composer\Command\CreateProjectCommand->installProject() at phar:///usr/bin/composer/src/Composer/Command/CreateProjectCommand.php:143
 Composer\Command\CreateProjectCommand->execute() at phar:///usr/bin/composer/vendor/symfony/console/Command/Command.php:259
 Symfony\Component\Console\Command\Command->run() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:844
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:192
 Symfony\Component\Console\Application->doRun() at phar:///usr/bin/composer/src/Composer/Console/Application.php:228
 Composer\Console\Application->doRun() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:123
 Symfony\Component\Console\Application->run() at phar:///usr/bin/composer/src/Composer/Console/Application.php:103
 Composer\Console\Application->run() at phar:///usr/bin/composer/bin/composer:43
 require() at /usr/bin/composer:25

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

And I expected this to happen:

I expected Webgrind to be installed into webgrind/. If you view the composer.json file, you can see the malformed characters in your browser. Please see composer/composer/issues/5570 for more discussion. Could we remove the malformed character?

It looks like a popular fork of this project has already done this for their Composer file and it installs fine. It's not as active as this project, so I'd prefer to use this one if possible.

@ezekg
Copy link
Author

ezekg commented Mar 13, 2017

Is it possible to release a new version of this package on https://packagist.org containing this fix? Seems master has a lot of bug fixes that the latest version (v1.4.0) doesn't have.

@alpha0010
Copy link
Collaborator

None of the changes seemed large enough to warrant a tag, but I suppose it has been a while. Released.

@ezekg
Copy link
Author

ezekg commented Mar 18, 2017

Thanks! I was still unable to install via Composer because of the UTF-8 issue. Everything works now with the newest release. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants