Taiko: Invalid InterceptionId error

Created on 1 Dec 2018  路  9Comments  路  Source: getgauge/taiko

Expected behavior

The step should run properly

Actual behavior

I realized when clicking a button to go to another page and that page takes time to be displayed I got that error. I've been investigating the root cause but I have not found it at first glance.

Below the error details

{ Error: Invalid InterceptionId.
    at _enqueueCommand (/Users/victor.araya/linio-qa-automation/wdio-linio-samples/gauge-linio-front/node_modules/chrome-remote-interface/lib/chrome.js:89:34)
    at Chrome._handleMessage (/Users/victor.araya/linio-qa-automation/wdio-linio-samples/gauge-linio-front/node_modules/chrome-remote-interface/lib/chrome.js:245:17)
    at WebSocket._ws.on (/Users/victor.araya/linio-qa-automation/wdio-linio-samples/gauge-linio-front/node_modules/chrome-remote-interface/lib/chrome.js:223:22)
    at WebSocket.emit (events.js:182:13)
    at Receiver._receiver.onmessage (/Users/victor.araya/linio-qa-automation/wdio-linio-samples/gauge-linio-front/node_modules/ws/lib/WebSocket.js:141:47)
    at Receiver.dataMessage (/Users/victor.araya/linio-qa-automation/wdio-linio-samples/gauge-linio-front/node_modules/ws/lib/Receiver.js:389:14)
    at perMessageDeflate.decompress (/Users/victor.araya/linio-qa-automation/wdio-linio-samples/gauge-linio-front/node_modules/ws/lib/Receiver.js:349:40)
    at _decompress (/Users/victor.araya/linio-qa-automation/wdio-linio-samples/gauge-linio-front/node_modules/ws/lib/PerMessageDeflate.js:306:9)
    at _inflate.flush (/Users/victor.araya/linio-qa-automation/wdio-linio-samples/gauge-linio-front/node_modules/ws/lib/PerMessageDeflate.js:386:7)
    at afterWrite (_stream_writable.js:480:3)
  request:
   { method: 'Network.continueInterceptedRequest',
     params: { interceptionId: 'id-410' } },
  response: { code: -32602, message: 'Invalid InterceptionId.' } }

Steps to reproduce

  1. run a simple script in taiko node_modules/.bin/taiko test01.js --observe

Versions

Version: 0.3.0 (Chromium:71.0.3563.0)
bug

Most helpful comment

thanks, now my test works as expected.

All 9 comments

Hi,

Can you please try installing taiko from master to see if the issue still persists ? There have been fixes around waiting on new page and interception in master which are yet to be released.
npm install git+https://github.com/getgauge/taiko.git

thanks, now my test works as expected.

Great that it works fine now, closing the issue.

Getting this issue again. You may have to run the following script a couple of times to get the error

Observed on windows

taiko .\bookmyshow.js --observe

const { browser, openBrowser, goto, click,link,image } = require('taiko');

(async () => {
    try {
        await openBrowser({headless:false});
        await goto("https://in.bookmyshow.com/bengaluru");

        await click("Bengaluru");
        await write('NCR', into(await inputField({"placeholder":"Search for your city"})));
        await clear(inputField({"placeholder":"Search for your city"}))

        await click("NCR");
        await click("View All");
        await click(link("Hindi"),below('Select Language'))
        await click(image(below(link("Now Showing"))))
        await click(link("Book Tickets"))

        await click(link({"class":"__showtime-link"}))
        await click("Accept")

        await click("Select Seats")
        await click(link(toRightOf("D")))
    } catch (e) {
        console.error(e);
    } finally {
        await screenshot()
        await closeBrowser();
    }
})();

Result -

[PASS] Browser opened
[PASS] Navigated to url "https://in.bookmyshow.com/bengaluru"
[PASS] Clicked element matching text "Bengaluru"
[PASS] Wrote NCR into the input Field[placeholder="Search for your city"]
[PASS] Cleared input Field[placeholder="Search for your city"]
[PASS] Clicked element matching text "NCR"
[PASS] Clicked element matching text "View All"
[PASS] Clicked link with text Hindi
[PASS] Clicked image Below Link with text Now Showing
{ Error: Invalid InterceptionId.
    at _enqueueCommand (C:\work\gauge\taiko\node_modules\chrome-remote-interface\lib\chrome.js:89:34)
    at Chrome._handleMessage (C:\work\gauge\taiko\node_modules\chrome-remote-interface\lib\chrome.js:245:17)
    at WebSocket._ws.on (C:\work\gauge\taiko\node_modules\chrome-remote-interface\lib\chrome.js:223:22)
    at WebSocket.emit (events.js:182:13)
    at Receiver._receiver.onmessage (C:\work\gauge\taiko\node_modules\ws\lib\WebSocket.js:141:47)
    at Receiver.dataMessage (C:\work\gauge\taiko\node_modules\ws\lib\Receiver.js:389:14)
    at perMessageDeflate.decompress (C:\work\gauge\taiko\node_modules\ws\lib\Receiver.js:349:40)
    at _decompress (C:\work\gauge\taiko\node_modules\ws\lib\PerMessageDeflate.js:306:9)
    at _inflate.flush (C:\work\gauge\taiko\node_modules\ws\lib\PerMessageDeflate.js:386:7)
    at afterWrite (_stream_writable.js:493:3)
  request:
   { method: 'Network.continueInterceptedRequest',
     params: { interceptionId: 'id-661' } },
  response: { code: -32602, message: 'Invalid InterceptionId.' } }

Version

commit - 7cbcce85576988d14d166ff7bb153622ab58586a

Not able to use taiko until 'Invalid InterceptionId.' gets resolved. Even with await on all taiko commands

馃挬 Im debugging your code now ...

@brramos can you give a repro for your use case ? and which version of taiko you are on ?

Fix available in 787b09c

Verified scenario mentioned in https://github.com/getgauge/taiko/issues/284#issuecomment-448972638 on commit - 7cbcce85576988d14d166ff7bb153622ab58586a

Was this page helpful?
0 / 5 - 0 ratings