Skip to content
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

Proxy configuration is not taken into account #46

Closed
FBuchholz opened this issue Jun 7, 2023 · 9 comments
Closed

Proxy configuration is not taken into account #46

FBuchholz opened this issue Jun 7, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@FBuchholz
Copy link

FBuchholz commented Jun 7, 2023

Current behavior

Dashboard is stopping typo3 an afters show attached error.

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1595862844: Content returned from Matomo Reporting API is not JSON encoded: <html> <head><title>504 Gateway Time-out</title></head> <body> <center><h1>504 Gateway Time-out</h1></center> <hr><center>nginx</center> </body> </html> | Brotkrueml\MatomoWidgets\Exception\InvalidResponseException thrown in file /var/www/website/vendor/brotkrueml/typo3-matomo-widgets/Classes/Connection/MatomoConnector.php in line 64. Requested URL: https://www.   /typo3/ajax/dashboard/widget/content?token=--AnonymizedToken--&widget=matomo_widgets. .devicesDetection.osFamilies

Expected behavior/output

Working Dashboard and not stopping typo3.

Steps to reproduce

Configure dashboard in siteconfig.

Screenshots

issue_matomo_wi

If applicable, add screenshots to help explain your problem.

Environment

TYPO3 Version | 12.4.1

nginx/1.25.0 PHP 8.2.6
MySQL 10.9.6-MariaDB-1:10.9.6+maria~ubu2204

Linux 5.15.0-73-generic

  • Matomo Widgets version(s): v2.2.0

  • TYPO3 version(s): 12.4.1

  • Is your TYPO3 installation set up with Composer (Composer Mode): yes

  • OS: UBUNTU 22.04

Possible Solution

Proxy parameter not used by extension e.g. exclution local hosts?

@brotkrueml
Copy link
Owner

brotkrueml commented Jun 7, 2023

@FBuchholz If I read correctly, you are using a proxy to access the outside world? The extension uses the default Guzzle client shipped by TYPO3, so - when configured correctly - should be able to connect through that proxy AFAIK.

@brotkrueml brotkrueml added the question Further information is requested label Jun 7, 2023
@FBuchholz
Copy link
Author

FBuchholz commented Jun 7, 2023

We have configure the proxy via config/system/ additional.php (see above) . Wee proxy worksm but the exceptions not.

<?php

$GLOBALS['TYPO3_CONF_VARS']['HTTP']['proxy'] = [
    'http' => 'http://  ip  :8080',
    'https' => 'http:// pi :8080',
    'no' => [
        '.domain.com',
        'localhost',
        '.domain.io',
        'matomo.host',
    ],
];

@brotkrueml
Copy link
Owner

brotkrueml commented Jun 7, 2023

@FBuchholz So, the Matomo request should not be passed through the proxy (as it is defined in no)? But it is passed through the proxy instead resulting in a timeout?

@FBuchholz
Copy link
Author

YES, the call has direct local Connection without Proxy. If no Proxy are Setup the Dashboards are Working as expected. The Issue is only with enabled Proxy Parameter inkl. excluded Hosts as attached in this Ticket.

@brotkrueml
Copy link
Owner

Okay, strange, as I just use the default client provided by TYPO3. Will look into it in the next days.

@brotkrueml brotkrueml changed the title TYPO3 Exception: #1595862844: Proxy configuration is not taken into account Jun 10, 2023
@brotkrueml
Copy link
Owner

@FBuchholz I created a fix: b0a2536 in the https://github.com/brotkrueml/typo3-matomo-widgets/commits/bugfix-46 branch. Please check and confirm, if this solves your issue.

@brotkrueml brotkrueml added bug Something isn't working and removed question Further information is requested labels Jun 20, 2023
@brotkrueml
Copy link
Owner

@FBuchholz Can you have a look at the fix and if it works for you? b0a2536 in the https://github.com/brotkrueml/typo3-matomo-widgets/commits/bugfix-46 branch

@brotkrueml
Copy link
Owner

@FBuchholz Sadly, it seems the feature is not important to you anymore. It won't get merged, if no feedback is provided. Please have a look at the PR.

@brotkrueml brotkrueml added the question Further information is requested label Jul 18, 2023
@FBuchholz
Copy link
Author

Hi, sorry for the delay. I tested the lib feature and can confirm that it works.
KR
Frank

@brotkrueml brotkrueml removed the question Further information is requested label Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants