You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our team CI/CD pipeline, sometimes it can be slow and failed with timeout error while waiting for Storybook definitions.
Here's an error message:
info Executable Chromium path: /usr/bin/chromium
debug Wait for stories definition.
info => Using default Webpack5 setup
<A bunch of debug logs like "<s> [webpack.Progress] 75% sealing chunk optimization MergeDuplicateChunksPlugin">
error Navigation timeout of 30000 ms exceeded
TimeoutError: Navigation timeout of 30000 ms exceeded
at <projectRootDir>/node_modules/puppeteer-core/lib/cjs/puppeteer/common/LifecycleWatcher.js:106:111
If so, could someone help create this as a new option that we can customize, just like serverTimeout? Maybe we can add storiesDefinitionTimeout as another option?
The text was updated successfully, but these errors were encountered:
Here's the current workaround I'm using to get around this by spawning a Storybook server ahead and have my own timeout:
import{spawn}from'child_process';import{chromium}from'playwright';importwaitOnfrom'wait-on';asyncfunctionspawnStorybookServer(){conststorybookUrl='http://localhost:6006';console.log(`Starting Storybook server with "npm run ${storybookCommand}"`);conststorybookServer=spawn(`npm run ${storybookCommand}`,{shell: true});console.log(`Waiting for Storybook server to start at ${storybookUrl}`);awaitwaitOn({resources: [storybookUrl],timeout: storybookServerTimeout});console.log('Storybook server started');console.log('Waiting for Storybook to finish loading');constbrowser=awaitchromium.launch({args: ['--no-sandbox','--disable-setuid-sandbox','--disable-dev-shm-usage'],executablePath: process.env.CHROME_PATH,});constpage=awaitbrowser.newPage();awaitpage.goto(storybookUrl,{timeout: storybookLoadTimeout});awaitbrowser.close();console.log('Storybook finished loading');returnstorybookServer;}awaitspawnStorybookServer();
This is a code snippet so there are some variables that need to be replaced. But you should get an idea.
We have the same issue. Almost all runs fail due to the exceeded timeout, only sometimes it works. Would be nice to have the timeout as configurable option!
In our team CI/CD pipeline, sometimes it can be slow and failed with timeout error while waiting for Storybook definitions.
Here's an error message:
If I'm guessing right, it probably failed on this line https://github.com/reg-viz/storycap/blob/master/packages/storycrawler/src/browser/stories-browser.ts#L56 while it's waiting for the page to be fully loaded. By default page.goto probably has a timeout of 30 seconds.
If so, could someone help create this as a new option that we can customize, just like
serverTimeout
? Maybe we can addstoriesDefinitionTimeout
as another option?The text was updated successfully, but these errors were encountered: