Closed Chupaka closed 2 years ago
Encountered the exact same error when trying out this plugin on Jenkins 2.249.2. Currently we are using Bitbucket plugin which is able to receive webhooks but lacks functionality so we are looking for an alternative.
@ltensok looks like the problem with "No valid crumb" is gone after upgrading Jenkins to 2.277.4. Can you check that?
Hi! Is the issue still actual? Tnx
It may be a misleading error, as if you set an incorrect webhook endpoint the plugin will set a different one for CrumbExclusion.
I think the main problem is that the documentation has in incorrect example to override the default webhook endpoint. The documentation says you can set "/bitbucket-ppr-webhook/" but checking the code its clear thats it is not correct. The working value is "bitbucket-ppr-webhook".
@ltensok looks like the problem with "No valid crumb" is gone after upgrading Jenkins to 2.277.4. Can you check that?
@Chupaka Haven't yet been able to test this - have to find a suitable time window to update & restart Jenkins.
It may be a misleading error, as if you set an incorrect webhook endpoint the plugin will set a different one for CrumbExclusion.
I think the main problem is that the documentation has in incorrect example to override the default webhook endpoint. The documentation says you can set "/bitbucket-ppr-webhook/" but checking the code its clear thats it is not correct. The working value is "bitbucket-ppr-webhook".
@Szbuli Tried with and without slashes with identical results - no valid crumb (maybe Jenkins restart is required to apply the webhook url change - cannot test this atm).
We are actually using the Jenkins version 2.277.4. and all is working fine. You can check the code for the crumb exclusion here:
@Szbuli tnx for the hint, I fixed the documentation eliminating the slashes. And yes, as you wrote, the correct value is "bitbucket-ppr-webhook", without slashes.
@ltensok yes, jenkins needs to be restarted.
Please let me know if the problem still exists, tnx
I am getting the same error using Jenkins 2.289.3 and Plugin 2.7.2. This is the only Bitbucket PlugIn installed. I have enabled the Log on this plugin but no logs is generated. I also try using an Access Token but i get a 404 Not Found using the http://user:token@jenkinsurl.com/bitbucket-hook/. I tested this configuration for other URLs and it is ok (using incognito mode, i successfully get logged in) I have restarted the Jenkins serveral times just to be sure.
Error 403 No valid crumb was included in the request
HTTP ERROR 403 No valid crumb was included in the request
URI:/bitbucket-hook/
STATUS:403
MESSAGE:No valid crumb was included in the request
I have managed to make it run by disabling CSRF protection. At the end of this page https://www.jenkins.io/doc/book/security/csrf-protection/
To disable CSRF protection, set the system property hudson.security.csrf.GlobalCrumbIssuerConfiguration.DISABLE_CSRF_PROTECTION to true on startup.
Hallo @Chupaka and @pszittyay I couldn't reproduce this behavior. Please reopen the ticket if the issue still exists, Tnx
Hello.
We migrated some projects from GitLab to BitBucket and are trying to use this plugin to trigger jobs from BB.
On Jenkins 2.249.3, I see "HTTP ERROR 403 No valid crumb was included in the request" error when BitBucket server tries to POST to http://jenkins.address.com:8080/bitbucket-hook/ URL.
Here's the request:
And the response:
We don't have this problem for HTTP endpoint of Generic Webhook Trigger Plugin, but it has some "features" so we're looking for something more BitBucket-native...