2.15.0 -> 400 Bad Request


#1

New installation on PHP 5.5
No visitors are registred. Database empty. Debugging with Firebug gives: (website replaced with example.com)

http://example.com/piwik/piwik.php?action_name=Example&idsite=1&rec=1&r=107271&h=12&m=37&s=24&url=http%3A%2F%2Fexample.com%2F&_id=dd00836750acc821&_idts=1445510234&_idvc=1&_idn=0&_refts=0&_viewts=1445510234&send_image=0&pdf=0&qt=0&realp=0&wma=0&dir=0&fla=1&java=1&gears=0&ag=1&cookie=1&res=1920x1200&gt_ms=907
400 Bad Request

Is it a bug or just me?


(Matthieu Aubry) #2

Hello Jonhy

Enable debuggingas per: Tracking HTTP API: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3

and try again to open the piwik.php request?


#3

Hello Matt,

Thanks for answering. I tried the custom URL as described in [developer.piwik.org]. No difference (what should happen?) But with:

[Tracker]
debug = 1

in config.ini.php I got this:

DEBUG: Debug enabled - Input parameters:
DEBUG: array (
DEBUG: ‘idsite’ => ‘1’,
DEBUG: ‘rec’ => ‘1’,
DEBUG: ‘url’ => ‘http://example.com/’,
DEBUG: ‘_id’ => ‘aa23936750bfe991’,
DEBUG: ‘action_name’ => ‘Example’,
DEBUG: )
DEBUG: Current datetime: 2015-10-23 05:17:26
DEBUG: Exception: Error while resolving tracker.request.processors[0]. Entry Piwik\Plugins\CoreHome\Tracker\VisitRequestProcessor cannot be resolved:
Entry Piwik\Tracker\VisitorRecognizer cannot be resolved:
The parameter ‘trustCookiesOnly’ of Piwik\Tracker\VisitorRecognizer::__construct has no value defined or guessable
DEBUG: Full definition:
DEBUG: Object (
DEBUG: class = Piwik\Tracker\VisitorRecognizer
DEBUG: scope = singleton
DEBUG: lazy = false
DEBUG: __construct(
DEBUG: $trustCookiesOnly = #UNDEFINED#
DEBUG: $visitStandardLength = #UNDEFINED#
DEBUG: $lookbackNSecondsCustom = #UNDEFINED#
DEBUG: $trackerAlwaysNewVisitor = #UNDEFINED#
DEBUG: $model = get(Piwik\Tracker\Model)
DEBUG: $eventDispatcher = get(Piwik\EventDispatcher)
DEBUG: )
DEBUG: )

Does that shed any light on the issue?
BTW: I have had earlier versions of Piwik working ok on my site.


(Matthieu Aubry) #4

DEBUG: Exception: Error while resolving tracker.request.processors[0]. Entry Piwik\Plugins\CoreHome\Tracker\VisitRequestProcessor cannot be resolved:
Entry Piwik\Tracker\VisitorRecognizer cannot be resolved:

Can you try re-upload all files from 2.15.0, it looks like some files not uploaded correctly


#5

Same here - i´ve uploaded all files again, same error.


#6

Matt,
I have uploaded the code twice. Same result.


#7

Hi Johnny - here´s the solution:
ALTER TABLE piwik_log_visit ADD location_provider VARCHAR( 100 ) NULL

BR


#8

BR, Matt,

Thanks for the suggestion but no difference …
Uploaded the files through wget a third time. Chmod config directory to 777. Started install. Clicking Next button: First one minute of nothing happens, then a blank screen forever. Firebug Report:

http://example.com/piwik/index.php?action=systemCheck 503 Service Unavailable

Rest of my site works ok as usual …


(Matthieu Aubry) #9

Hello,

This is likely a bug in Piwik. Could you please create abug report at: Issues · matomo-org/piwik · GitHub

please include there the error as you find it in your server error logs


#10

Removed piwik/config/manifest.inc.php and the installation worked. Now Piwik also register visitors.
Looking at other entries in this forum, 2.15.0 does not seem stable.


(Matthieu Aubry) #11

2.15.0 should be very stable, already many people are using it :slight_smile:
maybe it was the server being temporarily unreliable?


HTTP code 400
(Topsitemakers) #12

We experienced exactly the same issue.

The problem is that Piwik upgrade process did not update the /config/manifest.inc.php file.
Filesizes in that file are old (from previous Piwik version), causing all file integrity checks to fail when the system was trying to record details of a visit.

Fix

Perform a clean install of 2.15.0 Piwik somewhere else, and once all installation steps are completed, copy the /config/manifest.inc.php to the original installation. This way filesizes are up-to-date, and the file integrity check will not fail.

Additional information:

Altering the piwik_log_visit table did not help as it was handled by the update process.

Re-uploading the files did not fix this. We tried doing this manually, with wget, using a development beta version, as well as cloning the whole repo and going back to the 2.15.0 stable tag.
The issue was still there, as it seems that manifest.inc.php is generated only upon new Piwik installation.

If you have any questions, or need more specifics on the installation, let me know.