alerta: Error: update only works with $ operators

Issue Summary

When trying to close an alert, either through the UI or with the alerta cli, I’m getting the error message Error: update only works with $ operators.

{"code":500,"errors":null,"message":"update only works with $ operators","status":"error"}

That started a couple of days ago and wasn’t the case before I went to 7.0 - any idea what could be causing this?

Environment

  • OS: Linux

  • API version: 7.1.0 for the server and 6.8.1 for the CLI

  • Deployment: self-hosted

  • For self-hosted, WSGI environment: nginx/uwsgi

  • Database: MongoDB v4.0.9

  • Server config: Auth enabled? Yes/No Auth provider? Google, GitHub, OpenID, Basic, LDAP, etc Customer views? Yes/No (or provide the /config endpoint output)

  • web UI version: [eg. 6.8.1]

  • CLI version: [eg. 6.8.1]

To Reproduce

Tried 3 different ways:

  1. in the UI opening an alert and then clicking the x-symbol to close that alert. Shows the error message as a red fly-in at the bottom of the page for a second
  2. in the UI in the alert list selecting multiple alerts and clicking the x-symbol as well, gettting the same error message for a little while at the bottom of the page
  3. in the console using alerta close --all responds with the error message from the subject line just once and stoping the alerta client.

For web app issues, include any web browser JavaScript console errors.

Expected behavior A clear and concise description of what you expected to happen.

Web console errors

Unhandled promise rejection Error: "Request failed with status code 500"
    exports https://alerta.lakedrops.com/js/chunk-vendors.6ebc8b01.js:14
    exports https://alerta.lakedrops.com/js/chunk-vendors.6ebc8b01.js:27
    p https://alerta.lakedrops.com/js/chunk-vendors.6ebc8b01.js:37
chunk-vendors.6ebc8b01.js:27:72900
Unhandled promise rejection Error: "Request failed with status code 500"
    exports https://alerta.lakedrops.com/js/chunk-vendors.6ebc8b01.js:14
    exports https://alerta.lakedrops.com/js/chunk-vendors.6ebc8b01.js:27
    p https://alerta.lakedrops.com/js/chunk-vendors.6ebc8b01.js:37
chunk-vendors.6ebc8b01.js:27:72900
Unhandled promise rejection Error: "Request failed with status code 500"
    exports https://alerta.lakedrops.com/js/chunk-vendors.6ebc8b01.js:14
    exports https://alerta.lakedrops.com/js/chunk-vendors.6ebc8b01.js:27
    p https://alerta.lakedrops.com/js/chunk-vendors.6ebc8b01.js:37
chunk-vendors.6ebc8b01.js:27:72900
Unhandled promise rejection Error: "Request failed with status code 500"
    exports https://alerta.lakedrops.com/js/chunk-vendors.6ebc8b01.js:14
    exports https://alerta.lakedrops.com/js/chunk-vendors.6ebc8b01.js:27
    p https://alerta.lakedrops.com/js/chunk-vendors.6ebc8b01.js:37
chunk-vendors.6ebc8b01.js:27:72900

Additional context

I currently have 10 open alerts and none of them can be closed (or used any other action). But I also just had one which I was able to close. It happens with close, ack and shelve, but the watch action does work.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

Thank you so much for your patience and support.