quadro
quadro
CCConvex Community
Created by quadro on 2/22/2025 in #support-community
Convex schema is not enforced properly
[CONVEX M(orders:setOrderPaid)] [LOG] 'Received offer ID:' 'jn7d950h4v4zdnktjazswr4dnx7at5zv' [handleSuccessfulPayment] Error: { error: '[Request ID: aeb2fb84dd5d9e4d] Server Error\n' + 'Uncaught ConvexError: Invalid offer ID: No matching offer found\n' + ' at handler (../convex/orders.ts:51:6)\n', sessionId: 'cs_test_b1lwARf9sSn9khOxZklQlhXdupKi0Ay9psU26Ug6sWzLLofV6dN3PmOyut', timestamp: '2025-02-22T15:17:10.468Z' } when i try to finalize an order using stripe checkout i pass some metadata into the session. i use this metadata to populate my order. in local environment everything is smooth and works as expected. when i run this function in my staging or production environment, the mutation do not run giving me above error. i double checked and the schema is not enforced properly, some fields when i try to run the function inside convex dashboard are missing, and some are not recognized for these two environments, although everything is deployed using commands as suggested for vercel using nextjs. i also double checked in the dashboard the existence of the offer, using the same id i passed into the metadata, it does exist in my offer table i tried to normalize the ids, casting it, upgrading convex to latest version but nothing. have someone experienced such a mission critical bug? every help or insight would be greatly appreciated. i can share mutation schema and more logs if this can help thank you
5 replies