Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Sahi time limit reached #17

Open
gherrink opened this issue Nov 7, 2013 · 6 comments
Open

Sahi time limit reached #17

gherrink opened this issue Nov 7, 2013 · 6 comments

Comments

@gherrink
Copy link

gherrink commented Nov 7, 2013

Hey I'm using Behat with Mink and Sahi. My Web-Application is running local with apache and XAMPP.

I just tryed to get the hole page with

$driver = new \Behat\Mink\Driver\SahiDriver('firefox',
        new \Behat\SahiClient\Client(
            new \Behat\SahiClient\Connection(null, 'localhost', 9999)
)
);
$session = new \Behat\Mink\Session($driver);
$session->start();
$session->visit('https://localhost/CMS/index.php/login/login');
echo $session->getPage()->getContent();

and get this error:
Command execution time limit reached: _sahi.setServerVarPlain('___lastValue___527a9575b8270', document.getElementsByTagName("html")[0].innerHTML)

After I deactivated my https connection on my Side i was able to get the page. I think Sahi don't like the Certificate or something like this.

Hope this will help someone and someone cane give me an advice how I'm able to handle a https connection.

@ramonasuciu
Copy link

The same happens for me as well, and I am not using https connection.
Whenever I try to match the url or find some text in a certain page in my test app, I receive the
"Command execution time limit reached: _sahi.setServerVarPlain('...)" error.

Does anyone have any updates on it?

@aik099
Copy link
Member

aik099 commented Mar 6, 2014

But how this is a Mink problem?

I think it's a problem with Sahi in general that it doesn't like https:// connections with invalid certificates.

@AbijeetP
Copy link

Would like to find a solution to this

@onchainguy-btc
Copy link

Still no solution for this?

@aik099
Copy link
Member

aik099 commented Mar 24, 2014

It's not a Mink's Driver's fault but Sahi one. You'd better post to their issue tracker.

@andrerom
Copy link

andrerom commented Nov 4, 2014

Actually it is coming from Behat\SahiClient\Connection->executeStep():

        $limit = $limit ?: $this->limit;
        $check = 'false';
        while ('true' !== $check) {
            usleep(100000);
            if (--$limit <= 0) {
                throw new Exception\ConnectionException(
                    'Command execution time limit reached: `' . $step . '`'
                );
            }

In our case we have a step that takes very long time by design (downloads packages from the net), so if that is your case trying to configure the limit to be higher than 600 might help using:

default:
    extensions:
        Behat\MinkExtension:
            sahi:
                limit: 900

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

6 participants