GoogleAnalyticsImporter - [Exception] Import was cancelled

Hello,
I’m stuck with importing older data from Google Analytics into existing sites in my Matomo installation.
After successfully importing data for one site, I tried to import the data for other sites.
To import these data, I use the following command line in the Matomo directory:

php7.2 ./console googleanalyticsimporter:import-reports -vvv --property=UA-xxxxxx-xx --account=xxxxx --view=xxxxxx --dates=2018-04-14,2020-10-28 --idsite=4

And after executing I got the following error:

ERROR [2020-11-01 10:57:03] 16986  Uncaught exception: /var/www/matomo/plugins/GoogleAnalyticsImporter/ImportStatus.php(176): Import was cancelled.
Import was cancelled.
#0 /var/www/matomo/plugins/GoogleAnalyticsImporter/Commands/ImportReports.php(129): Piwik\Plugins\GoogleAnalyticsImporter\ImportStatus->getImportStatus('4')
#1 /var/www/matomo/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Piwik\Plugins\GoogleAnalyticsImporter\Commands\ImportReports->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /var/www/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Piwik\Plugins\GoogleAnalyticsImporter\Commands\ImportReports), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 [internal function]: Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/matomo/core/Console.php(140): call_user_func(Array, Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/matomo/core/Access.php(644): Piwik\Console->Piwik\{closure}()
#7 /var/www/matomo/core/Console.php(141): Piwik\Access::doAsSuperUser(Object(Closure))
#8 /var/www/matomo/core/Console.php(93): Piwik\Console->doRunImpl(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Piwik\Console->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/matomo/console(32): Symfony\Component\Console\Application->run()
#11 {main}
DEBUG [2020-11-01 10:57:03] 16986  Loaded plugins: CorePluginsAdmin, CoreAdminHome, CoreHome, WebsiteMeasurable, IntranetMeasurable, Diagnostics, CoreVisualizations, Proxy, API, Widgetize, Transitions, LanguagesManager, Actions, Dashboard, MultiSites, Referrers, UserLanguage, DevicesDetection, Goals, Ecommerce, SEO, Events, UserCountry, GeoIp2, VisitsSummary, VisitFrequency, VisitTime, VisitorInterest, RssWidget, Feedback, Monolog, Login, TwoFactorAuth, UsersManager, SitesManager, Installation, CoreUpdater, CoreConsole, ScheduledReports, UserCountryMap, Live, CustomVariables, PrivacyManager, ImageGraph, Annotations, MobileMessaging, Overlay, SegmentEditor, Insights, Morpheus, Contents, BulkTracking, Resolution, DevicePlugins, Heartbeat, Intl, Marketplace, ProfessionalServices, UserId, CustomPiwikJs, Tour, Provider, BotTracker, GoogleAnalyticsImporter, QueuedTracking


                         
  [Exception]            
  Import was cancelled.  
                       


Exception trace:
 () at /var/www/matomo/plugins/GoogleAnalyticsImporter/ImportStatus.php:176
 Piwik\Plugins\GoogleAnalyticsImporter\ImportStatus->getImportStatus() at /var/www/matomo/plugins/GoogleAnalyticsImporter/Commands/ImportReports.php:129
 Piwik\Plugins\GoogleAnalyticsImporter\Commands\ImportReports->execute() at /var/www/matomo/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
 Symfony\Component\Console\Command\Command->run() at /var/www/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php:874
 Symfony\Component\Console\Application->doRunCommand() at /var/www/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php:195
 Symfony\Component\Console\Application->doRun() at n/a:n/a
 call_user_func() at /var/www/matomo/core/Console.php:140
 Piwik\Console->Piwik\{closure}() at /var/www/matomo/core/Access.php:644
 Piwik\Access::doAsSuperUser() at /var/www/matomo/core/Console.php:141
 Piwik\Console->doRunImpl() at /var/www/matomo/core/Console.php:93
 Piwik\Console->doRun() at /var/www/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php:126
 Symfony\Component\Console\Application->run() at /var/www/matomo/console:32

googleanalyticsimporter:import-reports [--property="..."] [--account="..."] [--view="..."] [--dates="..."] [--idsite="..."] [--cvar-count="..."] [--skip-archiving] [--mobile-app] [--timezone="..."] [--extra-custom-dimension="..."]

php 7.2 has this version:

PHP 7.2.34-4+0~20201018.51+debian10~1.gbpc553f7 (cli) (built: Oct 18 2020 21:34:04) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.34-4+0~20201018.51+debian10~1.gbpc553f7, Copyright (c) 1999-2018, by Zend Technologies

GoogleAnalyticsImporter is v. 1.5.6.

I tried it also with php 7.3 and with a standard php.ini. No further error notes in log files.
I tried it with quotes and without. Also for other sites and with different date ranges. Everytime the same error.

Any hint what to do?

1 Like

Hi,

To not duplicate any discussion, I think writing in the github issue is easier: