Closed Baabuseek closed 3 years ago
Weird,
Could you try to run curl -X GET -I https://www.instagram.com/
in CLI?
HTTP/1.1 200 OK Content-Type: text/html; charset=utf-8 Vary: Cookie, Accept-Language, Accept-Encoding Content-Language: en Date: Sun, 08 Nov 2020 16:43:39 GMT Strict-Transport-Security: max-age=31536000 Cache-Control: private, no-cache, no-store, must-revalidate Pragma: no-cache Expires: Sat, 01 Jan 2000 00:00:00 GMT X-Frame-Options: SAMEORIGIN content-security-policy: report-uri https://www.instagram.com/security/csp_report/; default-src 'self' https://www.instagram.com; img-src data: blob: https://*.fbcdn.net https://*.inst agram.com https://*.cdninstagram.com https://*.facebook.com; font-src data: https://*.fbcdn.net https://*.instagram.com https://*.cdninstagram.com; media-src 'self' blob: https://www.i nstagram.com https://*.cdninstagram.com https://*.fbcdn.net; manifest-src 'self' https://www.instagram.com; script-src 'self' https://instagram.com https://www.instagram.com https://. www.instagram.com https://.cdninstagram.com wss://www.instagram.com https://*.facebook.com https://*.fbcdn.net https://*.facebook.net 'unsafe-inline' 'unsafe-eval' blob:; style-src 's elf' https://*.www.instagram.com https://www.instagram.com 'unsafe-inline'; connect-src 'self' https://instagram.com https://www.instagram.com https://*.www.instagram.com https://graph .instagram.com https://*.graph.instagram.com https://*.cdninstagram.com https://api.instagram.com https://i.instagram.com wss://www.instagram.com wss://edge-chat.instagram.com https:// .facebook.com https://.fbcdn.net https://*.facebook.net chrome-extension://boadgeojelhgndaghljhdicfkmllpafd blob:; worker-src 'self' blob: https://www.instagram.com; frame-src 'self' https://instagram.com https://www.instagram.com https://staticxx.facebook.com https://www.facebook.com https://web.facebook.com https://connect.facebook.net https://m.facebook.com; ob ject-src 'none'; upgrade-insecure-requests X-Content-Type-Options: nosniff X-XSS-Protection: 0 x-aed: 30 Access-Control-Expose-Headers: X-IG-Set-WWW-Claim Alt-Svc: h3-29=":443"; ma=3600,h3-27=":443"; ma=3600 Connection: keep-alive Content-Length: 46420
Which method from Api.php gives you error?
login()
OS: Windows 10
Could you give me the complete code you're using?
use Instagram\Api; use Symfony\Component\Cache\Adapter\FilesystemAdapter;
require DIR . '/../vendor/autoload.php'; require DIR . "/../app/Config/configuration.php";
$cachePool = new FilesystemAdapter('Instagram', 0, DIR . '/../cache');
$api = new Api($cachePool); $api->login('baabuseek', 'SECRET'); // mandatory $profile = $api->getProfile('robertdowneyjr');
echo $profile->getUserName(); // robertdowneyjr
Ofc i made sure that login and password is correct, work at browser
I checked the code on Linux. Works great. Problem is only in Windows perhaps PHP configuration
it worked before on windows ?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hello, got the same issue on Windows11 (work perfectly on MacOs)
Version(s) affected: 6.6.2
Description
Fatal error: Uncaught GuzzleHttp\Exception\ConnectException: Connection refused for URI https://www.instagram.com/ in D:\UniServerZ\vhosts\ewb\vendor\guzzlehttp\guzzle\src\Handler\StreamHandler.php:311 Stack trace: #0 D:\UniServerZ\vhosts\ewb\vendor\guzzlehttp\guzzle\src\Handler\StreamHandler.php(230): GuzzleHttp\Handler\StreamHandler->GuzzleHttp\Handler\{closure}() #1 D:\UniServerZ\vhosts\ewb\vendor\guzzlehttp\guzzle\src\Handler\StreamHandler.php(322): GuzzleHttp\Handler\StreamHandler->createResource(Object(Closure)) #2 D:\UniServerZ\vhosts\ewb\vendor\guzzlehttp\guzzle\src\Handler\StreamHandler.php(58): GuzzleHttp\Handler\StreamHandler->createStream(Object(GuzzleHttp\Psr7\Request), Array) #3 D:\UniServerZ\vhosts\ewb\vendor\guzzlehttp\guzzle\src\PrepareBodyMiddleware.php(35): GuzzleHttp\Handler\StreamHandler->__invoke(Object(GuzzleHttp\Psr7\Request), Array) #4 D:\UniServerZ\vhosts\ewb\vendor\guzzlehttp\guzzle\src\Middleware.php(31): GuzzleHttp\PrepareBodyMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array) #5 D:\U in D:\UniServerZ\vhosts\ewb\vendor\guzzlehttp\guzzle\src\Handler\StreamHandler.php on line 72
How to reproduce
Run code from examples
Additional context
Any idea how to fix this problem?