Webhooks Problems

Hi !
I have with webhooks in my repository Spinoza. I’ve setup a webhook for a website using this repository but cannot get it to work the url is (https://thespinozist.com/) and this site won’t update when content is changed or added, very frustrating. I’ve followed the same procedures I used for other sites in other repositories so I’m not sure what’s going on here ! I also tested the webhook with https://requestbin.com/ and it works, it’s only when I change the website URL to it’s proper address when it stops working.
Best wishes

What’s the website deployed on?

Hi !

I’m using a Vultr cloud server with a Nginx stack provisioned by Moss

Paul

I assume Vultr has webhook deploys? I’m not sure how you’re setting it up otherwise.

Thank you for your help !
Vultr has it’s own api but I don’t have this problem with other sites which use Prismic and are deployed on Vultr.

Hi !

I got the webhook to work now, in so far that I’m getting a 200 response but the site’s content is still not updating, is there any reason for this?
Thanks

CanI please have a response to this as the problem of updating website content is still there and this is quite urgent as my clients need to be able to see the content on. their websites when they add or edit content :slight_smile: !

@Phil, can you help?

Hey,

I’m not really sure what the issue is here. I’ve checked our logs but I got no errors back for your repository. I’m passing this to the dev team hopefully @marc.mcintosh can help.

As soon as we know more we’ll update you here.

Thanks.

Also @paul it would be really helpful if you can provide us any extra information you have like error logs from Vultr or anything else. Have you checked with the Vultr team to see if they have any logs on their side?

Hi Phil, I checked but they confirmed that there are no issues with the server. Also, I created a blog in another account on Prismic also using nuxt.js and this project is hosted on the same server but I don’t have any problems with it when content is updated.

Hi is there any information in the webhooks logs?
If that says everything is okay, maybe look at the hosting configuration and try to fin out where the webhook ends up.

The webhook as previously stated returns a response 200, maybe you should also look at my previous message, that there is no problem with another website on the same server also using prismic and nuxt.
Not very helpful and it really makes me think if Prismic is the right solution for my client website. -;(

If you’re getting a 200 response then that would suggest that the webhook is firing correctly and the issue is on the build side and not on the Prismic side.

Hi Paul,
so i went to your site, ran this

fetch("https://thespinozist.com/", { method: "post", body: JSON.stringify({ key: "value" }) }).then(console.log).catch(console.error)

and got a 200, (success).

What I am recommending, is that you take look at the source code and check where the webhook goes through in-order to trigger a rebuild.

If you’re will too, you can provide us with a minimal recreation of the problem and we’ll look at that.

Hi Marc,
Thanks for trying to resolve this, I did check the code, which is essentially the same as this site https://amandagrahampsychology.com on the same server and also using Prismic through a different account and there are no problems there,
Essentially, if I edit content are add content, one site will update the other doesn’t and I have ave to recompile the site and upload to the server for the changes to take effect !
I just changed some of the text on the The Spinozist website in the “Mercy” article in the intro I changed in its literal sense to in is true sense, got the response 200 as usual but no update.
Thanks

Could you try to check the configuration of the webhook to make sure it goes to the correct place and endpoint?

It’s weird that the server responds with a 200 but does nothing, that would be worth debugging :slight_smile:

Is there a cache being used in this setup? (maybe nginx?)

Hi Marc,

I’ve put all the files on a repository on Github https://github.com/paulmendrik/spinoza
included is also a server apache log file which you will find in the apache directory.
What I did not notice is that the blog I did for https://amandagrahampsychology.com although essentially the same it didn’t include the @nuxtjs/prismic module as it was done awhile ago.The module iappears to create preview and payload files when the site is generated, whereas without it doesn’t. Perhaps that’s why that site is not having the problems thespinozist.com has even though they are both on the same server.

Hi Marc,

Just to let you know, I re-did the site without the @nuxtjs/prismic module and it’s working as it should now, i.e. updating when amended or content is added. From this I can only assume that the @nuxtjs/prismic has some flaws !
If you don’t mind I’ll move on from it now and do some proper work !
Thanks for all your efforts in trying to resolve this,
Best wishes
Paul

1 Like