Skip to content

Commit

Permalink
fix: Don't stop wait to navigate preview html
Browse files Browse the repository at this point in the history
  • Loading branch information
Quramy committed Sep 3, 2024
1 parent 6dd1755 commit 5f9c181
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/storycrawler/src/browser/stories-browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@ export class StoriesBrowser extends BaseBrowser {
this.logger.debug('Wait for stories definition.');
await this.page.goto(this.connection.url);
let stories: Story[] | null = null;
await this.page.goto(

// Note:
// Don't wait fo this `goto` promise. Sometimes Chromimue emits timeout error and this navigation and causes whole screenshot process abortion.
// For detail, see https://github.com/reg-viz/storycap/issues/896#issuecomment-2317248668
this.page.goto(
this.connection.url + '/iframe.html?selectedKind=story-crawler-kind&selectedStory=story-crawler-story',
{
timeout: 60_000,
waitUntil: 'domcontentloaded',
},
);

await this.page.waitForFunction(
() =>
(window as ExposedWindow).__STORYBOOK_CLIENT_API__ ||
Expand Down

0 comments on commit 5f9c181

Please sign in to comment.