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
Archive run fails after update to the latest stable version (when using LoginHttpAuth plugin) #9087
Comments
have to confirm. |
Can you check your PHP error logs to see what kinda error exactly occurred? |
Also have the same issue. I'm running on a CentOS 7 x86_64 box (php 5.4.16). I have the LoginHttpAuth plugin installed and enabled (not sure if it's related). Which info do you need to track this ? |
We'd need you to check the PHP/Webserver error logs to see if you find any error message at the time the cron ran |
@diosmosis are you maybe aware of any issues with |
No, not familiar w/ that plugin. This should've been caught by the tests. I'll look into it. |
Call to a member function getUserByTokenAuth() on a non-object in /var/www/analytics/plugins/Login/Auth.php on line 74 That means the object passed to that function was empty. Which is a sign something went wrong before that function was called. It sounds like there's some problem with LoginHttpAuth and the way the archive run is authenticating. |
I've just applied a quick'n'dirty hack to make it work:
There are better ways to achieve this. The problem is that LoginHttpAuth doesn't support auth by token, so I just force using the admin user when running from the CLI |
…ctor call issues. Fixes matomo-org/matomo#9087
Fixes matomo-org/matomo#9087 use composition instead of inheritance in Auth class
Just released a new LoginHttpAuth version w/ the fix (1.0.3). Please comment if it doesn't have the desired effect. |
Updated. /usr/bin/php /var/www/analytics/console core:archive --url=https://www.example.org/analytics/ > /var/www/analytics/tmp/piwik-archive.log No output and exit status is 0. Works. Thanks! |
Working for me too. Thx |
/usr/bin/php /var/www/analytics/console core:archive --url=https://www.example.org/analytics/ > /var/www/analytics/tmp/piwik-archive.log
ERROR [2015-10-23 14:51:31] Got invalid response from API request: ?module=API&method=API.get&idSite=1&period=day&date=last52&format=php&trigger=archivephp. Response was 'PHP Fatal error: Call to a member function getUserByTokenAuth() on a non-object in /var/www/analytics/plugins/Login/Auth.php on line 74 a:2:{s:6:"result";s:5:"error";s:7:"message";s:23:"A fatal error occurred.";}'
ERROR [2015-10-23 14:51:31] Empty or invalid response '' for website id 1, Time elapsed: 3.127s, skipping
ERROR [2015-10-23 14:51:31] 2 total errors during this script execution, please investigate and try and fix these errors.
[Exception]
2 total errors during this script execution, please investigate and try and fix these errors.
core:archive [--url="..."] [--force-all-websites] [--force-all-periods[="..."]] [--force-timeout-for-periods[="..."]] [--skip-idsites[="..."]] [--skip-all-segments] [--force-idsites[="..."]] [--force-periods[="..."]] [--force-date-last-n="..."] [--force-date-range[="..."]] [--force-idsegments="..."] [--concurrent-requests-per-website[="..."]] [--disable-scheduled-tasks] [--accept-invalid-ssl-certificate]
The text was updated successfully, but these errors were encountered: