Bitbucket Server/Data Center logs WARN messages "Error looking up submodules" for repos with no submodules

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Bitbucket is logging below warn messages when trying to browse or access a repository, while there does not seem to be any submodule in the repository.

2022-07-16 02:49:20,281 WARN  [http-nio-7990-exec-8] kmahesh @Y4HP5Qx169x2758x0 6lss6n 192.168.15.2 "GET /projects/MYP/repos/repo1/browse HTTP/1.1" c.a.s.i.s.g.s.DefaultGitSubmoduleHelper Error looking up submodules for 'refs/heads/master' in 'MYP/repo1[1]'
2022-07-16 02:49:31,737 WARN  [http-nio-7990-exec-8] kmahesh @Y4HP5Qx169x2768x0 6lss6n 192.168.15.2 "GET /rest/contributing-guidelines/latest/projects/MYP/repos/repo1 HTTP/1.1" c.a.s.i.s.g.s.DefaultGitSubmoduleHelper Error looking up submodules for 'refs/heads/master' in 'MYP/repo1[1]'
2022-07-16 02:49:58,275 WARN  [http-nio-7990-exec-3] kmahesh @Y4HP5Qx169x2771x0 6lss6n 192.168.15.2 "GET /projects/MYP/repos/repo1/browse HTTP/1.1" c.a.s.i.s.g.s.DefaultGitSubmoduleHelper Error looking up submodules for 'refs/heads/master' in 'MYP/repo1[1]'

Browsing the repository does not show any submodule directory.


Environment

All

Diagnosis

Check all the commits in the repository/branch to find the one that says "Subproject commit <<commithash>>" as shown below. This confirms that a submodule was comitted by a user.

Cause

The reason Bitbucket shows the Warning messages is because it is unable to show the submodule directory due missing .gitmodules file. This can happen if the user who created the submodule in the repository did not push the .gitmodules file but only pushed the submodules directory to the Bitbucket Server after it was initialised on their local instance.

Solution

  • Ask the user who created the submodule to stage/commit and push the .gitmodules file from their local instance. This will fix the issue on the Bitbucket Server and the submodules directory will be visible on the Bitbucket Server Repository.


  • If you do not want the submodule, clone and delete the submodule directory from the repository to stop the warning messages.


Last modified on Aug 20, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.