React native app error on iOS

when I try to get a list of messages for a specific channel I get this error {“code”: 500000, “data”: {“detail”: [“The ‘messageFeedId’ field is required.”]}, “message”: “Parameters validation error!”, “status”: “error”} earlier it was working since 2 hours I am facing this issue

when I try to send a message I am getting this error
{“text”: “123”, “type”: “text”} {“error”: [Error: Amity SDK (500000): Parameters validation error!], “loading”: false, “origin”: “server”}

my installed version is as follows

@amityco/react-native-formdata-polyfill”: “^1.1.5”,
@amityco/ts-sdk”: “^0.0.1-beta.36”,

Hello, could we pls have your full curls or your code as well?

const onQueryMessages = useCallback(
		({reset = false, page = {limit: 10}}) => {
			//console.log('onQueryMessages??>>>>>>>>>', reset, page);
			const query = createQuery(queryMessages, {
				page,
				channelId,
				isDeleted: false
			});

			runQuery(query, ({data, ...options}) => {
				// console.log('data>??>>>>>>>>>>', data);
				//if (options.prevPage?.before > options.prevPage?.limit || reset) {
				//console.log('options>????', options.origin, reset);
				if (data) {
					const tempArray = [];
					data.forEach(message => {
						// dispatch(notifyOnNewMessageSend(message));
						tempArray.push(message.metadata?.data);
					});
					setMessages(prevPosts =>
						reset ? tempArray.reverse() : [...prevPosts, ...tempArray.reverse()]
					);
				}
				// }

				setOptions(options);
			});
		},
		[channelId]
	);

My createClient(apiKey, API_REGIONS.EU) response I am using EU server
{“apiKey”: “APIKEY”, “emitter”: {“all”: Map {}, “emit”: [Function emit], “off”: [Function off], “on”: [Function on]}, “getFeedSettings”: [Function _callee7], “http”: [Function wrap], “log”: [Function print], “mqtt”: {“connect”: [Function connect], “connected”: false, “disconnect”: [Function disconnect], “off”: [Function off], “on”: [Function on], “once”: [Function once], “removeAllListeners”: [Function removeAllListeners], “subscribe”: [Function subscribe], “unsubscribe”: [Function unsubscribe]}, “use”: [Function use], “version”: “dev”, “ws”: {“_callbacks”: {“$connect”: [Array], “$connecting”: [Array], “$disconnect”: [Array]}, “acks”: {}, “connected”: false, “disconnected”: true, “flags”: {}, “ids”: 0, “io”: {“_randomizationFactor”: 0.5, “_reconnection”: true, “_reconnectionAttempts”: Infinity, “_reconnectionDelay”: 2000, “_reconnectionDelayMax”: 5000, “_timeout”: 20000, “autoConnect”: false, “backoff”: [Backoff], “connecting”: [Array], “decoder”: [Decoder], “encoder”: [Encoder], “encoding”: false, “lastPing”: null, “nsps”: [Object], “opts”: [Object], “packetBuffer”: [Array], “readyState”: “closed”, “subs”: [Array], “uri”: “https://api.eu.amity.co”}, “json”: [Circular], “nsp”: “/”, “receiveBuffer”: , “sendBuffer”: }}

connectClient is working and also geeting connected status to true so no issue with auth connection

Hello @harshit, in TS SDK version 0.1.0-beta.36 we have introduced breaking changes to the message query functions. For more detailed information, please refer to our documentation at TypeScript - Amity Docs

To ensure the best experience, we suggest either reverting to version 0.1.0-beta.35 or following the guidelines for the changes that have been made.

Have a nice day :slight_smile:

1 Like

can you share steps for downgrading to 0.1.0-beta.35 this version as even after changing version package.json it is installing 0.1.0-beta.36 version

Yes, you may need to modify the file “package.json” to strictly use the specific version

dependencies {
...,
"@amityco/ts-sdk": "0.0.1-beta-35",
...
}

Alternatively, you can install the SDK via this npm command

npm install @amity/ts-sdk@0.1.0-beta-35 --save-exact


we are getting this options 35 version not installing

Hello my mistake, may you try this please?
npm install @amityco/ts-sdk@0.1.0-beta-35 --save-exact
instead of
npm install @amity/ts-sdk@0.1.0-beta-35 --save-exact