Skip to content

LogicException on geonames:import #3

@mekras

Description

@mekras

Got error " [LogicException] You can't regress the progress bar" when running geonames:import.

#0 vendor/giosh94mhz/geonames-bundle/Giosh94mhz/GeonamesBundle/Event/ImportOutputSubscriber.php(158): Symfony\Component\Console\Helper\ProgressHelper->setCurrent(-4)
#1 vendor/giosh94mhz/geonames-bundle/Giosh94mhz/GeonamesBundle/Event/ImportOutputSubscriber.php(94): Giosh94mhz\GeonamesBundle\Event\ImportOutputSubscriber->progress(-4, -4)
#2 [internal function]: Giosh94mhz\GeonamesBundle\Event\ImportOutputSubscriber->onDownloadProgress(Object(Giosh94mhz\GeonamesBundle\Event\OnProgressEvent), 'geonames.import...', Object(Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher))
#3 vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php(392): call_user_func(Array, Object(Giosh94mhz\GeonamesBundle\Event\OnProgressEvent), 'geonames.import...', Object(Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher))
#4 [internal function]: Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher->Symfony\Component\HttpKernel\Debug\{closure}(Object(Giosh94mhz\GeonamesBundle\Event\OnProgressEvent), 'geonames.import...', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher))
#5 vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php(164): call_user_func(Object(Closure), Object(Giosh94mhz\GeonamesBundle\Event\OnProgressEvent), 'geonames.import...', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher))
#6 vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php(53): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'geonames.import...', Object(Giosh94mhz\GeonamesBundle\Event\OnProgressEvent))
#7 vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php(167): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('geonames.import...', Object(Giosh94mhz\GeonamesBundle\Event\OnProgressEvent))
#8 vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php(139): Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('geonames.import...', Object(Giosh94mhz\GeonamesBundle\Event\OnProgressEvent))
#9 vendor/giosh94mhz/geonames-bundle/Giosh94mhz/GeonamesBundle/Import/ImportDirector.php(144): Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher->dispatch('geonames.import...', Object(Giosh94mhz\GeonamesBundle\Event\OnProgressEvent))
#10 [internal function]: Giosh94mhz\GeonamesBundle\Import\ImportDirector->Giosh94mhz\GeonamesBundle\Import\{closure}(-4, -4)
#11 vendor/giosh94mhz/geonames-bundle/Giosh94mhz/GeonamesBundle/Utils/CurlDownload.php(132): call_user_func(Object(Closure), -4, -4)
#12 [internal function]: Giosh94mhz\GeonamesBundle\Utils\CurlDownload->Giosh94mhz\GeonamesBundle\Utils\{closure}(0, 0)
#13 vendor/giosh94mhz/geonames-bundle/Giosh94mhz/GeonamesBundle/Utils/CurlDownload.php(146): call_user_func(Object(Closure), 0, 0)
#14 [internal function]: Giosh94mhz\GeonamesBundle\Utils\CurlDownload->Giosh94mhz\GeonamesBundle\Utils\{closure}(0, 0, 0, 0)
#15 vendor/giosh94mhz/geonames-bundle/Giosh94mhz/GeonamesBundle/Utils/CurlDownload.php(242): curl_multi_exec(Resource id #426, 4)
#16 vendor/giosh94mhz/geonames-bundle/Giosh94mhz/GeonamesBundle/Utils/CurlDownload.php(153): Giosh94mhz\GeonamesBundle\Utils\CurlDownload->curlMultiDownload(Array)
#17 vendor/giosh94mhz/geonames-bundle/Giosh94mhz/GeonamesBundle/Import/ImportDirector.php(148): Giosh94mhz\GeonamesBundle\Utils\CurlDownload->download()
#18 vendor/giosh94mhz/geonames-bundle/Giosh94mhz/GeonamesBundle/Import/ImportDirector.php(59): Giosh94mhz\GeonamesBundle\Import\ImportDirector->download()
#19 vendor/giosh94mhz/geonames-bundle/Giosh94mhz/GeonamesBundle/Command/AbstractImportCommand.php(50): Giosh94mhz\GeonamesBundle\Import\ImportDirector->import()
#20 vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php(241): Giosh94mhz\GeonamesBundle\Command\AbstractImportCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(888): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(191): Symfony\Component\Console\Application->doRunCommand(Object(Giosh94mhz\GeonamesBundle\Command\ImportCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(96): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(121): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 app/console(27): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput))
#26 {main}./console geonames:import

The cause is that curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD) returns -1 when download size not known at line 105 in CurlDownload.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions