https://promptfoo.dev/ logo
Redteam Vulnerability report
# ❓|questions
u
Is the redteam report also shared to the self hosted instance in the new react app? When I click the report in the hosted instance it just spits a stack trace, on local it seems fine. Looking at the code I only see a fetch request to /eval does there need to be one for /report too?
i
hmm, can you share the trace? the report should load in self-hosting mode. cc @[Promptfoo] Steve
u
Yes, there shouldn't be a difference between them, I'll dig into it
Are you opening the web app from the URL of the hosted container or running
promptfoo view
?
u
This stack trace is from npm run dev
i
can you pull and make sure you're on the latest version? the stack trace doesn't seem like it lines up anymore
u
This is what I see in the hosted server: TypeError: Cannot read properties of undefined (reading 'forEach') at http:///assets/index-qC_WOY60.js:782:10673 at Object.Y9 [as useMemo] (http:///assets/index-qC_WOY60.js:38:21416) at Mn.useMemo (http:///assets/index-qC_WOY60.js:9:6253) at PKe (http:///assets/index-qC_WOY60.js:782:10615) at yP (http:///assets/index-qC_WOY60.js:38:17031) at C4 (http:///assets/index-qC_WOY60.js:40:3143) at Sz (http:///assets/index-qC_WOY60.js:40:44880) at xz (http:///assets/index-qC_WOY60.js:40:39822) at Hre (http:///assets/index-qC_WOY60.js:40:39748) at y2 (http:///assets/index-qC_WOY60.js:40:39598)
i
let's make sure you're on the latest commit
the weird part is it looks like you are getting a response from the
/results
endpoint, but the response is malformed also interested in what
/api/results/<eval id>
returns
u
I pulled in the latest main changes and I still run into the error
i
👀 thanks, will take a closer look
are you using the promptfoo_lightweight envar by any chance?
this eval is missing the
results
list 🤔
u
No I'm not using that, one thing I did observe however I created a npm server locally and used that same instance as my shared server. Now before clicking the share button, I do see evalData.results.results however after clicking the button there's only evalData.results. Here is the uncorrupted evaldata before clicking share https://cdn.discordapp.com/attachments/1286698907988131953/1286759460890738719/promptfoo_api_eval_uncorrupted?ex=66ef13a2&is=66edc222&hm=fc90226ba4e034c5c4c2d3ef0e5c5cb832a7d788983f324682bbe5165b407b52&
Another thing, when I use the command "promptfoo share" it works. I think the ResultsView.tsx is not sending the right nested payload, which share command seems to be sending https://github.com/promptfoo/promptfoo/blob/main/src/app/src/pages/eval/components/ResultsView.tsx#L146C6-L161C12
i
Ohhh you're totally right
The frontend doesn't have the nested results object
I'll get in a fix
u
Thanks a ton 🙏🏽🙏🏽
i
I believe this is fixed now
2 Views