Request content was evicted from inspector cache ??
See original GitHub issueHello,
I’m using Puppeteer to do an offline mirror of a site. Problem is, I can’t save large files. The following code is a simplified version of the mirroring bot, and it fails on the .flv (larger) file. My actual target site contains similar flash players and flv files.
const puppeteer = require('puppeteer');
const url = require('url');
const fs = require('fs');
const path = require('path');
const fse = require('fs-extra');
(async () => {
const savePath = './site';
const browser = await puppeteer.launch({
args: [
'--no-sandbox',
'--ppapi-flash-version=28.0.0.126',
'--ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplayer.so',
'--user-data-dir=/home/howe/.config/chromium'
],
headless: false,
});
const page = await browser.newPage();
page.on('response', async (res) => {
const parsed = url.parse(res.url);
try {
const fn = path.join(savePath, parsed.pathname);
console.log(`Saving file ${fn}...`);
await fse.ensureDir(path.dirname(fn));
await fse.writeFile(fn, await res.buffer());
}
catch (e) {
console.error('Error:', e)
}
});
await page.goto('http://flash.flowplayer.org/demos/plugins/flash/viralvideos-extconfig.html', { waitUntil: 'networkidle2' });
// browser.close();
})();
After downloading a few smaller files, it throws the following cryptic error:
Protocol error (Network.getResponseBody): Request content was evicted from inspector cache undefined
Any clues? Is this a bug? I have no idea why it works on smaller but not larger files.
Thanks, Howe
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
failed to load response data request content was evicted from ...
The solution I found for capturing big responses is to copy the request and execute it by other means, such as PowerShell or...
Read more >failed to load response data request content was evicted from ...
[Solved]-failed to load response data request content was evicted from inspector cache-Reactjs ... If you clean the Cache and Hard Reload I believe...
Read more >How to Fix Chrome's Failed to Load Response Data Error
If users are requesting file formats like JSON, the error can occur ... load response data request content was evicted from inspector cache...
Read more >Issue 453078 in chromium: "Failed to load response data"
What went wrong? The contents of the response are not shown: it says "Failed to load response data". The request was done succesfully,...
Read more >request content was evicted from inspector cache - CSDN博客
3. 点赞 · 踩 · 7. 收藏 · 打赏 · 0. 评论 · request content was evicted from inspector cache.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, It seems this works (but I didn’t test thoroughly):
Hope that helps someone else. Thanks @aslushnikov .
There’s a limitation on the resource content size that devtools keep in memory. It’s 10Mb for resource, and there’s also a total of 100Mb limit to store all resources: InspectorNetworkAgent.cpp
There’s experimental support in the protocol to amend these limits: Network.enable.