Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset Camera Configuration Page is throwing unwanted request and error #8633

Closed
2 tasks
nihal467 opened this issue Sep 26, 2024 · 3 comments · Fixed by #8253
Closed
2 tasks

Asset Camera Configuration Page is throwing unwanted request and error #8633

nihal467 opened this issue Sep 26, 2024 · 3 comments · Fixed by #8253
Assignees
Labels
bug Something isn't working

Comments

@nihal467
Copy link
Member

nihal467 commented Sep 26, 2024

Describe the bug

When you open the camera asset configuration page, and stay on that page for 5 seconds, you keep on receiving an "Object Object" error in the frontend

  • /api/v1/asset/d5e008e8-2ce6-4c0a-9262-68d910601d42/operate_assets/ request is send on a loop with response 400

To Reproduce
Steps to reproduce the behavior:

  1. Go to asset tab
  2. Open any camera asset
  3. open the configuration page, make sure that they don't have any configuration
  4. See error

Expected behavior

  • unwanted requests shouldn't fire from the frontend
  • all related relevant errors thrown should be users readable

Screenshots

image

@nihal467 nihal467 added bug Something isn't working P1 breaking issue or vital feature labels Sep 26, 2024
Copy link

⚠️ Refrain from assigning this issue to yourself if you have another P1 issue assigned that is not yet closed.

@Jacobjeevan
Copy link
Contributor

Jacobjeevan commented Sep 27, 2024

For preventing the requests, we can add a hostname check for this scenario (cameraAsset.hostname corresponds to the ip address field).

image

For (2), the error notification is coming from fireRequest (getStreamToken, calling operateAsset):

image

But for this api call, backend is sending a detail object as data.

image

On a side note, I was testing with a random IP address (expecting a 500 response), however that doesn't trigger further API calls as error.response is not being returned in fireRequest. Should we not change that?

image

Resp is undefined so it won't called onError function.

image

@nihal467

@nihal467 nihal467 removed the P1 breaking issue or vital feature label Sep 27, 2024
@rithviknishad
Copy link
Member

@Jacobjeevan fixed in #8253 as that switches to using the newer feed component in the configure page which handles errors more appropriately.

@rithviknishad rithviknishad self-assigned this Sep 30, 2024
@github-project-automation github-project-automation bot moved this to Triage in Care Sep 30, 2024
@rithviknishad rithviknishad moved this from Triage to Review required in Care Sep 30, 2024
@rithviknishad rithviknishad moved this from Review required to Done in Care Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants