{"action":"created","issue":{"url":"https://api.github.com/repos/Netflix/pollyjs/issues/121","repository_url":"https://api.github.com/repos/Netflix/pollyjs","labels_url":"https://api.github.com/repos/Netflix/pollyjs/issues/121/labels{/name}","comments_url":"https://api.github.com/repos/Netflix/pollyjs/issues/121/comments","events_url":"https://api.github.com/repos/Netflix/pollyjs/issues/121/events","html_url":"https://github.com/Netflix/pollyjs/issues/121","id":374093084,"node_id":"MDU6SXNzdWUzNzQwOTMwODQ=","number":121,"title":"puppeteer adapter doesn't capture main frame","user":{"login":"kiavashps","id":6342977,"node_id":"MDQ6VXNlcjYzNDI5Nzc=","avatar_url":"https://avatars1.githubusercontent.com/u/6342977?v=4","gravatar_id":"","url":"https://api.github.com/users/kiavashps","html_url":"https://github.com/kiavashps","followers_url":"https://api.github.com/users/kiavashps/followers","following_url":"https://api.github.com/users/kiavashps/following{/other_user}","gists_url":"https://api.github.com/users/kiavashps/gists{/gist_id}","starred_url":"https://api.github.com/users/kiavashps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiavashps/subscriptions","organizations_url":"https://api.github.com/users/kiavashps/orgs","repos_url":"https://api.github.com/users/kiavashps/repos","events_url":"https://api.github.com/users/kiavashps/events{/privacy}","received_events_url":"https://api.github.com/users/kiavashps/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-25T19:16:52Z","updated_at":"2018-10-25T22:15:31Z","closed_at":null,"author_association":"NONE","body":"I'm trying to use the puppeteer adapter to capture every request on a page (including the root html document, scripts, images, etc..) using:\r\n```js\r\nrequestResourceTypes: [\r\n    'document', 'stylesheet', 'image', 'media', 'font', 'script', 'texttrack',\r\n    'xhr', 'fetch', 'eventsource', 'websocket', 'manifest', 'other'\r\n]\r\n```\r\n\r\nWhen `requestResourceTypes` includes `document` (which matches the main frame/html page), the page hangs indefinitely (or hits timeout)\r\n\r\n**Platform:** macOS v10.11\r\n\r\n**Node.js:** v8.11.4\r\n\r\n**@pollyjs/adapter-puppeteer:** v1.2.0\r\n**@pollyjs/core:** v1.2.0\r\n**@pollyjs/persister-fs:** v1.2.0\r\n**puppeteer:** v1.9.0\r\n\r\n```js\r\n'use strict';\r\n\r\nconst {Polly} = require('@pollyjs/core');\r\nconst FSPersister = require('@pollyjs/persister-fs');\r\nconst PuppeteerAdapter = require('@pollyjs/adapter-puppeteer');\r\nconst puppeteer = require('puppeteer');\r\n\r\nPolly.register(FSPersister);\r\nPolly.register(PuppeteerAdapter);\r\n\r\n(async () => {\r\n    const browser = await puppeteer.launch({headless: false});\r\n    const [page] = await browser.pages();\r\n\r\n    await page.setRequestInterception(true);\r\n\r\n    const polly = new Polly('hangs', {\r\n        adapters: ['puppeteer'],\r\n        adapterOptions: {\r\n            puppeteer: {\r\n                page,\r\n                requestResourceTypes: [\r\n                    'document'\r\n                ]\r\n            }\r\n        },\r\n        persister: 'fs',\r\n        persisterOptions: {\r\n            fs: {\r\n                recordingsDir: `${__dirname}/recordings`\r\n            }\r\n        },\r\n        recordFailedRequests: true,\r\n        logging: true\r\n    });\r\n\r\n    await page.goto('http://www.example.com/', {\r\n        waitUntil: 'networkidle2',\r\n        timeout: 0\r\n    });\r\n\r\n    await page.close();\r\n    await browser.close();\r\n    await polly.stop();\r\n})();\r\n```"},"comment":{"url":"https://api.github.com/repos/Netflix/pollyjs/issues/comments/433223905","html_url":"https://github.com/Netflix/pollyjs/issues/121#issuecomment-433223905","issue_url":"https://api.github.com/repos/Netflix/pollyjs/issues/121","id":433223905,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzIyMzkwNQ==","user":{"login":"kiavashps","id":6342977,"node_id":"MDQ6VXNlcjYzNDI5Nzc=","avatar_url":"https://avatars1.githubusercontent.com/u/6342977?v=4","gravatar_id":"","url":"https://api.github.com/users/kiavashps","html_url":"https://github.com/kiavashps","followers_url":"https://api.github.com/users/kiavashps/followers","following_url":"https://api.github.com/users/kiavashps/following{/other_user}","gists_url":"https://api.github.com/users/kiavashps/gists{/gist_id}","starred_url":"https://api.github.com/users/kiavashps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiavashps/subscriptions","organizations_url":"https://api.github.com/users/kiavashps/orgs","repos_url":"https://api.github.com/users/kiavashps/repos","events_url":"https://api.github.com/users/kiavashps/events{/privacy}","received_events_url":"https://api.github.com/users/kiavashps/received_events","type":"User","site_admin":false},"created_at":"2018-10-25T22:15:31Z","updated_at":"2018-10-25T22:15:31Z","author_association":"NONE","body":"Also, if I manually modify the `recording.har` file to add an entry for `https://www.example.com/`, it will correctly replay it. It's only when recording the request that it hangs."}}
{"actor":{"display_login":"kiavashps"}}