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

Error/Critical Issue #1

Open
vexersa opened this issue Sep 11, 2017 · 18 comments
Open

Error/Critical Issue #1

vexersa opened this issue Sep 11, 2017 · 18 comments

Comments

@vexersa
Copy link

vexersa commented Sep 11, 2017

Hello,

First, thanks for developing this. I'm hoping to get it working for my Mautic powered businesses.

I am running into an issue when running the command:
composer require facebook/php-ads-sdk:2.9.*

/var/log/nginx/error.log presents:

2017/09/11 21:18:25 [error] 7203#7203: *156 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class 'Mautic\CoreBundle\ErrorHandler\ErrorHandler' not found in /var/www/mautic/index.php:29
Stack trace:
#0 {main}
thrown in /var/www/mautic/index.php on line 29" while reading response header from upstream, client: 169.0.174.211, server: mautic.domain.com, request: "GET /s/plugins HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "mautic.domain.com"

Please let me know how what information you need if this is a real issue.

I have tried this twice with the same result, with both proposed composer commands with the same result.

Thanks!

@t3ch9
Copy link

t3ch9 commented Nov 26, 2017

@vexersa Did you resolve your issue?

@robwent
Copy link

robwent commented Dec 1, 2017

I had some issues on the live server (Mainly memory issues), so I downloaded a copy of the version I'm using from the Mautic repository and extracted it to a folder locally.
Then I ran composer locally, zipped up the vendor folder and used it to replace the one on the live site.
I then cleared Mautic cache and everything was working as normal.

Running composer seemed to update some existing packages but everything seems fine.

It might be easier to actually move the dependencies into the plugin folder though as this could all break the next time Mautic updates the vendor folder.

@t3ch9
Copy link

t3ch9 commented Dec 1, 2017

@robwent Did you get plugin MauticFBAdsCustomAudiencesBundle to publish and work as expected? If yes, what version of Mautic and PHP are you using? I am unable to publish the plugin and get the following error (code: 100) in Mautic log:

[2017-11-28 14:47:38] mautic.CRITICAL: Uncaught PHP Exception FacebookAds\Http\Exception\AuthorizationException: "Invalid parameter" at /opt/mautic-2.11.0/vendor/facebook/php-ads-sdk/src/FacebookAds/Http/Exception/RequestException.php line 144 {"exception":"[object] (FacebookAds\Http\Exception\AuthorizationException(code: 100): Invalid parameter at /opt/mautic-2.11.0/vendor/facebook/php-ads-sdk/src/FacebookAds/Http/Exception/RequestException.php:144)"} []

@robwent
Copy link

robwent commented Dec 1, 2017

Just working on it now.

I got a 500 error when I tried to publish and the error lofg says that the sdk is out of date and you should use 2.11.* so I'm just updating to that now to see if that fixes the problem.

[2017-12-01 15:39:10] mautic.CRITICAL: Uncaught PHP Exception FacebookAds\Http\Exception\AuthorizationException: "(#2635) You are calling a deprecated version of the Ads API. Please update to the latest version: v2.11."

@t3ch9
Copy link

t3ch9 commented Dec 1, 2017

I got the same error initially. FB API is now on v 2.11. I ran the following command to get past that error (not sure if it broke something else).

composer require facebook/php-ads-sdk:2.11.*

@robwent
Copy link

robwent commented Dec 1, 2017

after update I'm just getting the too many requests error noted in the readme. I'm not able to delete segments so not sure how I can get past this one. Will take a look at the plugin and see if I can limit it to the first x number.

[2017-12-01 16:06:20] mautic.CRITICAL: Uncaught PHP Exception FacebookAds\Http\Exception\AuthorizationException: "(#17) User request limit reached" at /path/vendor/facebook/php-ads-sdk/src/FacebookAds/Http/Exception/RequestException.php line 144 {"exception":"[object] (FacebookAds\\Http\\Exception\\AuthorizationException(code: 17): (#17) User request limit reached at /path/vendor/facebook/php-ads-sdk/src/FacebookAds/Http/Exception/RequestException.php:144)"} []

@t3ch9
Copy link

t3ch9 commented Dec 1, 2017

@robwent Where you able to get the plugin to publish? If yes, what version of Mautic and PHP are you using?

@robwent
Copy link

robwent commented Dec 1, 2017

When you try and save the plugin settings it tries to sync your segments regardless of whether it's published or not.
I can't publish it as I run into an error reaching the api limit.

At the moment I'm trying to limit the lists that get synced here: https://github.com/rmuilwijk/MauticFBAdsCustomAudiencesBundle/blob/master/EventListener/PluginSubscriber.php#L55

Unfortunately, I can't even do it with one, I just get the same error.
I'm going to leave it for a while and then try again.

Testing on an empty local install it publishes without any errors.

@robwent
Copy link

robwent commented Dec 1, 2017

I had a look at the facebook app review and this is my problem:

By default, your app may only access ad accounts that are owned by admins of the app. If you want the ability to access additional ad accounts, you must submit this feature for review.

I'm not the owner of the ad account.

