Challenges with Code Retrieval in SonarQube 8.9.1:

I’m using SonarQube version 8.9.1, and I’ve noticed an issue where several of my backend projects only display a few lines of code, around 98 or so. Oddly, this problem doesn’t affect all backend projects—some are running smoothly.

The main challenge I’m grappling with is the inability to fetch the correct code. In the first snapshot, SonarQube indicates that there are no lines of code, while in the second snapshot, the file is shown to have more than 50 lines of code. Third snapshot, my other project properly fetch code.

I’ve observed a pattern: all projects experiencing issues fetching the proper lines of code are written in JavaScript or other languages, whereas projects where the lines of code are fetched correctly are written in TypeScript.

I’ve tried various approaches to resolve the error whenever it occurs during the build and run processes using Jenkins on an Ubuntu server. Despite my efforts, I haven’t found a satisfactory solution yet.

Let me know any other details required.

Hi,

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.9.1 → 9.9.2 → 10.2.1 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

If your issue persists after upgrade, please come back to us.