Relevance Showing error in console but works on endpoint

q:if (exists file whose (name of it starts with “Install-CriblEdge-transcript”) of folder "C:\windows\temp") then concatenation “%0A” of lines of files whose (name of it starts with “Install-CriblEdge-transcript” AND modification time of it = maximum of modification time of files whose (name of it starts with “Install-CriblEdge-transcript”) of folder "C:\windows\temp") of folder "C:\windows\temp" else “Output file not found”
A: Output file not found
T: 20.969 ms

This worked in the Debugger and locally on the server using QnA tool. But in an analysis it shows as error

On the Debugger, you choose Evaluate with Client?

Does it return error on all the endpoints or specific machines?

It only errors in the console when used in an analysis. Both the Debugger and the local client are able to return the results.

I don’t think you need the duplicate"of folder “C:\windows\temp”" before the else

What is the error if you hover over the error, or by opening the Computer and referring to the main status page for the computer?

It looks like you are trying to retrieve an entire log file into a property result, and you may well be exceeding the string length limits of a result (this is stored in a single row in the database)

the error is just “…” with nothing else

I just saw that, Nice catch!

is there a way to see what that limit is? I have seen BigFix return much longer results so I am not sure it is the line limit

I believe the limit is something like 2048 characters.

Yes, Analyses can return “more” results, just not “larger” ones.

Analyses like “Application Information - Windows” return plural results - each application is a separate result value. In your case, by concatenating the lines, you are returning the entire file content in one long string.

I checked and it is only 1263 characters in the file so that is not it either.

Ok, then, still need you to open the Computer Properties for one of the affected machines and show what the error message is.

I was being literal before, the error is “…” Just the three dots.

If you open the Computer, and check the Summary tab, does it not display a real error message there either? For example like this?

NO it just has 3 dots.

Try taking the “concatenation” out and let each line be one of the plural results.

I think the “…” is that the result may not be an error, but is too large to display in the Console (and might still be usable in REST). Splitting the results may help determine if that’s the case.

I’ve encountered this when retrieving long strings but it was many versions ago, so I did some testing and it looks like the limit may be 1024 characters, which is the issues I ran into though a different use case.

I created a simple text file with 23 lines of the string “The quick brown fox jumps over the lazy dog”. Property 1 with the relevance concatenation ". " of (lines of files "C:\TEMP\longtext1.txt") results in the 3 dots where as property 2 with the relevance first 1023 of concatenation ". " of (lines of files "C:\TEMP\longtext1.txt") reports the first 1023 characters. With concatenation removed, it also reports as expected though tis then a plural result. (it & ". ") of (lines of files "C:\TEMP\longtext1.txt").

I also tried with a direct string of over 1024 characters and it also reports as 3 dots, which is also how its recorded in the QUESTIONRESULTS table.

1 Like