Paul Ochieng
Paul Ochieng3w ago

Anyone face this bug when trying to push

Anyone face this bug when trying to push changes to convex ✖ Error: Unable to push deployment config to https://giddy-hyena-745.convex.cloud ✖ Error fetching POST https://giddy-hyena-745.convex.cloud/api/push_config 400 Bad Request: Error: Hit an error while pushing: Uncaught TypeError: Cannot read properties of undefined (reading 'json') at <anonymous> (../../node_modules/convex/src/values/validators.ts:307:24) at map [as map] (<anonymous>) at get json [as json] (../../node_modules/convex/src/values/validators.ts:304:10)
3 Replies
erquhart
erquhart3w ago
I wish stack traces were more than three frames, hard to say where this originated in your code I would look for a v.object(), maybe recently introduced or edited, that ended up with an undefined value somewhere in it's definition. The v.json() here is what's throwing: https://github.com/get-convex/convex-js/blob/407ba3fc26480a7f41e4a87ca7597725078882f1/src/values/validators.ts#L307 v is a value from the object passed to v.object(), so I'd bet there's an undefined value somewhere in one of your object validators.
ballingt
ballingt3w ago
agree this probably means there's something that isn't a validator somewhere. .json() is a method on a validator but if something isn't a validator it won't have this. Is that all the stack trace you get @Paul Ochieng?
erquhart
erquhart3w ago
These kinds of errors in Convex provide exactly three frames in my experience. Looks like there's a support post too, @Paul Ochieng please follow up there so we have one place to discuss: https://discord.com/channels/1019350475847499849/1351650663158907011

Did you find this page helpful?