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

Request to /api/v1/chat.syncMessages fails with The \"lastUpdate\" query parameter must be a valid date. #6057

Open
svenseeberg opened this issue Dec 14, 2024 · 2 comments

Comments

@svenseeberg
Copy link

svenseeberg commented Dec 14, 2024

Description:

The app sends requests to /api/v1/chat.syncMessages?roomId=ROOMID&lastUpdate=undefined. The back end returns an error:

"level":35,"time":"2024-12-13T19:57:58.602Z","pid":1040862,"hostname":"rocketchat","name":"API","method":"GET","url":"/api/v1/chat.syncMessages?roomId=ROOMID&lastUpdate=undefined","userId":"USERID","userAgent":"RC Mobile; android 9; v4.55.0 (70132)","host":"rc.example.com","remoteIP":"USERIP","err":{"type":"errorClass","message":"The \"lastUpdate\" query parameter must be a valid date. [error-roomId-param-invalid]","stack":"Error: The \"lastUpdate\" query parameter must be a valid date. [error-roomId-param-invalid]\n    at app/api/server/v1/chat.ts:91:11\n    at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40\n => awaited here:\n    at Function.Promise.await (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)\n    at packages/meteor.js:367:22\n    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1389:31)\n    at app/api/server/api.ts:649:39\n    at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40","isClientSafe":true,"error":"error-roomId-param-invalid","reason":"The \"lastUpdate\" query parameter must be a valid date.","errorType":"Meteor.Error"},"status":400,"responseTime":2,"msg":"The \"lastUpdate\" query parameter must be a valid date. [error-roomId-param-invalid]"}

Environment Information:

  • Rocket.Chat Server Version: 6.13.1
  • Rocket.Chat App Version: v4.55.0 and others
  • Device Name:
  • OS Version: Android/iOS all versions

Steps to reproduce:

I cannot provide exact steps to reproduce.

Expected behavior:

The app should always send a date in lastUpdate. Alternatively, the server should accept undefined lastUpdate.

Actual behavior:

N/A

Additional context:

We have some reports by users that they click on push notifications but the message does not load in channels. We suspect that this could be related.

@diegolmello
Copy link
Member

@OtavioStasiak could it be related to #5992?

@OtavioStasiak
Copy link
Contributor

I am not sure, but it could be related to the recent changes made to load and getLastUpdate. I will test it here and try to reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants