I found that the Report Issue functionality fails if the app crashed due to an OOM Kill. I debugged a bit and found out the cause is due to a stale state on the client side. This is the failure sequence:
- the app crashes due to OOM. Client side shows "This app has been stopped, you can now close this tab."
- However, even with the UI showing app as stopped, the internal state is stale and the
Report Issue code ended up sending the ProxyID as part of the payload to the server. (code here)
- When the server-side IssueController receives the payload with ProxyID, it fails with
ApiResponse.failForbidden() because the ID lookup fails (see code here)
I tested sending the same payload minus the ProxyID, and Report Issue went through. See screenshot of the Chrome console below; the top shows the failed payload and the bottom shows a successful manual payload without the ProxyID.
Expected Behavior
Ultimately, I want ShinyProxy to be able to handle reporting issues even if the app failed due to OOM. Ideally, it also reports the "OOM" part as the reason, but that's out of the scope of this GitHub issue.
It seems there is a bug somewhere about updating the client side state, that led to the Report Issue client code sending a ProxyID where it shouldn't.
I found that the
Report Issuefunctionality fails if the app crashed due to an OOM Kill. I debugged a bit and found out the cause is due to a stale state on the client side. This is the failure sequence:Report Issuecode ended up sending the ProxyID as part of the payload to the server. (code here)ApiResponse.failForbidden()because the ID lookup fails (see code here)I tested sending the same payload minus the ProxyID, and
Report Issuewent through. See screenshot of the Chrome console below; the top shows the failed payload and the bottom shows a successful manual payload without the ProxyID.Expected Behavior
Ultimately, I want ShinyProxy to be able to handle reporting issues even if the app failed due to OOM. Ideally, it also reports the "OOM" part as the reason, but that's out of the scope of this GitHub issue.
It seems there is a bug somewhere about updating the client side state, that led to the
Report Issueclient code sending a ProxyID where it shouldn't.