Giter Site home page Giter Site logo

Comments (10)

BoPeng avatar BoPeng commented on June 8, 2024 1

I have the same problem after updating to djstripe 2.7.3. I also have DJSTRIPE_WEBHOOK_SECRET in settings and I do not know where the key is supposed to be set.

Edit1: I went to admin site, added a webhook (the uuid version), the new webhook appears on stripe.com, but the problem persists.

Edit2: I removed the old webhook from stripe.com. However, there seems to be no way to remove the old webhook from the admin interface. I actually receive a 500 error when I select the old webhook and run re-sync selected instance (which I hope should remove it). Performing "Sync all instances for all api keys" does not do anything.

Edit3: Although this error message blocks python manage.py showmigraitons, python manage.py shell is still usable. Upon inspecting djstripe.models.WebhookEndpoint, I can see that the secret of the old webhook is empty. Since I already removed the webhook from stripe.com, I have to remove it from the database. This appears to be the only way to remove this endpoint.

from dj-stripe.

lindemann-co avatar lindemann-co commented on June 8, 2024 1

Thank you Arnav

from dj-stripe.

arnav13081994 avatar arnav13081994 commented on June 8, 2024

@yousifa Are you seeing any warnings in the console after launching the server? If yes please list them here

from dj-stripe.

yousifa avatar yousifa commented on June 8, 2024
CRITICALS:
?: (djstripe.C006) DJSTRIPE_WEBHOOK_VALIDATION='verify_signature' but Webhook Endpoint: <ENDPOINT 1> has no secret set
	HINT: Set secret or set DJSTRIPE_WEBHOOK_VALIDATION='retrieve_event'
?: (djstripe.C006) DJSTRIPE_WEBHOOK_VALIDATION='verify_signature' but Webhook Endpoint: <ENDPOINT 2> has no secret set
	HINT: Set secret or set DJSTRIPE_WEBHOOK_VALIDATION='retrieve_event'

WARNINGS:
?: (djstripe.W005) The secret of Webhook Endpoint: <ENDPOINT 1> is not populated in the db. Events sent to it will not work properly.
	HINT: This can happen if it was deleted and resynced as Stripe sends the webhook secret ONLY on the creation call. Please use the django shell and update the secret with the value from <STRIPE WEBHOOK> ?: (djstripe.W005) The secret of Webhook Endpoint:<ENDPOINT 2> is not populated in the db. Events sent to it will not work properly.
	HINT: This can happen if it was deleted and resynced as Stripe sends the webhook secret ONLY on the creation call. Please use the django shell and update the secret with the value from <STRIPE WEBHOOK>
account.OwnerProfile: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.

from dj-stripe.

yousifa avatar yousifa commented on June 8, 2024

This may have happened after we activated another webhook for local testing via stripe, I'm not sure. The warning suggests that the webhook secret of <ENDPOINT 2> doesn't exist, but as far as I know there is no way to set multiple secrets. Also, it doesn't make sense that adding another endpoint to stripe breaks the entire system.

from dj-stripe.

arnav13081994 avatar arnav13081994 commented on June 8, 2024

Did you delete your local database ever after creating your webhooks from the djstripe-admin?

Stripe only sends the webhook secrets when they are created so this would work as expected if you used the admin to create the webhook secret and you never deleted the local webhooks as the api does not send the secret.

from dj-stripe.

arnav13081994 avatar arnav13081994 commented on June 8, 2024

@BoPeng Thank you for your observations. I will look at this and raise a PR fixing this.

from dj-stripe.

arnav13081994 avatar arnav13081994 commented on June 8, 2024

Unfortunately tried a lot but still couldn't reproduce. I'm afraid but it seems something unique to your setup. I wish I had a better answer

from dj-stripe.

lindemann-co avatar lindemann-co commented on June 8, 2024

This is happening to me right now. What's the form to use in Django Admin to delete and re-create DJSTRIPE_WEBHOOK_SECRET?

from dj-stripe.

arnav13081994 avatar arnav13081994 commented on June 8, 2024

You can delete it from the admin page from the WebhookEndpoint model. Or you can do the same by logging into the Django shell.

from dj-stripe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.