KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Package 'sparklines' breaks composer deployment #1167

Closed Peter Harari opened this topic on on Nov 19, 2019 - 7 comments

Peter Harari commented on Nov 19, 2019

Hi.

I have added KoolReport to my project and in the first deployment to Heroku with it, it broke the process when composer tried to install 'sparklines' package. Strange that it isn't even in the require section, so it's is dependency.

Check the log below:

-----> PHP app detected
-----> Bootstrapping...
-----> Installing platform packages...
       - php (7.3.11)
       - ext-gd (bundled with php)
       - ext-mbstring (bundled with php)
       - apache (2.4.41)
       - nginx (1.16.1)
-----> Installing dependencies...
       Composer version 1.9.0 2019-08-02 20:55:32
       Loading composer repositories with package information
       Installing dependencies from lock file
       Package operations: 88 installs, 0 updates, 0 removals

       (Lots of packages here... removed for brevity)

         - Installing koolreport/statistics (1.1.0): Downloading (100%)         
         - Installing koolreport/sparklines (1.5.0): Downloading (100%)    Failed to download koolreport/sparklines from dist: The checksum verification of the file failed (downloaded from https://repo.koolreport.com//dist/koolreport/sparklines/koolreport-sparklines-76f2977abd1246b430b0d38928e680c2ba7c2e4f-zip-365359.zip)
           Now trying to download from source
         - Installing koolreport/sparklines (1.5.0): Cloning 76f2977abd
       
         [RuntimeException]                                                                                                                                                                                                                                                                                                                            
         Failed to execute git clone --no-checkout 'git@github.com:koolreport/sparklines.git' '/tmp/build_f67855dc5d3233efa7e4cb86e4b17850/vendor/koolreport/sparklines' && cd '/tmp/build_f67855dc5d3233efa7e4cb86e4b17850/vendor/koolreport/sparklines' && git remote add composer 'git@github.com:koolreport/sparklines.git' && git fetch composer  
       
       install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
       
 !     ERROR: Dependency installation failed!
 !     
 !     The 'composer install' process failed with an error. The cause
 !     may be the download or installation of packages, or a pre- or
 !     post-install hook (e.g. a 'post-install-cmd' item in 'scripts')
 !     in your 'composer.json'.
 !     
 !     Typical error cases are out-of-date or missing parts of code,
 !     timeouts when making external connections, or memory limits.
 !     
 !     Check the above error output closely to determine the cause of
 !     the problem, ensure the code you're pushing is functioning
 !     properly, and that all local changes are committed correctly.
 !     
 !     For more information on builds for PHP on Heroku, refer to
 !     https://devcenter.heroku.com/articles/php-support
 !     Push rejected, failed to compile PHP app.
 !     Push failed

Any advice on this? Thank you in advance

Peter Harari commented on Nov 19, 2019

Forgot to add the composer require section:

"require": {
    "php": "^7.1.3",
    "fideloper/proxy": "^4.0",
    "koolreport/barcode": "*",
    "koolreport/core": "^4.3",
    "koolreport/export": "*",
    "koolreport/pro": "*",
    "laravel/framework": "5.8.*",
    "laravel/tinker": "^1.0",
    "spatie/laravel-view-models": "^1.2"
},
KoolReport commented on Nov 20, 2019

I have sent your case to dev.team to check if there is anything wrong with koolreport\sparklines.

In your composer.json, you may not need to install separate packages, install only "koolreport/pro" is enough, it will install the core and all other packages.

If you do not use all packages, only some, you can install the core and only packages you need, for example:

"koolreport/core": "^4.3",
"koolreport/export":"*",
"koolreport/excel":"*",
...

and leave the sparklines if you dont use.

Peter Harari commented on Nov 21, 2019

Hi.

I removed all other KoolReport packages from composer.json and leave just "koolreport\pro": "*". I my local I executed composer update and everything went fine, but in Heroku deployment the error remains:

         - Installing koolreport/statistics (1.1.0): Downloading (100%)         
         - Installing koolreport/sparklines (1.5.0): Downloading (100%)    Failed to download koolreport/sparklines from dist: The checksum verification of the file failed (downloaded from https://repo.koolreport.com//dist/koolreport/sparklines/koolreport-sparklines-76f2977abd1246b430b0d38928e680c2ba7c2e4f-zip-365359.zip)
           Now trying to download from source
         - Installing koolreport/sparklines (1.5.0): Cloning 76f2977abd
       
         [RuntimeException]                                                                                                                                                                                                                                                                                                                            
         Failed to execute git clone --no-checkout 'git@github.com:koolreport/sparklines.git' '/tmp/build_d4c2283572dac1a8321fdbb95eab5ff3/vendor/koolreport/sparklines' && cd '/tmp/build_d4c2283572dac1a8321fdbb95eab5ff3/vendor/koolreport/sparklines' && git remote add composer 'git@github.com:koolreport/sparklines.git' && git fetch composer 

Thank you.

Peter Harari commented on Nov 21, 2019

Update on this issue.

I tried adding this property to composer.json:

"repositories": [
        {
            "type": "vcs",
            "url":  "git@github.com:koolreport/sparklines.git"
        }
]

IT SEEMS to work, but I'm not sure if that resolved the problem with sparklines package, but then, the same error was threw with excel package, so I added this:

"repositories": [
        {
            "type": "vcs",
            "url":  "git@github.com:koolreport/sparklines.git"
        },
        {
            "type": "vcs",
            "url":  "git@github.com:koolreport/excel.git"
        }
]

But for the excel package, it didn't works. Also with those repositories, my local composer update started to ask for a private token, which I don't have.

David Winterburn commented on Nov 22, 2019

Hi Peter,

Please clear your composer's old cache by running this command on your Heroku setup:

composer clear-cache

Let us know if it solves the checksum problem. Thanks!

Peter Harari commented on Nov 22, 2019

Hi David.

Do you mean to add that command to scripts property on composer.json as a pre-install something like that ? I could not figure out what Heroku setup it could be, as the Settings section has only environment variables and other minor non-related options to the package installation itself.

Thank you.

KoolReport commented on Nov 22, 2019

No, you run the command in the command line like you did with "composer require .." command

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed
solved

Sparklines