Skip to content

Report Issue fails if the app crashed due to OOM Kill (likely client-side bug) #593

@peter1357908

Description

@peter1357908

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:

  1. the app crashes due to OOM. Client side shows "This app has been stopped, you can now close this tab."
  2. 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)
  3. 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.

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions