Describe the bug
First of all, thanks for a very cool library.
I have a page with a canvas id like to record. the page works fine in the browser and in headless.
Its already being used to take snapshots with a custom set up of puppeteer.
The canvas is showing a three.js 3d model using react-three-fiber.
Im trying to use timecut but of course most of the set up is done with timesnap. When I run my code without Timecut/snap, I get my promise resolved from the evaluate:
await page
.evaluate(
async (config) => {
console.log("CALLING INIT SCENE ON PAGE !", config);
const initRes = await initScene(config);
console.log("PAGE RETURNED FROM INIT !!! ");
}, config);
code above is simplified. initScene is a globally available function on my page
this resolves fine without a page that had its time overwritten. For a page that comes from timsnap, this never completes.
I have console.log inside the code that runs on my page. Those are never reached for the timesnap-ed page. While if I create the page from puppeteer directly, they all run and the promise is resolved.
I dont know what overwriting the time/random actually does but it seems to be interfering with the rendering of the three.js scene.
are called before navigatePageToURL and preparePage. If I was able to do my scene initialization before the overwriting, perhaps it would have worked.
there are no errors coming from the page itself. I used the page.on("console"... way to get all of the console messages from the page and there's nothing that is printed that suggests something in the JS code broke...
To Reproduce
unfortunately, the code for the environment to take the screenshots and the actual rendering page (loaded into puppeteer) are property of my workplace so re-creating a full replica without the propriety stuff will be a lot of work.
Im hoping to see Im missing something or perhaps someone else encountered this issue and has insight.
Thanks.
Expected behavior
I dont know if this is a general issue with timesnap and three.js or with react-three-fiber (also using drei). But I expect the page I want to screenshot to load correctly.
Desktop (please complete the following information):
Describe the bug First of all, thanks for a very cool library.
I have a page with a canvas id like to record. the page works fine in the browser and in headless. Its already being used to take snapshots with a custom set up of puppeteer.
The canvas is showing a three.js 3d model using react-three-fiber.
Im trying to use timecut but of course most of the set up is done with timesnap. When I run my code without Timecut/snap, I get my promise resolved from the evaluate:
code above is simplified.
initScene
is a globally available function on my pagethis resolves fine without a page that had its time overwritten. For a page that comes from timsnap, this never completes.
I have console.log inside the code that runs on my page. Those are never reached for the timesnap-ed page. While if I create the page from puppeteer directly, they all run and the promise is resolved.
I dont know what overwriting the time/random actually does but it seems to be interfering with the rendering of the three.js scene.
The problem is that these lines in timesnap
are called before navigatePageToURL and preparePage. If I was able to do my scene initialization before the overwriting, perhaps it would have worked.
there are no errors coming from the page itself. I used the
page.on("console"...
way to get all of the console messages from the page and there's nothing that is printed that suggests something in the JS code broke...To Reproduce
unfortunately, the code for the environment to take the screenshots and the actual rendering page (loaded into puppeteer) are property of my workplace so re-creating a full replica without the propriety stuff will be a lot of work.
Im hoping to see Im missing something or perhaps someone else encountered this issue and has insight. Thanks.
This is the timecut/snap code im running:
Expected behavior I dont know if this is a general issue with timesnap and three.js or with react-three-fiber (also using drei). But I expect the page I want to screenshot to load correctly.
Desktop (please complete the following information):