Uncaught TypeError: Cannot read property 'invoke' of undefined


#1

Hi,

Just installed Piwik, configured mysql etc and was about to login for the first time. However I get the following errors in the JavaScript console:

Uncaught TypeError: Cannot read property ‘invoke’ of undefined
index.php:60 GET http://10.0.2.15/piwik/plugins/Morpheus/images/logo.svg net::ERR_CONNECTION_TIMED_OUT

The screen is almost blank with no text boxes, making it completely unusable. I’ve attached an image to help you fix the bug.

Here is the offending code for the first error:

return this.transparentColor;}};piwik.ColorManager=new ColorManager();}(jQuery));

If I open a new tab and replace 10.0.2.15 with “localhost” the image does work fine.

Hidden in the HTML (notice the display:none) I found the following which potentially points to the source of the problem. I let you know if resolving this issue fixes it.

<div style="clear:both;width:800px;">
    <div style="display:none" data-role="notification" data-noclear="1" data-raw="1" data-context="warning">        <a style="float:right;" href="http://piwik.org/faq/troubleshooting/#faq_171" rel="noreferrer" target="_blank"><img src="plugins/Morpheus/images/help.png"></a>
    <strong>Warning:&nbsp;</strong>You are now accessing Piwik from <strong>http://localhost:6969/piwik/index.php</strong>, but Piwik has been configured to run at this address: <strong>http://localhost/piwik/index.php</strong>. <br> <br><a href="http://localhost/piwik/index.php">Click here to access Piwik safely</a> and remove this warning. You may also want to contact your Piwik administrator and notify them about this issue (<span style="display:none">click here to email</span>).

    <br>
    <br>

    <small><p><b>How do I fix this problem and how do I login again?</b><br> The Piwik Super User can manually edit the file piwik/config/config.ini.php
					and add the following lines: </p><pre>[General]

trusted_hosts[] = "localhost:6969"After making the change, you will be able to login again.


You may also disable this security feature (not recommended). To do so edit config/config.ini.php and add:

[General]
enable_trusted_host_check=0



Help




        </section>

I’ve managed to get my colleagues quite interested in piwik, but now I look a bit stupid. It would be really amazing if you could help me to resolve this.

Thankyou


(Matthieu Napoli) #2

Did you try to follow these instructions:

How do I fix this problem and how do I login again?

The Piwik Super User can manually edit the file piwik/config/config.ini.php
and add the following lines:

[General]
trusted_hosts[] = “localhost:6969”

After making the change, you will be able to login again.


#3

Yes that does fix it, so I’d just recommend not hiding the div that contains that useful information.

Cheers


(Matthieu Napoli) #4

Yes I have fixed that last week, it should be fixed in the next release. Thank you for the report.


(Matthieu Aubry) #5

Hi there,
You can test it in latest beta version from: http://builds.piwik.org/