YusukeIwaki/puppeteer-ruby

Protocol error (Network.getResponseBody): No resource with given identifier found (Puppeteer::Connection::ProtocolError)

Closed this issue · 1 comments

n1xn commented

Step To Reproduce / Observed behavior

This code is working in ruby and js! The only problem is that I am getting this error message in ruby, which triggers my tests to fail.

WARN -- : Protocol error (Network.getResponseBody): No resource with given identifier found (Puppeteer::Connection::ProtocolError)

ruby

        page.goto("#{@base_url}/#{path}")
        res = await page.async_wait_for_response(predicate: lambda { |res|
          return await res.json if res.url.include?('user?')
        })
        items = await res.json
        puts items

js

  await page.goto(`${base_url}/${path}`)
  const res = await page.waitForResponse(async res => {
    if(res.url().includes('user')){
      return await res.json()
    }
  })
  const data = await res.json()
  console.log(data)

Expected behavior

Should not log error.

Send me a mail if you need the domain of this example.

stale commented

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.