Hi,
I’m trying to set up a new project but the analysis does not work. It says the last analysis has failed and it suggests posting here the analysis id which is 7379d51e-bf80-4ad2-ba2a-f7f2c95b8b9d.
Thanks,
Attila
Hi,
I’m trying to set up a new project but the analysis does not work. It says the last analysis has failed and it suggests posting here the analysis id which is 7379d51e-bf80-4ad2-ba2a-f7f2c95b8b9d.
Thanks,
Attila
Hi Attila,
Welcome to the community and thanks for this report!
This looks like a configuration problem. Can you share your .sonarcloud.properties file?
Thx,
Ann
Hi Ann,
We don’t have a .sonarcloud.properties file. Is it mandatory for automatic analysis?
Thanks,
Attila
Hi Attila,
Sorry for the delay in responding.
No, a .sonarcloud.properties file isn’t required. But the underlying error here is ERROR: Invalid value of sonar.sources. Since .NET analysis sets its own sonar.sources value, I thought maybe it was picking up an additional definition from you.
Since something is clearly broken here, and neither of us can fix this, I’m going to flag it for the experts.
Ann
Hi Ann,
Thanks for your reply.
Will the experts pick this up following your flag or do I need to contact them somehow?
In the meantime I noticed that the analysis error id is now a6e06ff8-b744-4acb-a0ac-ebae1d20994d. I have not changed anything in our configuration so maybe this is just an updated id pointing to the same error(?).
Thanks,
Attila
Hi Attila,
They’ll be along, but they’ve been under water for quite some time now, so I can’t make any promises on timelines.
Ann
Hi @attila-dwellant,
Sorry for the delay, thanks for being patient.
I’ve had a look at this. The root cause is that set-codwellers-libraries.ps1 is not being picked up properly.
I believe this is sym-link related. In short .NET and java handle sym-links differently and i think it may be a looping or dangling symlink.
Unfortunately this is currently an unsupported scenario.
Are you able to confirm:
you should be able to check with:
find . -type l
or in powershell
Get-ChildItem -Recurse -Force | Where-Object LinkType | Format-Table FullName, Target
If this is the case, to work around this with autoscan I think you would need to:
If there are other symlinks in the repo that are unresolvable they will also fail the analysis.
Hi Alex,
It’s not intended to be a sym-link just a PowerShell script that invokes another PowerShell script but it’s true that the target is outside the repo. It looks like this:
..\other-dir\other-file.ps1 $args
Could this be the problem?
I could remove the file to see if that makes a difference.
Thanks,
Attila
Weirdly enough, on windows that is exactly what a sym-link looks like.
Deleting the file would probably solve the analysis problem.
But ideally, you should be able to keep it.
Could you try run:
git ls-tree HEAD set-codwellers-libraries.ps1
if the first number is 120000 then git sees it as a sym-link, even if windows and github display it as a file.
You could also try (if it is a sym-link) opening the file, saving it.
Then:
git rm set-codwellers-libraries.ps1
git add set-codwellers-libraries.ps1
git commit -m "Convert set-codwellers-libraries.ps1 from symlink to regular file"
To try and force git to see it as a file (100644 instead of 120000).
Git did indeed think that was a sym link showing object mode 120000.
I removed the file for now as I couldn’t change it. We will try to find a solution for it.
I can see that without that file the automatic analysis ran and successfully completed.
Thank you both for helping with this.
Attila
Just for the future.
Is coming to the forum the best way to deal with these errors?
Are there any logs where I could have seen that file causing the problem during the analysis?
Thanks,
Attila
Hi Attila,
We’re trying to get better about helpful error messages for automatic analysis errors, but if the error message is opaque, this is still your best route.
Ann