noob saibot
noob saibot
CCConvex Community
Created by noob saibot on 11/30/2024 in #support-community
using push notifications component in monorepo with react native expo
@Moinul Moin Thanks. I have upgraded to latest Expo 52 (which means latest expo-router and latest expo-notifications). So I cannot downgrade the version I'm using in the expo app. I'm using pnpm monorepo and I'm making sure to install @convex-dev/expo-push-notifications inside the /apps/convex folder so that it does not affect the rest of the monorepo by first cd /apps/convex and then run pnpm add @convex-dev/expo-push-notifications. This has not fixed the issue. Then I have attempted to stick expo-notifications version for the whole monorepo by adding overrides to the root package.json:
"overrides": {
"expo-notifications": "~0.29.8"
},
"overrides": {
"expo-notifications": "~0.29.8"
},
Unfortunately I'm observing the same behaviour. I'm wondering if I could find a working example with monorepo and convex push notifications.
7 replies
CCConvex Community
Created by noob saibot on 12/13/2024 in #support-community
Help me better understand paginated queries
yes, that's just a typo, in my code I don't have a typo.
8 replies
CCConvex Community
Created by noob saibot on 12/13/2024 in #support-community
Help me better understand paginated queries
The next observation: I decided to not user the helper function filter and reverted to the built-in ctx.db.query. And it seems to work as expected even without applying .order("descr"). The below query does return 3 records even without order:
const paginated_members = await ctx.db
.query("members")
.withIndex("by_user", (q) => q.eq("user_id", ctx.user._id))
.filter((q) => q.neq(q.field("campaign_id"), undefined))
.paginate(args.paginationOpts);
const paginated_members = await ctx.db
.query("members")
.withIndex("by_user", (q) => q.eq("user_id", ctx.user._id))
.filter((q) => q.neq(q.field("campaign_id"), undefined))
.paginate(args.paginationOpts);
8 replies
CCConvex Community
Created by noob saibot on 12/13/2024 in #support-community
Help me better understand paginated queries
@ian Thanks for the reply. I refactored my code to paginate over the members table. It is working as expected. But the fact that paginate applies the filter after collecting the data, doesn't this lead to errors? For example in my case, given the user_id, these are the 4 data in the members table:
(mem_1, camp_1),
(mem_2, camp_2),
(mem_3, camp_3),
(mem_4, undefined)
(mem_1, camp_1),
(mem_2, camp_2),
(mem_3, camp_3),
(mem_4, undefined)
Now with initialNumItems = 3 and the below (simplified) query:
// paginate members:
const filters = await filter(ctx.db.query("members"), async (mem) => {
console.log("mem") <-- I'm logging this record and I see that mem_1 is never found
...
})
// paginate members:
const filters = await filter(ctx.db.query("members"), async (mem) => {
console.log("mem") <-- I'm logging this record and I see that mem_1 is never found
...
})
If I run the above query without adding .order("descr"), I'm observing that the records mem_4, mem_3, mem_2 are selected. The consequence is the query returns only 2 records (because mem_4 is not associated with a campaign). But if I apply .order("descr") then I get the 3 expected records: so the order of pagination matters. I would expect convex to, first, find all records of the filter and then apply pagination (that's how to preview system I used - Hasura + Postgres - worked, unless I'm mistaken).
8 replies
CCConvex Community
Created by noob saibot on 11/30/2024 in #support-community
using push notifications component in monorepo with react native expo
I picked a look into @convex-dev/expo-push-notifications node_modules, I see that it is using "expo-notifications": "^0.28.16", In my expo application, I'm using "expo-notifications": "~0.29.8",. Not sure if this is causing some conflict... I hope someone from the convex team could help me understand or address this issue.
7 replies
CCConvex Community
Created by noob saibot on 12/6/2024 in #support-community
Help needed: Integrate Launchdarkly with Convex Dev
Hi @ari the issue has been fixed thank you. Quick question: the setup I have done is for the development environment. If I want to setup integration for the production env, should I reuse the same "Component API Token"? as I cannot generate a second token.
16 replies
CCConvex Community
Created by noob saibot on 11/30/2024 in #support-community
using push notifications component in monorepo with react native expo
Hi @Moinul Moin thanks for the reply. I have not installed react-navigation in my native app. But I'm using the latest expo-router which I believe uses react-navigation internally. Not sure how I will restrict a single version of react-navigation.
7 replies
CCConvex Community
Created by noob saibot on 12/6/2024 in #support-community
Help needed: Integrate Launchdarkly with Convex Dev
No description
16 replies
CCConvex Community
Created by noob saibot on 12/6/2024 in #support-community
Help needed: Integrate Launchdarkly with Convex Dev
Also when I scroll the list of integrations on my LaunchDarkly Dashboard /Organisation/Settings page, I don't see a "convex" integration item.
16 replies
CCConvex Community
Created by noob saibot on 12/6/2024 in #support-community
Help needed: Integrate Launchdarkly with Convex Dev
No description
16 replies
CCConvex Community
Created by stormblessed on 12/4/2024 in #support-community
table value in array when querying
Thanks for the article. I'll go through it. I understand that the best way is try to narrow down the subset of records with an index. My use case is simple: I have a part of the user name "e.g John S..." (for John Smith) and I would like to find "John Smith". There is nothing else to narrow the subset of users. In this case, should I use a "search Index"?
9 replies
CCConvex Community
Created by noob saibot on 11/26/2024 in #support-community
How to implement pagination with join and filtering
THanks @ian for this answer
4 replies
CCConvex Community
Created by noob saibot on 11/14/2024 in #support-community
getUserIdentity returns null in Expo Clerk (Android)
@FleetAdmiralJakob 🗕 🗗 🗙 I fixed the issue by, indeed, updating all other dependencies
4 replies
CCConvex Community
Created by noob saibot on 10/6/2024 in #support-community
Convex Auth: react-native expo OTP throws Uncaught Error: Could not verify code
The problem I'm facing is that the "verify" function throws a bunch of errors. Despite these errors, the user is able to login on the (mobile) client side. Here are the errors in the debug panel:
10/6/2024, 8:48:18 PM [CONVEX M(auth:store)] [INFO] '`auth:store` type: verifyCodeAndSignIn'
10/6/2024, 8:48:18 PM [CONVEX M(auth:store)] [ERROR] 'Too many failed attemps to verify code for this email'
10/6/2024, 8:48:18 PM [CONVEX A(auth:signIn)] Uncaught Error: Could not verify code
at handleEmailAndPhoneProvider (../../../../node_modules/@convex-dev/auth/dist/server/implementation/signIn.js:49:8)
at async handler (../../../../node_modules/@convex-dev/auth/dist/server/implementation/index.js:249:20)

