Skip to content

Commit 104f720

Browse files
authored
docs(troubleshooting): add COULD_NOT_FIND_EXECUTOR error and IPv4 support (#2950)
Document COULD_NOT_FIND_EXECUTOR error with dynamic imports and IPv4 database connection limitation in troubleshooting guide.
1 parent e017913 commit 104f720

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

docs/troubleshooting.mdx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ Your code is deployed separately from the rest of your app(s) so you need to mak
151151

152152
Prisma uses code generation to create the client from your schema file. This means you need to add a bit of config so we can generate this file before your tasks run: [Read the guide](/config/extensions/prismaExtension).
153153

154+
### Database connection requires IPv4
155+
156+
Trigger.dev currently only supports IPv4 database connections. If your database provider only provides an IPv6 connection string, you'll need to use an IPv4 address instead. [Upvote IPv6 support](https://triggerdev.featurebase.app/p/support-ipv6-database-connections).
157+
154158
### `Parallel waits are not supported`
155159

156160
In the current version, you can't perform more that one "wait" in parallel.
@@ -171,6 +175,36 @@ The most common situation this happens is if you're using `Promise.all` around s
171175

172176
Make sure that you always use `await` when you call `trigger`, `triggerAndWait`, `batchTrigger`, and `batchTriggerAndWait`. If you don't then it's likely the task(s) won't be triggered because the calling function process can be terminated before the networks calls are sent.
173177

178+
### `COULD_NOT_FIND_EXECUTOR`
179+
180+
If you see a `COULD_NOT_FIND_EXECUTOR` error when triggering a task, it may be caused by dynamically importing the child task. When tasks are dynamically imported, the executor may not be properly registered.
181+
182+
Use a top-level import instead:
183+
184+
```ts
185+
import { myChildTask } from "~/trigger/my-child-task";
186+
187+
export const myTask = task({
188+
id: "my-task",
189+
run: async (payload: string) => {
190+
await myChildTask.trigger({ payload: "data" });
191+
},
192+
});
193+
```
194+
195+
Alternatively, use `tasks.trigger()` or `batch.triggerAndWait()` without importing the task:
196+
197+
```ts
198+
import { batch } from "@trigger.dev/sdk";
199+
200+
export const myTask = task({
201+
id: "my-task",
202+
run: async (payload: string) => {
203+
await batch.triggerAndWait([{ id: "my-child-task", payload: "data" }]);
204+
},
205+
});
206+
```
207+
174208
### Rate limit exceeded
175209

176210
<RateLimitHitUseBatchTrigger />

0 commit comments

Comments
 (0)