@t3ch9
Copy link

t3ch9 commented Dec 1, 2017

@robwent I am the owner for my App and Ad Account. When I try to publish the plugin I get the same error 100.

[2017-12-01 12:06:24] mautic.CRITICAL: Uncaught PHP Exception FacebookAds\Http\Exception\AuthorizationException: "(#100) Data is missing or does not match schema" at /opt/mautic-2.11.0/vendor/facebook/php-ds-sdk/src/FacebookAds/Http/Exception/RequestException.php line 144 {"exception":"[object] (FacebookAds\Http\Exception\AuthorizationException(code: 100): (#100) Data is missing or does not match schema t /opt/mautic-2.11.0/vendor/facebook/php-ads-sdk/src/FacebookAds/Http/Exception/RequestException.php:144)"} []

Seems like your plugin might be functional but is running into the issue with api limit. I'm trying to understand what version is your Mautic and PHP version.

@robwent
Copy link

robwent commented Dec 1, 2017

I think I'm actually getting an error before I get to where you are as I don't have any permissions to access the ad account from my app. It's just that the error message isn't clear.

My local install is 2.10.0 on php 5.6 and the live one is 2.10.1 on 5.6 but I don't think that has anything to do with the errors.

I'll be back when the ad account owner has been added to the app.

@rmuilwijk
Copy link
Owner

Wow lots of activity here today. Any progress? If not I can look into this next week.

@t3ch9
Copy link

t3ch9 commented Dec 1, 2017

Hi @rmuilwijk , what is the recommended OS + version, PHP version, and Mautic version to get the plugin to work? Please advise. Thank you.

@robwent
Copy link

robwent commented Jan 22, 2018

FYI the owner of the ad account is now an owner of my app as well and I have successfully connected a local install to FB.

To get around the initial rate limiting, I'm currently copying segments from the live Mautic install to my local install and then slowly importing contacts.
Once the limits are removed I'll try enabling it on the live site again.

@bherman1
Copy link

bherman1 commented Apr 7, 2018

I'm not a developer but trying to get this to work. Step 1 says to Require the FB ads library in the Mautic root directory: composer require facebook/php-ads-sdk:2.9.*

Do I SSH to my Linux install and run that as a command or do I add that statement to .htaccess?

Thank you!

@Romanst84
Copy link

@robwent I am the owner for my App and Ad Account. When I try to publish the plugin I get the same error 100.

[2017-12-01 12:06:24] mautic.CRITICAL: Uncaught PHP Exception FacebookAds\Http\Exception\AuthorizationException: "(#100) Data is missing or does not match schema" at /opt/mautic-2.11.0/vendor/facebook/php-ds-sdk/src/FacebookAds/Http/Exception/RequestException.php line 144 {"exception":"[object] (FacebookAds\Http\Exception\AuthorizationException(code: 100): (#100) Data is missing or does not match schema t /opt/mautic-2.11.0/vendor/facebook/php-ads-sdk/src/FacebookAds/Http/Exception/RequestException.php:144)"} []

Seems like your plugin might be functional but is running into the issue with api limit. I'm trying to understand what version is your Mautic and PHP version.

Hello,
Did you solve this issue?

@muthukumar20
Copy link

Fatal error: Uncaught FacebookAds\Http\Exception\AuthorizationException: Invalid parameter in C:\xampp\htdocs\create\vendor\facebook\php-ads-sdk\src\FacebookAds\Http\Exception\RequestException.php:174 Stack trace: #0 C:\xampp\htdocs\create\vendor\facebook\php-ads-sdk\src\FacebookAds\Http\Client.php(215): FacebookAds\Http\Exception\RequestException::create(Object(FacebookAds\Http\Response)) #1 C:\xampp\htdocs\create\vendor\facebook\php-ads-sdk\src\FacebookAds\Http\Request.php(286): FacebookAds\Http\Client->sendRequest(Object(FacebookAds\Http\Request)) #2 C:\xampp\htdocs\create\vendor\facebook\php-ads-sdk\src\FacebookAds\Api.php(165): FacebookAds\Http\Request->execute() #3 C:\xampp\htdocs\create\vendor\facebook\php-ads-sdk\src\FacebookAds\Api.php(214): FacebookAds\Api->executeRequest(Object(FacebookAds\Http\Request)) #4 C:\xampp\htdocs\create\vendor\facebook\php-ads-sdk\src\FacebookAds\ApiRequest.php(187): FacebookAds\Api->call('/act_3883916088...', 'POST', Array, Array) #5 C:\xampp\htdocs\create\vendor\facebook\php-ads-sdk in C:\xampp\htdocs\create\vendor\facebook\php-ads-sdk\src\FacebookAds\Http\Exception\RequestException.php on line 174

@parasw3nuts
Copy link

parasw3nuts commented May 12, 2022

PHP Fatal error: Uncaught FacebookAds\Http\Exception\AuthorizationException: Invalid parameter in C:\xampp8.0\htdocs\facebook-php-business-sdk\src\FacebookAds\Http\Exception\RequestException.php:174
Stack trace:

targeting fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants