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

[RuntimeException] Failed to clone https://github.com/sebastianbergmann/phpunit-mock-objects.git via https, ssh protocols, aborting. #434

Closed
light8822 opened this issue Jan 4, 2018 · 12 comments
Assignees
Labels

Comments

@light8822
Copy link

I´m installing this API via composer by the command : composer install

and this Issue appeared.

[RuntimeException]
Failed to clone https://github.com/sebastianbergmann/phpunit-mock-objects.git via https, ssh protocols, aborting.

  • https://github.com/sebastianbergmann/phpunit-mock-objects.git
    fatal: destination path 'C:\xampp\htdocs\aiw_new_update\pec\administrator2\Classes\google_app2\googleads-php-lib
    vendor\phpunit\phpunit-mock-objects' already exists and is not an empty directory.
  • [email protected]:sebastianbergmann/phpunit-mock-objects.git
    fatal: destination path 'C:\xampp\htdocs\aiw_new_update\pec\administrator2\Classes\google_app2\googleads-php-lib
    vendor\phpunit\phpunit-mock-objects' already exists and is not an empty directory.
@fiboknacky fiboknacky self-assigned this Jan 5, 2018
@fiboknacky
Copy link
Member

Hello @light8822

As the error message indicated, have you somehow place some files in phpunit\phpunit-mock-objects?
I recommend to clean up everything related to this library and start over again.

It would be easier if you could follow our guide here too.

Please let me know if you still get stuck.

Best,
Knack

@light8822
Copy link
Author

light8822 commented Jan 5, 2018

I tried a diferent way, to install it, just using via : composer require googleads/googleads-php-lib
it downloaded and installed without problem, I already get the refresh token for the adsapi_php.ini
by doing a git clone of the library then execute GetRefreshToken.php

@light8822
Copy link
Author

When I try to execute GetCampaigns.php via console it gets the next error message

PHP Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in C:\xampp\htdocs\google_api_test\googleads-php-lib\vendor\googleads\googleads-php-lib\src\Google\AdsApi\Common\AdsSoapClient.php:90

@fiboknacky
Copy link
Member

Do you use this library via any proxies? If so, is it possible to use this without them first?
For Windows, sometimes there can be a problem with SSL CA files. Please see this wiki for troubleshooting.

@fiboknacky fiboknacky added the P2 label Jan 10, 2018
@fiboknacky
Copy link
Member

I close this issue due to inactivity. Please let us know if you're still faced with the issue.

@light8822
Copy link
Author

hello, I´m sorry for the long inactivity, because of attending other proyects, well, I did using de wiki you share me, it worked fine on localhost, but how I can make the same conection via web-server?
Thank you and sorry my long delay.

@fiboknacky
Copy link
Member

Could you please clarify again what you want to do? It seems that the issue you'd like to resolve last time is the issue with SOAP, which prevents you from making SOAP calls to AdWords API servers, so I'm not sure how the localhost you mentioned is related to this case.

Thanks.

@light8822
Copy link
Author

When i say localhost, is in a windows pc, in a xampp local server, that make a sucessful conection, but in this case i need to make the same conection to a web server, i tried to send the proyect via ftp, followed the instrucctions for set de adsap_php.ini config file in the home of the server but it gives the error:

"[29-Jan-2018 23:37:21 UTC] PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Config file not found as specified: 'adsapi_php.ini'. Home directory could not be located so it was not searched.' in /home/aiwroi/public_html/goo_test/google_api/googleads-php-lib/src/Google/AdsApi/Common/ConfigurationLoader.php:71
Stack trace:
#0 /home/aiwroi/public_html/goo_test/google_api/googleads-php-lib/src/Google/AdsApi/Common/OAuth2TokenBuilder.php(61): Google\AdsApi\Common\ConfigurationLoader->fromFile('adsapi_php.ini')
#1 /home/aiwroi/public_html/goo_test/google_api/googleads-php-lib/examples/AdWords/v201708/BasicOperations/GetCampaigns.php(79): Google\AdsApi\Common\OAuth2TokenBuilder->fromFile()
#2 /home/aiwroi/public_html/goo_test/google_api/googleads-php-lib/examples/AdWords/v201708/BasicOperations/GetCampaigns.php(92): Google\AdsApi\Examples\AdWords\v201708\BasicOperations\GetCampaigns::main()
#3 {main}
thrown in /home/aiwroi/public_html/goo_test/google_api/googleads-php-lib/src/Google/AdsApi/Common/ConfigurationLoader.php on line 71"

@fiboknacky
Copy link
Member

Hello @light8822

You've not placed adsapi_php.ini in the correct location. It's supposed to be in the home directory of your computers/servers.
The library uses the EnvironmentalVariables class to find the home directory.
But you can also supply this programmatically using fromFile() too.

Best,
Knack

@light8822
Copy link
Author

you mean in the ConfigurationLoader.php

instead of :
$home = $this->environmentalVariables->getHome();

make use of :
$home = $this->AdWordsSessionBuilder->fromFile('./filepath');

or add the function fromFile to the Class EnvironmentalVariables.php ?

@fiboknacky
Copy link
Member

No, you shouldn't touch ConfigurationLoader.php.
I meant instead of doing the following like in GetCampaigns.php:

$session = (new AdWordsSessionBuilder())
        ->fromFile()
        ->withOAuth2Credential($oAuth2Credential)
        ->build();

Do this instead:

$session = (new AdWordsSessionBuilder())
        ->fromFile('<PATH TO YOUR FILE>')
        ->withOAuth2Credential($oAuth2Credential)
        ->build();

Hope this help.

@light8822
Copy link
Author

Excelent....!!! it worked ....!!! thank you very much, with this we can say this tread is really close, thank you so much for your help, even this tread was already close, thank you...!!! 👍 👍 👍

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

No branches or pull requests

2 participants