Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CAL-1687] Error on Stripe Activation in Event Type #6994

Closed
prononext opened this issue Feb 10, 2023 · 33 comments
Closed

[CAL-1687] Error on Stripe Activation in Event Type #6994

prononext opened this issue Feb 10, 2023 · 33 comments
Labels
🐛 bug Something isn't working Medium priority Created by Linear-GitHub Sync webhooks area: webhooks, callback, webhook payload

Comments

@prononext
Copy link

prononext commented Feb 10, 2023

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?

CAL-1687

@PeerRich
Copy link
Member

this seems self-hoster related which we typically cover in discussions, because it does not affect everyone

@prononext
Copy link
Author

@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...

@PeerRich PeerRich added the 🐛 bug Something isn't working label Feb 14, 2023
@PeerRich
Copy link
Member

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

@PeerRich
Copy link
Member

did you set a payment_fee_percentage in the .env?

@PeerRich PeerRich added the Low priority Created by Linear-GitHub Sync label Feb 17, 2023
@prononext
Copy link
Author

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_...```

@PeerRich
Copy link
Member

interesting. will check with the team cc @zomars and @alannnc

@PeerRich PeerRich added Medium priority Created by Linear-GitHub Sync and removed Low priority Created by Linear-GitHub Sync labels Feb 17, 2023
@Jozmichne
Copy link

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.

@Jozmichne
Copy link

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..

@alannnc
Copy link
Contributor

alannnc commented Apr 2, 2023

@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?

@Jozmichne
Copy link

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,
stripe error
I changed the environment file to include all the instructions on cal.com self help info

@alannnc
Copy link
Contributor

alannnc commented Apr 4, 2023

@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

image

@Jozmichne
Copy link

@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

image

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

@zomars
Copy link
Member

zomars commented Apr 12, 2023

Can you verify this is working on latest release?

@Jozmichne
Copy link

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

@zomars
Copy link
Member

zomars commented Apr 12, 2023

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 ?

@Jozmichne
Copy link

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.

@zomars
Copy link
Member

zomars commented Apr 13, 2023

That would be helpful! 🙏🏽

@Jozmichne
Copy link

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

@zomars
Copy link
Member

zomars commented Apr 13, 2023

@Jozmichne you can create a loom and post it here https://www.loom.com/

@Jozmichne
Copy link

@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

@PeerRich PeerRich added this to the v.3.0 milestone May 15, 2023
@PeerRich PeerRich added the linear Sync Github Issue from community members to Linear.app label May 15, 2023
@PeerRich PeerRich changed the title Error on Stripe Activation in Event Type [CAL-1687] Error on Stripe Activation in Event Type May 15, 2023
@PeerRich PeerRich removed the linear Sync Github Issue from community members to Linear.app label May 26, 2023
@vsviridov
Copy link

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.

@wokawoka
Copy link

I'm also experiencing the same error.
cal.com actual version self-hosted with docker.
thanks

@vsviridov
Copy link

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
}

@vsviridov
Copy link

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.

@vsviridov
Copy link

vsviridov commented Jun 10, 2023

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.

@wokawoka
Copy link

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.

@vsviridov
Copy link

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...

image

@vsviridov
Copy link

vsviridov commented Jun 12, 2023

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...

@vsviridov
Copy link

vsviridov commented Jun 12, 2023

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.

@vsviridov
Copy link

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.

@PeerRich PeerRich modified the milestones: v3.0, v3.0 unfinished Jun 17, 2023
@PeerRich PeerRich added the webhooks area: webhooks, callback, webhook payload label Jun 19, 2023
@PeerRich PeerRich modified the milestones: v3.0 unfinished, v3.1, v3.2 Jun 26, 2023
@keithwillcode keithwillcode modified the milestones: v3.2, v3.3 Jul 14, 2023
@anuar19
Copy link

anuar19 commented Jul 21, 2023

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
}

Will it solve the issue?

Thanks

@keithwillcode keithwillcode modified the milestones: v3.3, v3.4 Sep 15, 2023
@PeerRich PeerRich added linear Sync Github Issue from community members to Linear.app and removed linear Sync Github Issue from community members to Linear.app labels Sep 25, 2023
@keithwillcode keithwillcode removed this from the v3.4 milestone Oct 6, 2023
@keithwillcode
Copy link
Contributor

@vsviridov Is this error issue still happening?

@vsviridov
Copy link

@vsviridov Is this error issue still happening?

I've since abandoned trying. So I can't confirm.

@PeerRich PeerRich closed this as not planned Won't fix, can't repro, duplicate, stale May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working Medium priority Created by Linear-GitHub Sync webhooks area: webhooks, callback, webhook payload
Projects
None yet
Development

No branches or pull requests

9 participants