In my workplace network we have to use a proxy. I want to use Composer a to download some package dependencies for my Symfony2 projects. It does not work even after declaring the environment variable with the proxy information. I noticed that we are also unable to revolve any external name using the DNS of the company. And I think that one is the main problem that does not alow us to download with composer.
The truth is that I can not change any thing on those servers or policies of the company.
Do you think that I can do something that can let me resolve those names or access those resources to install the dependencies?
this is the error:
The "http://thirds.packagist.dev/packages.json" file could not be downloaded (HTTP/1.0 503 Service Unavailable)
http://thirds.packagist.dev could not be fully loaded, package information was loaded from the local cache and may be out of date
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. O
penSSL Error messages:
error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
failed to open stream: Cannot connect to HTTPS server through proxy
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]
Then the composer.json file is this one:
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"repositories": [
{
"type": "composer",
"url": "http://thirds.packagist.dev"
}
],
"require": {
"php": ">=5.3.3",
"symfony/symfony": "~2.4",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~2.3",
"sensio/framework-extra-bundle": "~3.0",
"sensio/generator-bundle": "~2.3",
"incenteev/composer-parameter-handler": "~2.0",
"friendsofsymfony/user-bundle": "1.3.4",
"sylius/resource-bundle": "*",
"friendsofsymfony/jsrouting-bundle": "*",
"genemu/form-bundle": "2.2.*"
},
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
},
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.4-dev"
}
}
}
Adding composer diag:
root#zeus:/home/abel/Documents/http/team# php composer.phar diag
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
failed to open stream: Cannot connect to HTTPS server through proxy
Checking HTTP proxy: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
failed to open stream: Cannot connect to HTTPS server through proxy
Checking HTTP proxy support for request_fulluri: OK
Checking HTTPS proxy support for request_fulluri: FAIL
Unable to assert the situation, maybe github is down (The "https://api.github.com/repos/Seldaek/jsonlint/zipball/1.0.0" file could not be downloaded: Peer certificate CN=`*.github.com' did not match expected CN=`201.220.215.11'
failed to open stream: Cannot connect to HTTPS server through proxy)
Checking composer.json: OK
Checking disk free space: OK
Checking composer version:
[Composer\Downloader\TransportException]
The "https://getcomposer.org/version" file could not be downloaded: SSL operation failed with code 1. OpenS
SL Error messages:
error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
failed to open stream: Cannot connect to HTTPS server through proxy
diagnose
root#zeus:/home/abel/Documents/http/team#
Also I tried to declared the ip of packagist.org on my etc hosts... and then i notices that the DNS that is used is not the one of my localhost:
root#zeus:/home/abel/Documents/http/team# php composer.phar update
Loading composer repositories with package information
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: Connection t
imed out
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]
root#zeus:/home/abel/Documents/http/team# cat /etc/hosts
127.0.0.1 localhost
201.220.207.218 zeus.ltu.sld.cu zeus
127.0.0.1 thirds.packagist.dev
127.0.0.1 abel.ltu.sld.cu
87.98.253.214 packagist.org
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
root#zeus:/home/abel/Documents/http/team#
I once faced the same issue, and setting the proxy in my terminal solved the problem.
If you're using Windows, enter these commands :
set HTTP_PROXY=http://user:password#proxy.domain.com:port
set HTTPS_PROXY=http://user:password#proxy.domain.com:port
In Unix system, the command is export instead of set.
Then you can run composer update command.
If you still have problems, it might be git that needs the proxy configuration too.
In your %HOMEPATH%\.gitconfig, add the following :
[http]
proxy = http://user:password#proxy.domain.com:port
EDIT:
Since you've added the results of composer diag, the problem seems to be that your proxy doesn't handle the request_fulluri flag for HTTPS requests.
You can disable this option by setting the environment variable HTTPS_PROXY_REQUEST_FULLURI like this (Unix system) :
set HTTPS_PROXY_REQUEST_FULLURI=0
Related
I cannot run symfony local server by command: php bin/console server:run.
I get error:
[Symfony\Component\Console\Exception\LogicException]
An option named "connection" already exists.
Dependencies in composer.json:
"require": {
"php": "^7.0, <7.4",
"composer/package-versions-deprecated": "^1.11",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/orm": "^2.5",
"incenteev/composer-parameter-handler": "^2.0",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^3.0.2",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.3.10",
"symfony/symfony": "3.3.*",
"twig/twig": "^1.0||^2.0"
},
"require-dev": {
"doctrine/data-fixtures": "^1.3",
"doctrine/doctrine-fixtures-bundle": "^2.3",
"liip/functional-test-bundle": "^1.8",
"phpunit/phpunit": "^6.3",
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
parameters.yml:
# This file is auto-generated during the composer install
parameters:
database_host: 127.0.0.1
database_port: 3306
database_name: tests
database_user: root
database_password: password
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
secret: ThisTokenIsNotSoSecretChangeIt
I think these parameters in parameters.yml used to work earlier.
I use mysql and also sqlite for tests.
I faced the same issue in a Symfony v4.2 project, without changing anything in my code base.
As already found in this issue https://github.com/doctrine/dbal/issues/4565
it appears in certain versions of the doctrine/doctrine-bundle package (in my case v1.11). The RunSqlDoctrineCommand.php from vendor adds the second option which causes the error.
If you can update your doctrine/doctrine-bundle package, you might be fine. In my case, an update or fix by package was not possible.
What can we do in that case?
What comes next is more a hack, than a real good solution, so use it at your own risk!
As statet in the commit from official repository: https://github.com/doctrine/DoctrineBundle/commit/86d2469d6be06d55ad7b9e2f076f6942476f2e87 (thanks to the guys in issue above)
I made a copy of the new RunSqlDoctrineCommand.php from that commit and save it in my project as dist/RunSqlDoctrineCommand.php.
In composer.json change the scripts sections as follows:
{
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd"
},
"doctrine-bugfix": [
"cp -f dist/RunSqlDoctrineCommand.php vendor/doctrine/doctrine-bundle/Command/Proxy/RunSqlDoctrineCommand.php"
],
"post-install-cmd": [
"#auto-scripts",
"#doctrine-bugfix"
],
"post-update-cmd": [
"#auto-scripts",
"#doctrine-bugfix"
]
}
}
This will just copy and override the original file in vendor directory on every composer install/update. This will only work on a unix/linux system, btw.
As said: Not the best solution, but it keeps your project in shape.
In this answer is there is a good explanation
in my case
composer update doctrine/doctrine-bundle
Inside (symfony project) vendor/doctrine/doctrine-bundle/Command/Proxy/RunSqlDoctrineCommand.php change configure function like below:
protected function configure()
{
parent::configure();
$this
->setName('doctrine:query:sql')
//->addOption('connection', null, InputOption::VALUE_OPTIONAL, 'The
connection to use for this command')
->setHelp(<<<EOT
The <info>%command.name%</info> command executes the given SQL query and
outputs the results:
<info>php %command.full_name% "SELECT * FROM users"</info>
EOT
);
if ($this->getDefinition()->hasOption('connection')) {
return;
}
$this->addOption('connection', null, InputOption::VALUE_OPTIONAL, 'The
connection to use for this command');
}
I'm currently working on an API using Symfony and API_Platform.
Everything is going great (POST requests are working), but suddendly i can't make any POST request (even using EasyAdmin bundle).
Im getting this logs :
2019-05-23T13:51:05+00:00 [critical] Class 'GuzzleHttp\Client' not found
[Thu May 23 15:51:05 2019] 127.0.0.1:54351 [500]: /api/authors - Class 'Symfony\Component\BrowserKit\Client' not found in D:\projects\hp-api-2\vendor\symfony\http-kernel\Client.php on line 31
2019-05-23T13:51:05+00:00 [critical] Fatal Error: Class 'Symfony\Component\BrowserKit\Client' not found
I tried to require both bundles but it did not fix my errors.
I created another API Project, worked on it for 2 days, and the same error appeared again for no reason.
I'm totally lost about this one.
I'm using Wamp for PHP/MySQL. But i dont think it's the problem since it was working fine before.
Here are my dependencies:
"require": {
"php": "~7.2.3",
"ext-ctype": "*",
"ext-iconv": "*",
"api-platform/api-pack": "^1.2",
"doctrine/doctrine-migrations-bundle": "^2.0",
"easycorp/easyadmin-bundle": "^2.1",
"symfony/apache-pack": "^1.0",
"symfony/console": "4.2.*",
"symfony/dotenv": "4.2.*",
"symfony/flex": "^1.1",
"symfony/framework-bundle": "4.2.*",
"symfony/maker-bundle": "^1.11",
"symfony/yaml": "4.2.*"
},
"require-dev": {
"symfony/profiler-pack": "^1.0",
"symfony/web-server-bundle": "4.2.*"
}
When I require symfony/browser-kit --dev, I get this:
2019-05-23T13:57:34+00:00 [critical] Class 'GuzzleHttp\Client' not found
2019-05-23T13:57:35+00:00 [critical] Uncaught PHP Exception Symfony\Component\Debug\Exception\ClassNotFoundException: "Attempted to load class "Client" from namespace "GuzzleHttp".
Did you forget a "use" statement for e.g. "Symfony\Component\HttpKernel\Client", "Symfony\Component\BrowserKit\Client" or "Symfony\Bundle\FrameworkBundle\Client"?" at D:\projects\hp-api-2\var\cache\dev\ContainerDsBBqcY\getApiPlatform_Doctrine_Listener_HttpCache_PurgeService.php line 13
And if I require guzzlehttp/guzzle --dev I get this :
2019-05-23T14:01:32+00:00 [critical] Uncaught PHP Exception Symfony\Component\DependencyInjection\Exception\EnvNotFoundException: "Environment variable not found: "VARNISH_URL"." at D:\projects\hp-api-2\vendor\symfony\dependency-injection\EnvVarProcessor.php line 96
I didnt configure cache system at all, it's the default settings.
If you need any more informations, feel free to ask.
Please excuse me for English mistakes, if I did any.
Thank you.
Antoine
EDIT: I tried to not use wamp for my php/mysql and now when I make a post request i have some error message from Symfony (i didnt have one before):
Symfony\Component\Debug\Exception\FatalErrorException:
Error: Uncaught Error: Class 'Symfony\Component\BrowserKit\Client' not found in D:\projects\hp-api-2\vendor\symfony\http-kernel\Client.php:31
Stack trace:
#0 D:\projects\hp-api-2\vendor\symfony\debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler.php(174): require_once()
#1 D:\projects\hp-api-2\vendor\symfony\debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler.php(136): Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->convertFileToClass('D:\\projects\\hp-...', 'D:\\projects\\hp-...', 'Symfony\\Compone...')
#2 D:\projects\hp-api-2\vendor\symfony\debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler.php(118): Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->findClassInPath('D:\\projects\\hp-...', 'Client', 'Symfony\\Compone...')
#3 D:\projects\hp-api-2\vendor\symfony\debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler.php(62): Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->getClassCandidates('Client')
#4 D:\projects\hp-api-2\vendor\s
at vendor/symfony/http-kernel/Client.php:31
EDIT 2: I "fixed" my problem by requiring both bundles + disabling varnish urls
api_platform:
version: 0.0.1
mapping:
# paths: ['%kernel.project_dir%/src/Entity']
paths: ['%kernel.project_dir%/config/api_platform/resources']
http_cache:
invalidation:
enabled: true
# varnish_urls: ['%env(VARNISH_URL)%'] ## this problem still needs to be fixed
max_age: 0
shared_max_age: 3600
vary: ['Content-Type', 'Authorization']
public: true
I've just fixed by adding guzzle dependency:
composer req guzzlehttp/guzzle
I've been trying to install the cache/cache-bundle recipe into my symfony4 flex-configured project, but to no avail. I execute:
composer require cache/cache-bundle
And this is what I got on the shell:
Installing the cache-bundle generates a cache.yml file under config/packages/cache.yml, and its default content is:
cache:
session:
enabled: "%env(bool:SESSION_CACHE_ENABLED)%"
service_id: "cache.provider.default"
use_tagging: true
ttl: 7200
router:
enabled: "%env(bool:ROUTER_CACHE_ENABLED)%"
service_id: "cache.provider.default"
ttl: 86400
logging:
enabled: "%env(bool:APP_DEBUG)%"
logger: "logger"
level: "info"
The problematic line is the first "enabled" one. For some reason, Symfony or composer doesn't like that %env(bool:SESSION_CACHE_ENABLED)% and returns that error message:
Invalid type for path "cache.session.enabled". Expected boolean, but
got string.
SESSION_CACHE_ENABLED is a value introduced in the .env file of the project by composer in a block like this.
###> cache/cache-bundle ###
SESSION_CACHE_ENABLED=true
ROUTER_CACHE_ENABLED=false
###< cache/cache-bundle ###
Then, the question is if someone else has "suffered" this problem and found a fix or workaround to make this config work. My objective is to use this dependency in my mock project to cache arrays in memory to use them as a fake DB system.
I thought to open an issue about this, but since I'm not sure if this is a Simfony issue or just a problem in the recipe I preferred to ask here first.
And for the sake of completion, here's the list of current dependencies already in my project.
"require": {
"php": "^7.1.3",
"easycorp/easy-log-handler": "^1.0",
"friendsofsymfony/rest-bundle": "^2.3",
"hermes/bridge/common": "dev-master",
"hermes/common": "dev-master",
"jms/serializer": "^1.10",
"jms/serializer-bundle": "^2.3",
"ramsey/uuid": "^3.7",
"sensio/framework-extra-bundle": "^5.1",
"symfony/cache": "^4.0",
"symfony/console": "^4.0",
"symfony/framework-bundle": "^4.0",
"symfony/http-foundation": "^4.0",
"symfony/monolog-bundle": "^3.1",
"symfony/stopwatch": "^4.0",
"symfony/web-server-bundle": "^4.0",
"symfony/yaml": "^4.0"
},
"require-dev": {
"symfony/flex": "^1.0",
"symfony/dotenv": "^4.0"
}
I've seen questions about issues regarding booleans in dotenv files, but nothing conclusive for this question, I'm afraid.
Have you tried to get rid off the quotes around "%env(bool:SESSION_CACHE_ENABLED)%"?
I've been having this issue for the last couple of days and was able to narrow down the culprit just today:
Starting with a brand new project, and adding firebase to it:
ionic start -a "MyApp" -i com.package.xyz MyApp tabs --v2
npm install --save firebase
At this point, ionic serve works correctly. But if I import firebase in any file:
import firebase from 'firebase';
Now running ionic serve --debug throws the following errors:
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:
Install ios-sim to deploy iOS applications.`npm install -g ios-sim` (may require sudo)
Install ios-deploy to deploy iOS applications to devices. `npm install -g ios-deploy` (may require sudo)
******************************************************
> ionic-hello-world# ionic:serve /Users/Desktop/Projects/MyApp
> ionic-app-scripts serve "--debug"
[13:27:37] ionic-app-scripts 0.0.45
[ DEBUG! ] An BuildUpdateStarted event occurred MEM: 116.7MB
[ DEBUG! ] An BuildUpdateCompleted event occurred MEM: 116.7MB
[ DEBUG! ] An FileChange event occurred MEM: 116.9MB
[ DEBUG! ] An ReloadApp event occurred MEM: 116.9MB
[13:27:38] watch started ... MEM: 117.2MB
[13:27:38] build dev started ... MEM: 117.2MB
[13:27:38] clean started ... MEM: 117.2MB
[ DEBUG! ] clean /Users/Desktop/Projects/MyApp/www/build MEM: 117.2MB
[13:27:38] clean finished in 6 ms MEM: 117.4MB
[13:27:38] copy started ... MEM: 117.4MB
[13:27:38] transpile started ... MEM: 117.5MB
[13:27:42] build dev failed: Cannot read property 'indexOf' of undefined MEM: 253.7MB
[ DEBUG! ] TypeError: Cannot read property 'indexOf' of undefined at loadDiagnostic
(/Users/Desktop/Projects/MyApp/node_modules/#ionic/app-scripts/dist/logger/logger-typescript.js:47:27)
at
/Users/Desktop/Projects/MyApp/node_modules/#ionic/app-scripts/dist/logger/logger-typescript.js:12:16
at Array.map (native) at Object.runTypeScriptDiagnostics
(/Users/Desktop/Projects/MyApp/node_modules/#ionic/app-scripts/dist/logger/logger-typescript.js:11:26)
at /Users/Desktop/Projects/MyApp/node_modules/#ionic/app-scripts/dist/transpile.js:92:47 at
transpileWorker
(/Users/Desktop/Projects/MyApp/node_modules/#ionic/app-scripts/dist/transpile.js:62:12) at
Object.transpile
(/Users/Desktop/Projects/MyApp/node_modules/#ionic/app-scripts/dist/transpile.js:26:12) at
buildDev
(/Users/Desktop/Projects/MyApp/node_modules/#ionic/app-scripts/dist/build.js:84:24) at
buildWorker
(/Users/Desktop/Projects/MyApp/node_modules/#ionic/app-scripts/dist/build.js:35:12) at
Object.build
(/Users/Desktop/Projects/MyApp/node_modules/#ionic/app-scripts/dist/build.js:19:12)
MEM: 253.7MB
[ DEBUG! ] listening on 8100 MEM: 253.9MB
[ DEBUG! ] watcher ready:
/Users/Desktop/Projects/MyApp/Users/Desktop/Projects/MyApp/src/assets/,/Users/Desktop/Projects/MyApp/src/index.html,/Users/Desktop/Projects/MyApp/src/manifest.json,/Users/Desktop/Projects/MyApp/src/service-worker.js,node_modules/ionic-angular/polyfills/polyfills.js,node_modules/ionicons/dist/fonts/
MEM: 253.8MB
[13:27:42] copy finished in 3.69 s MEM: 253.8MB
[ DEBUG! ] watcher ready:
/Users/Desktop/Projects/MyApp/Users/Desktop/Projects/MyApp/src/**/*.(ts|html|scss)
MEM: 253.8MB
[13:27:42] watch ready in 3.70 s MEM: 253.8MB
[13:27:42] dev server running: http://localhost:8100/
If I remove the import, ionic serve works correctly again.
Here is the output of ionic info:
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.14
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.45
ios-deploy version: Not installed
ios-sim version: Not installed
OS: macOS Sierra
Node Version: v6.7.0
Xcode version: Not installed
How can I correct this error?
Asim
EDIT
I've traced the error down to node_modules/firebase/firebase.d.ts in the last section which says:
declare module 'firebase' {
export = firebase;
}
For this, the compiler complains: Duplicate identifier 'export='.
If I remove this section, or the export = firebase; line, the error goes away and ionic serve works fine, but I lose access to the firebase object.
Even more oddly, if I start with a blank project with only firebase added, and run ionic serve, things work fine. Next, I import firebase in one of my source files and everything works fine still. Until I terminate ionic serve and restart it. At that point, I get the same error as the one listed near the top of the post.
I've even updated my node, ionic, cordova and ionic-app-scripts. ionic info now shows:
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.14
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.46
ios-deploy version: Not installed
ios-sim version: Not installed
OS: macOS Sierra
Node Version: v6.9.1
Xcode version: Not installed
Still the same issue though. I desperately need help to resolve this issue.. =/
EDIT
For more info:
tsconfig.json
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"dom",
"es2015"
],
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"target": "es5"
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules"
],
"compileOnSave": false,
"atom": {
"rewriteTsconfig": false
}
}
package.json
{
"name": "ionic-hello-world",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"#angular/common": "2.1.1",
"#angular/compiler": "2.1.1",
"#angular/compiler-cli": "2.1.1",
"#angular/core": "2.1.1",
"#angular/forms": "2.1.1",
"#angular/http": "2.1.1",
"#angular/platform-browser": "2.1.1",
"#angular/platform-browser-dynamic": "2.1.1",
"#angular/platform-server": "2.1.1",
"#ionic/app-scripts": "0.0.46",
"#ionic/storage": "1.1.6",
"firebase": "^3.6.2",
"ionic-angular": "2.0.0-rc.3",
"ionic-native": "2.2.3",
"ionicons": "3.0.0",
"lodash": "^4.17.2",
"rxjs": "5.0.0-beta.12",
"uuid": "^3.0.1",
"zone.js": "0.6.26"
},
"devDependencies": {
"#ionic/app-scripts": "0.0.45",
"typescript": "2.0.6"
},
"cordovaPlugins": [
"cordova-plugin-whitelist",
"cordova-plugin-statusbar",
"cordova-plugin-console",
"cordova-plugin-device",
"cordova-plugin-splashscreen",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": [
"ios",
{
"platform": "ios",
"version": "",
"locator": "ios"
}
],
"description": "An Ionic project"
}
npm versions
npm#3.10.8
cordova#6.4.0
ionic#2.1.14
typescript#2.0.10
firebase#3.6.2
I have the Same Problem look here:
https://forum.ionicframework.com/t/build-dev-failed-cannot-read-property-indexof-of-undefined/71506
I'm trying to install Symfony 2. I get the same issue of I download the archive without vendors and if I try to install via curl.
Running OSX/MAMP setup.
➜ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing symfony/icu (v1.0.0)
Downloading: connection...^C
➜ composer install -vvv
Downloading composer.json
Loading composer repositories with package information
Downloading https://packagist.org/packages.json
Writing /Users/alexlongshaw/.composer/cache/repo/https---packagist.org/packages.json into cache
Downloading https://packagist.org/p/provider-active$fa1339d67d333d9449a21f7a2c80888f2c7a02dbb4d3e6b11a9dd5855df3f537.json
....
Downloading http://packagist.org/p/symfony/class-loader$962a39a1da8588e7f97e22517580a460d5349699d5ccb967167c2a1e9802ce50.json
Reading /Users/alexlongshaw/.composer/cache/repo/https---packagist.org/provider-symfony$class-loader.json from cache
zlib_decode(): data error
http://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Downloading http://packagist.org/p/symfony/config$eec66e956c41b0728a7fc4f40b95a116bc469f8583c2602b14af3d00f36711fc.json
Writing /Users/alexlongshaw/.composer/cache/repo/https---packagist.org/provider-symfony$config.json into cache
Reading /Users/alexlongshaw/.composer/cache/repo/https---packagist.org/provider-phpoption$phpoption.json from cache
- Installing symfony/icu (v1.0.0)
Downloading https://api.github.com/repos/symfony/Icu/zipball/v1.0.0
Downloading: connection...
As you can see below, if I do composer update I get a similar problem.
➜ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
zlib_decode(): data error
http://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
- Installing symfony/icu (v1.0.0)
Downloading: connection...
Any suggestions on how to get past this? It works fine for me on an Ubuntu VM so I presume it is something to do with the setup.
Composer.json
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.3.*",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.2.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.3.*",
"symfony/swiftmailer-bundle": "2.3.*",
"symfony/monolog-bundle": "2.3.*",
"sensio/distribution-bundle": "2.3.*",
"sensio/framework-extra-bundle": "2.3.*",
"sensio/generator-bundle": "2.3.*",
"incenteev/composer-parameter-handler": "~2.0"
},
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
},
"config": {
"bin-dir": "bin"
},
"minimum-stability": "stable",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.3-dev"
}
}
}
zlib extension enabled?
check your phpinfo if zlib ( which provides zlib_decode ) is enabled or run
php -m
if your php cli uses a different php.ini
cache problem?
[...] package information was loaded from the local cache and may be out of date
Delete composer's cache folder being...
/Users/alexlongshaw/.composer/cache/
... in your case to prevent updating from cache only and see if a general connection exists.
proxy?
make sure you don't have a proxy set via environment-variables
https_proxy
http_proxy
HTTPS_PROXY
HTTP_PROXY
common problems
composer has built-in capabability of identifying some common problems
composer diagnose
This turned out to be network related. Didn't work on either connection (Broadband or 3G) at home but at work there were no problems