tiernacity
tiernacity
CCConvex Community
Created by tiernacity on 3/21/2024 in #support-community
OCC and retries and errors, oh my
Hey Convex I'm trying to understand the behaviour of optimistic locking and retries, as it applies to my scenario and some errors I'm seeing. Your docs (here) say a mutation will get "several retries" before an error is thrown. It's possible to get more information about what "several retries" means? I'm also confused about whether the below log message is a (soft) warning or a (hard) error/failure. When I inspect my data in the dashboard, it looks like my mutation succeeded - so I think it's a warning? What's the retry behaviour and what are the thresholds/limits?
$20/03/2024, 11:53:21 [CONVEX M(<mutation_name>)] Documents read from or written to the "<table_name>" table changed while this mutation was being run and on every subsequent retry. A call to "scheduled_job_mutation_success" changed the document with ID "<id>. See https://docs.convex.dev/error#1"
$20/03/2024, 11:53:21 [CONVEX M(<mutation_name>)] Documents read from or written to the "<table_name>" table changed while this mutation was being run and on every subsequent retry. A call to "scheduled_job_mutation_success" changed the document with ID "<id>. See https://docs.convex.dev/error#1"
5 replies
CCConvex Community
Created by tiernacity on 2/21/2024 in #support-community
Problem integrating react-email into an internal action
Hi, I'm trying to send email from a convex action, using https://resend.com/ and https://github.com/resend/react-email. It's a next.js 13 app. The resend integration is working, it's just a simple call to their SDK. But when I try to integrate react-email, the convex functions won't deploy. My action (in /convex/email.ts) imports and calls a function from another module (in /convex/src/email/new_share.ts). This module then imports a react-email component from a .tsx file outside of /convex (in /emails/new_share.tsx). This component needs to be provided to the resend SDK. When I run npx convex dev -v --once, I can see .js files generated from my two files inside of /convex. I can also see .css files generated for each - these are presumably needed by react-email. I haven't yet investigated whether react-email can build without them. Regardless, my convex dev command fails because it doesn't want to upload CSS files. I've tried adding 'use node' in the action file, but see the same error. Any advice or guidance you can give me? Here's some edited output that shows the error:
➜ npx convex dev -v --once
Codegen finished.
...
Preparing convex/email.ts
Preparing convex/src/email/new_share.ts
...
Convex's runtime modules: [
...
'src/email/new_share.js',
'email.js',
...
'src/email/new_share.css',
'email.css'
]
Node.js runtime modules: []
Remote config will be overwritten with the following changes:
...
Add the following modules:
[+] src/email/new_share.js (327 B, source map 93 B)
[+] email.js (631 B, source map 903 B)
...
[+] src/email/new_share.css (1.6 KB, source map 2.0 KB)
[+] email.css (1.6 KB, source map 2.0 KB)

✖ Error: Unable to push deployment config to https://<redacted>.convex.cloud
400 Bad Request: BadConvexModuleIdentifier: Hit an error while pushing:
src/email/new_share.css is not a valid path to a Convex module. Module path (src/email/new_share.css) has an extension that isn't 'js'.
➜ npx convex dev -v --once
Codegen finished.
...
Preparing convex/email.ts
Preparing convex/src/email/new_share.ts
...
Convex's runtime modules: [
...
'src/email/new_share.js',
'email.js',
...
'src/email/new_share.css',
'email.css'
]
Node.js runtime modules: []
Remote config will be overwritten with the following changes:
...
Add the following modules:
[+] src/email/new_share.js (327 B, source map 93 B)
[+] email.js (631 B, source map 903 B)
...
[+] src/email/new_share.css (1.6 KB, source map 2.0 KB)
[+] email.css (1.6 KB, source map 2.0 KB)

✖ Error: Unable to push deployment config to https://<redacted>.convex.cloud
400 Bad Request: BadConvexModuleIdentifier: Hit an error while pushing:
src/email/new_share.css is not a valid path to a Convex module. Module path (src/email/new_share.css) has an extension that isn't 'js'.
42 replies