cal.com
cal.com copied to clipboard
Error on Stripe Activation in Event Type
Strange that this Bug just gets converted to a discusion without any comment.
Discussed in https://github.com/calcom/cal.com/discussions/6987
Originally posted by prononext February 9, 2023 I got this strange bug when trying to activate Stripe inside a Event-Type on a self hosted docker instance.
[ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "client_id" ], "message": "Required" }, { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "client_secret" ], "message": "Required" }, { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "public_key" ], "message": "Required" }, { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "webhook_secret" ], "message": "Required" }, { "code": "invalid_type", "expected": "number", "received": "undefined", "path": [ "payment_fee_fixed" ], "message": "Required" }, { "code": "invalid_type", "expected": "number", "received": "undefined", "path": [ "payment_fee_percentage" ], "message": "Required" } ]
I have filled all this environment variables correctly:
NEXT_PUBLIC_STRIPE_PUBLIC_KEY=pk_...
STRIPE_PRIVATE_KEY=sk_...
STRIPE_CLIENT_ID=ca_...
STRIPE_WEBHOOK_SECRET=whsec_...
On the container logs it is showing:
@calcom/web:start: addIssue: [Function (anonymous)],
@calcom/web:start: addIssues: [Function (anonymous)],
@calcom/web:start: name: 'ZodError',
@calcom/web:start: errors: [
@calcom/web:start: {
@calcom/web:start: code: 'invalid_type',
@calcom/web:start: expected: 'string',
@calcom/web:start: received: 'undefined',
@calcom/web:start: path: [Array],
@calcom/web:start: message: 'Required'
@calcom/web:start: },
@calcom/web:start: {
@calcom/web:start: code: 'invalid_type',
@calcom/web:start: expected: 'string',
@calcom/web:start: received: 'undefined',
@calcom/web:start: path: [Array],
@calcom/web:start: message: 'Required'
@calcom/web:start: },
@calcom/web:start: {
@calcom/web:start: code: 'invalid_type',
@calcom/web:start: expected: 'string',
@calcom/web:start: received: 'undefined',
@calcom/web:start: path: [Array],
@calcom/web:start: message: 'Required'
@calcom/web:start: },
@calcom/web:start: {
@calcom/web:start: code: 'invalid_type',
@calcom/web:start: expected: 'string',
@calcom/web:start: received: 'undefined',
@calcom/web:start: path: [Array],
@calcom/web:start: message: 'Required'
@calcom/web:start: },
@calcom/web:start: {
@calcom/web:start: code: 'invalid_type',
@calcom/web:start: expected: 'number',
@calcom/web:start: received: 'undefined',
@calcom/web:start: path: [Array],
@calcom/web:start: message: 'Required'
@calcom/web:start: },
@calcom/web:start: {
@calcom/web:start: code: 'invalid_type',
@calcom/web:start: expected: 'number',
@calcom/web:start: received: 'undefined',
@calcom/web:start: path: [Array],
@calcom/web:start: message: 'Required'
@calcom/web:start: }
@calcom/web:start: ]
@calcom/web:start: }
I am running on:
v.2.5.10-sh-ce
Am I doing something wrong? How can I get it to work?
this seems self-hoster related which we typically cover in discussions, because it does not affect everyone
@PeerRich thats how Github Repos work, not all Issues affect every user of the product, but treating self hosted users like second class when just converting them to discussions is not the way to go, sorry.
Self hosted users are responsible for the biggest code contributions to a opensource product, that has to stay motivated. Self hosted users give the most feature requests which help to involve the solution and stay successful, also because paid users normally don't run around github all day. as my issue was converted I just lost the motivation to give my 10 feature requests and optimizations to the Cal.com github repo...
its not a second class ticket. i would even argue because more people look into discussions for self-host advice you find a reply faster
did you set a payment_fee_percentage in the .env?
No I did not send set anything more than is mentioned in https://developer.cal.com/self-hosting/install-apps/stripe
STRIPE_PRIVATE_KEY=sk_...
STRIPE_CLIENT_ID=ca_...
STRIPE_WEBHOOK_SECRET=whsec_...```
interesting. will check with the team cc @zomars and @alannnc
first of all, thank you for this beautiful app, I see lots of potential for it for my photo business. I am trying to set the stripe also and I am encountering the same issues listed above, figured I would add my comment and check if anyone found some extra information. I wish I knew how to work on the code and helped out that way. If there is anything I can provide please ask away.
Hello, is anyone experiencing this issue still? I would like to have stripe integrated and i am willing to pay someone to do that or integrate paypal..
@Jozmichne you can book me on https://cal.com/alan for more help. Can I get more details about your configuration?
- are you self hosted? What's your cal com username?
- A screenshot of the error you are receiving?
Hi @Alannnc
@Jozmichne you can book me on https://cal.com/alan for more help. Can I get more details about your configuration?
* are you self hosted? What's your cal com username? * A screenshot of the error you are receiving?
Hi Alan,
Thank you for responding, I am self hosting on a synology docker container instance. and here is the error i am receiving,
I changed the environment file to include all the instructions on cal.com self help info
@Jozmichne Hey getting back to you, seems like while installing the new credentials something went wrong in the process. Can we validate you have the correct values in here? https://{your-self-hosted-url}/settings/admin/apps/payment
@Jozmichne Hey getting back to you, seems like while installing the new credentials something went wrong in the process. Can we validate you have the correct values in here? https://{your-self-hosted-url}/settings/admin/apps/payment
![]()
this page doesnt show up at all, the destination will take me to an app list where i can toggle stripe on and off, thats all, i cannot edit or change any values, I did enter all these values in the .env file though
Can you verify this is working on latest release?
Can you verify this is working on latest release?
I just installed the latest release and the problem is still there. cannot activate stripe. Thanks for asking
Can you verify this is working on latest release?
I just installed the latest release and the problem is still there. cannot activate stripe. Thanks for asking
Have you tried using the Admin UI in /settings/admin/apps ?
Can you verify this is working on latest release?
I just installed the latest release and the problem is still there. cannot activate stripe. Thanks for asking
Have you tried using the Admin UI in /settings/admin/apps ?
yes i get to that page and stripe is activated then i go under /apps find stripe and when i hit install it will give me that error in the screenshot above. if you would like i can setup a screenshare and show you.
That would be helpful! 🙏🏽
That would be helpful! 🙏🏽
I am new to GitHub. How can i message you directly or get your email? I don't use Twitter and in my linked in I can't add you for some reason
@Jozmichne you can create a loom and post it here https://www.loom.com/
@Jozmichne you can create a loom and post it here https://www.loom.com/
Okay I will try to do that later today what did you want me to show and focus on to help troubleshoot this
I'm encountering same issue. Same error and the stripe app does not offer a button to set the keys. It's only an on/off toggle.
I've set all the env vars, but it still does not work.
I'm also experiencing the same error. cal.com actual version self-hosted with docker. thanks
Was able to bypass it by launching yarn db-studio, going to the App table, finding the stripe slug and populating the keys column with a valid JSON object of the following form:
{
"client_id": "ca_...",
"public_key": "pk_test_...",
"client_secret": "sk_test_...",
"webhook_secret": "whsec_...",
"payment_fee_fixed": 0,
"payment_fee_percentage": 0
}
Now I'm getting Webhook Error: No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe? and the payment status is stuck at Pending.
Okay, I've updated the env var for the webhook_secret, and now incoming webhook payloads are validated, but now I'm getting the Incoming Connected Account error, which doesn't mean much. I'm running test credentials though, not sure if that would affect it.
But aren't payments an exclusive feature of the enterprise version? I still need to figure out if it is possible to make stripe payments work in the community docker version.
After following an unrelated set up for Google Calendars, I ran the
cd packages/prisma
yarn seed-app-store
commands and now Stripe button in my local app-store has the Keys button, where as before it did not...
~~I think there's a bug in the packages/features/apps/AdminAppsList.tsx on the line 104.
Currently it reads "When there are application keys open the keys dialog, otherwise just toggle". I think the code meant - When you toggle and there aren't application keys - show keys dialog, but if the keys are there - just enable the app.
Elsewhere in the same component it only shows the edit button if the keys are set...~~
~~Okay, the problem is that the editor window is not visible if the Db record is empty, but we can derive the necessary keys from the zod validation schema... I'm playing with my deployed version currently on a very small VPS, so recompiling takes 10 minutes and running in dev is like pulling teeth, because each pages takes a minute to render... I might try loading up code on a beefier machine and see if I can come up with something.~~
Okay, the actual problem for Stripe specifically, is that the appKeysSchemas lists the schema for it under stripe key, but the app is using the stripe-payment slug, so packages\trpc\server\routers\viewer\apps\listLocal.handler.ts cannot create default keys for it, and the key edit button does not show up.