At startup IntelliJ: 'Kotlin indexes are corrupted' - Repair IDE

Hello,
I see I’m not the first one with this issue, but I couldn’t find the solution till now.
I have IntelliJ IDEA 2024.1.2 (Ultimate Edition)

Every morning when I start up IntelliJ, the main function has a little red ‘x’ in the ‘Open ‘Edit Run/Debug configurations’ dialog’ in front of main. (see screenshot
Also the function main itself does not have the ‘green triangle’ next to the line numbering.
So I have to rebuild the Kotlin indexes again by running Repair IDE + Invalidate caches.

After rebuild of the indexes the little red ‘x’ in the ‘Open ‘Edit Run/Debug configurations’ dialog’ is dissapeared and the ‘green triangle’ in front of function main is back.

So I can run the main function again. But this is very annoying, frustrating.

  • It’s a Gradle project with a PostgreSQL database.
  • Settings Kotlin compiler:
    Kotlin compiler version: 1.8.0;
    Language version: 1.8;
    API version: 1.8;
    Target JVM version:17;
    [selected] Copy library runtime files - destination directory: lib (default I suppose);
    Module kind: Plain

I have disabled a lot of plugins which I think most of them have been installed by default.
I have installed only a few plugins like: GitToolbox, the suggested plugins for bat, env, sql files.

So I don’t know anymore what I can do about it. I hope that somenone bring some help.

I hope that I have found it…

A few months ago I started on a new project.
At the start I didn’t have access to Gitlab, so I received een project zip file from my colleague with .idea, .gitlab directories etc.

A few weeks ago I removed the directories and now I don’t have the error message anymore.