question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to Scan Organization Folder. /computation says it succeeds but logs show NPE

See original GitHub issue

Your checklist for this issue

  • Jenkins version

  • Plugin version

  • Bitbucket cloud

  • Bitbucket server and version

Description

Jenkins: 2.264 bitbucket-branch-source-plugin: 2.9.4 branch-api: 2.6.0 Bitbucket Cloud: yes Bitbucket Server: no

I am trying to configure a completely new Jenkins build against Bitbucket cloud. Yesterday we did manage to get the scanning working (although the automatic webhook configuration did not appear to work). Today, after upgrading Jenkins and all the plugins that it identified as needing updating, branch scanning no longer works.

Looking at the logs it seems this line is ultimately causing a Null Pointer:

at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMNavigator.visitSources(BitbucketSCMNavigator.java:501)

The full log from this error:

 1 branches were processed (query completed)
ERROR: Failed to create or update a subproject my-project
java.lang.NullPointerException
	at jenkins.branch.OrganizationChildOrphanedItemsProperty.decorate(OrganizationChildOrphanedItemsProperty.java:108)
	at jenkins.branch.OrganizationFolderProperty.applyDecoration(OrganizationFolderProperty.java:54)
	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.completeNew(OrganizationFolder.java:1573)
	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.complete(OrganizationFolder.java:1504)
	at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:254)
	at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:204)
	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMNavigator.visitSources(BitbucketSCMNavigator.java:501)
	at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:542)
	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:278)
	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
	at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:1033)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
aferreeiracommented, Dec 2, 2020

I can confirm that version 2.269 has solved this problem

0reactions
lurume84commented, Jul 21, 2021

Issue was solved for me after I installed branch-api 2.6.6 update. I had 2.5.0 and OP had 2.6.0 so the issue may be solved at branch-api >2.6.0.

Jenkins: 2.289.2 bitbucket-branch-source-plugin: 2.9.9 branch-api: 2.6.6 Bitbucket Cloud: yes Bitbucket Server: no

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jenkins Organization Folder scan doesn't detect repositories
To answer my own question. The github app MUST be installed on the organization. The best (and maybe only) way to do it...
Read more >
"Periodically if not otherwise run" interval does not trigger ...
I've set "Periodically if not otherwise run" interval to 2 minutes, but repository is not being scanned for changes. Scanning can only be...
Read more >
Mend Server Release Notes Archive - Mend Documentation
In the Unified Agent, when scanning a project with no libraries, an NPE exception would occur when trying to generate a scan report....
Read more >
Download Patch File - OpenDev
If the directory is relative to the # documentation root, ... for job in xml_jobs if self.changed(job)] + logging.debug("Filtered for changed jobs in...
Read more >
Guide to Industrial Control Systems (ICS) Security
NIST is responsible for developing information security standards and guidelines, including minimum requirements for federal information systems, but such ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found