Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

$page->goto returns NULL for some URLs #2

Closed
7starsone opened this issue Mar 7, 2018 · 4 comments
Closed

$page->goto returns NULL for some URLs #2

7starsone opened this issue Mar 7, 2018 · 4 comments

Comments

@7starsone
Copy link

Hello,
it works fine with the example.com but if eg. you try the domain icecat.de as target,
the page content returns NULL

I'm on CentOS 7 + PHP 7.1 and Nodejs 9
These are the script lines:

require 'vendor/autoload.php';
use ExtractrIo\Puphpeteer\Puppeteer; 

$puppeteer = new Puppeteer;
$browser = $puppeteer->launch([
    'args' => ['--no-sandbox', '--disable-setuid-sandbox'],
]);
$page = $browser->newPage();
$response = $page->goto('https://icecat.de');
var_dump($page->content());
$browser->close();

there are other not working tested URLs but I don't write them here and I kindly ask you to find the cause and fix it to work with any site, please
Thank you

@7starsone
Copy link
Author

Hello, any news about it, please? Thanks

@nesk
Copy link
Member

nesk commented Mar 20, 2018

Hello, currently I don't have much time to work on it. The issue is pretty complicated and it seems to happen because the data payload transfered between the node process and PHP is too big. Actually, this is an issue with extractr-io/rialto and not PuPHPeteer, I'm closing this issue and creating a new one.

@nesk nesk closed this as completed Mar 20, 2018
@nesk
Copy link
Member

nesk commented Mar 20, 2018

Until its fixed, if you really want to retrieve the HTML content, you should instead make a simple HTTP request with Guzzle (or cURL, etc…).

PuPHPeteer should work for other instructions with smaller payloads.

@nesk
Copy link
Member

nesk commented Apr 9, 2018

@7starsone FYI, I've fixed the bug in v0.2.1 🙂

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

No branches or pull requests

2 participants