10/6/2024, 8:48:18 PM [CONVEX M(auth:store)] [INFO] '`auth:store` type: refreshSession'
10/6/2024, 8:48:18 PM [CONVEX M(auth:store)] [INFO] '`auth:store` type: verifyCodeAndSignIn'
10/6/2024, 8:48:18 PM [CONVEX M(auth:store)] [ERROR] 'Too many failed attemps to verify code for this email'
10/6/2024, 8:48:18 PM [CONVEX A(auth:signIn)] Uncaught Error: Could not verify code
at handleEmailAndPhoneProvider (../../../../node_modules/@convex-dev/auth/dist/server/implementation/signIn.js:49:8)
at async handler (../../../../node_modules/@convex-dev/auth/dist/server/implementation/index.js:249:20)

10/6/2024, 8:48:18 PM [CONVEX M(auth:store)] [INFO] '`auth:store` type: refreshSession'
As you can see from the logs, in the last line, despite the errors, the app ends up successfully login
3 replies
CCConvex Community
Created by noob saibot on 8/7/2024 in #support-community
Convex auth: auth.getSessionId returns null
@Oren what do you mean by App Router without SSA works? Could you indicate the exact place in the documentation you are refering to? Or could you, if it is possible, share some code snippet to see what is working in your case? Thanks a lot
39 replies
CCConvex Community
Created by noob saibot on 8/7/2024 in #support-community
Convex auth: auth.getSessionId returns null
I did all the changes, unfortunately the issue remains. I'll need a clear guidance from the team since the docs just mention:
import {
convexAuthNextjsMiddleware,
...
} from "@convex-dev/auth/nextjs/server"; // <-- this path!
import {
convexAuthNextjsMiddleware,
...
} from "@convex-dev/auth/nextjs/server"; // <-- this path!
39 replies
CCConvex Community
Created by noob saibot on 8/7/2024 in #support-community
Convex auth: auth.getSessionId returns null
It is worth noting that my application is a monorepo (turborepo). The tsconfig.json above is the configuration of the next app within the monorepo, not sure if this info could be of any relevance
39 replies
CCConvex Community
Created by noob saibot on 8/7/2024 in #support-community
Convex auth: auth.getSessionId returns null
Here is my tsconfig:
{
"extends": "@paygroup/tsconfig/base.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": ["./src/*"]
},
"plugins": [{ "name": "next" }],
"moduleResolution": "bundler",
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": [".", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
{
"extends": "@paygroup/tsconfig/base.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": ["./src/*"]
},
"plugins": [{ "name": "next" }],
"moduleResolution": "bundler",
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": [".", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
39 replies
CCConvex Community
Created by noob saibot on 8/7/2024 in #support-community
Convex auth: auth.getSessionId returns null
@Devben I set moduleResolution to "bundler". Unfortunately it has not solved my issue...
39 replies
CCConvex Community
Created by noob saibot on 8/7/2024 in #support-community
Convex auth: auth.getSessionId returns null
Hi @Devben Could you share your solution? Thanks
39 replies