π₯ Make videos programmatically with React
improve user being guided to the help page
Jonny Burger182f8c06770b
diff --git a/packages/docs/docs/timeout.md b/packages/docs/docs/timeout.mdindex bcf972f4b4..e332e1777d 100644--- a/packages/docs/docs/timeout.md+++ b/packages/docs/docs/timeout.md@@ -55,12 +55,16 @@ Especially 1.x releases could timeout when importing large assets### Video needs to be downloaded-If you render a video using [`<OffthreadVideo>`](/docs/offthreadvideo), then the video needs to be downloaded before it can be read. If the video is large and takes longer than the timeout to be downloaded, then the timeout will be triggered. In that you should increase the [timeout](#increase-timeout).+If you render a video using [`<OffthreadVideo>`](/docs/offthreadvideo), then the video needs to be downloaded before it can be read. [If the video is large and takes longer than the timeout to be downloaded, then the timeout will be triggered](/docs/troubleshooting/delay-render-proxy). In that you should increase the [timeout](#increase-timeout).### Not helpful?[Open an issue](https://github.com/remotion-dev/remotion/issues/new) and try to describe your issue in a way that is reproducible for us. We will try to help you out.+## "Loading <Img> with src http://localhost:3000/proxy"++See here for this specific [timeout](/docs/troubleshooting/delay-render-proxy) message.+## Increase timeout<AvailableFrom v="2.6.3"/>Sometimes, you cannot avoid a frame taking longer than 30 seconds to render. For example:@@ -100,3 +104,4 @@ Uncaught Error: A delayRender() "Fetching data from API..." was called but not c- [Data fetching](/docs/data-fetching)- [Loading Root Component Timeout](/docs/troubleshooting/loading-root-component)- ["Timed out evaluating page function"](/docs/troubleshooting/timed-out-page-function)+- ["Loading <Img> with src http://localhost:3000/proxy ..."](/docs/troubleshooting/delay-render-proxy)diff --git a/packages/docs/docs/troubleshooting/delay-render-proxy.md b/packages/docs/docs/troubleshooting/delay-render-proxy.mdindex 5afc526b35..b023d63d8f 100644--- a/packages/docs/docs/troubleshooting/delay-render-proxy.md+++ b/packages/docs/docs/troubleshooting/delay-render-proxy.md@@ -8,7 +8,7 @@ crumb: "Troubleshooting"The error message `A delayRender() "Loading <Img> with src=http://localhost:3000/proxy?src=[...]&time=[...]&transparent=[...]" was called but not cleared after 28000ms. See https://remotion.dev/docs/timeout for help`:```-A delayRender() "Loading <Img> with src=http://localhost:3000/proxy?src=http%3A%2F%2Flocalhost%3A3000%2Fpublic%2Fbackground.mp4&time=683.45&transparent=false" was called but not cleared after 28000ms. See https://remotion.dev/docs/delay-render-proxy for help+A delayRender() "Loading <Img> with src=http://localhost:3000/proxy?src=http%3A%2F%2Flocalhost%3A3000%2Fpublic%2Fbackground.mp4&time=683.45&transparent=false" was called but not cleared after 28000ms. See https://remotion.dev/docs/timeout for help```occurs when loading an [`<OffthreadVideo>`](/docs/offthreadvideo) and the frame cannot be extracted within the [timeout](/docs/cli/render#--timeout).diff --git a/packages/renderer/src/print-useful-error-message.ts b/packages/renderer/src/print-useful-error-message.tsindex 76c22c24a0..29dd22eebb 100644--- a/packages/renderer/src/print-useful-error-message.ts+++ b/packages/renderer/src/print-useful-error-message.ts@@ -1,3 +1,4 @@+import {Log} from './logger';import {truthy} from './truthy';const alreadyPrinted: Error[] = [];@@ -11,8 +12,8 @@ export const printUsefulErrorMessage = (err: Error) => {alreadyPrinted.push(err);if (err.message.includes('Could not play video with')) {- console.log();- console.log(+ Log.info();+ Log.info('π‘ Get help for this issue at https://remotion.dev/docs/media-playback-error',);}@@ -21,29 +22,33 @@ export const printUsefulErrorMessage = (err: Error) => {err.message.includes('A delayRender()') &&err.message.includes('was called but not cleared after')) {- console.log();- console.log(- 'π‘ Get help for this issue at https://remotion.dev/docs/timeout',- );+ Log.info();+ if (err.message.includes('/proxy')) {+ Log.info(+ 'π‘ Get help for this issue at https://remotion.dev/docs/troubleshooting/delay-render-proxy',+ );+ }++ Log.info('π‘ Get help for this issue at https://remotion.dev/docs/timeout');}if (err.message.includes('Target closed')) {- console.log();- console.log(+ Log.info();+ Log.info('π‘ Get help for this issue at https://remotion.dev/docs/target-closed',);}if (err.message.includes('Timed out evaluating')) {- console.log();- console.log(+ Log.info();+ Log.info('π‘ Get help for this issue at https://remotion.dev/docs/troubleshooting/timed-out-page-function',);}if (err.message.includes('ENAMETOOLONG')) {- console.log();- console.log(+ Log.info();+ Log.info('π‘ Get help for this issue at https://remotion.dev/docs/enametoolong',);}@@ -51,21 +56,21 @@ export const printUsefulErrorMessage = (err: Error) => {if (err.message.includes('Member must have value less than or equal to 3008')) {- console.log();- console.log(+ Log.info();+ Log.info('π‘ This error indicates that you have a AWS account on the free tier or have been limited by your organization. Often times this can be solved by adding a credit card.',);}if (err.stack?.includes('TooManyRequestsException: Rate Exceeded.')) {- console.log();- console.log(+ Log.info();+ Log.info('π‘ This error indicates that your Lambda concurrency limit is too low. See: https://www.remotion.dev/docs/lambda/troubleshooting/rate-limit',);}if (err.message.includes('Error creating WebGL context')) {- console.log();+ Log.info();console.warn('π‘ You might need to set the OpenGL renderer to "angle-egl", "angle" (or "swangle" if rendering on lambda). Learn why at https://www.remotion.dev/docs/three',);@@ -75,15 +80,15 @@ export const printUsefulErrorMessage = (err: Error) => {}if (err.message.includes('The bucket does not allow ACLs')) {- console.log();- console.log(+ Log.info();+ Log.info('π‘ Fix for this issue: https://remotion.dev/docs/lambda/troubleshooting/bucket-disallows-acl',);}if (err.message.includes('Minified React error #306')) {const componentName = err.message.match(/<\w+>/)?.[0];- console.log(+ Log.info(['π‘ This error indicates that the component',componentName ? `(${componentName})` : null,@@ -93,27 +98,27 @@ export const printUsefulErrorMessage = (err: Error) => {.join(' '),);- console.log();- console.log(+ Log.info();+ Log.info(' Check the root file and ensure that the component is not undefined.',);- console.log(+ Log.info(' Oftentimes, this happens if the component is missing the `export` keyword',);- console.log(+ Log.info(' or if the component was renamed and the import statement not properly adjusted.',);}if (err.message.includes('GLIBC_')) {- console.log('π‘ Remotion requires at least Libc 2.35.');- console.log(+ Log.info('π‘ Remotion requires at least Libc 2.35.');+ Log.info('π‘ Get help for this issue: https://github.com/remotion-dev/remotion/issues/2439',);}if (err.message.includes('EBADF')) {- console.log('π‘ This error might be fixed by changing your Node version:');- console.log(' https://github.com/remotion-dev/remotion/issues/2452');+ Log.info('π‘ This error might be fixed by changing your Node version:');+ Log.info(' https://github.com/remotion-dev/remotion/issues/2452');}};