
kindly assist if you're chanced

Can you check the appwrite console and see if those executions show same response?

okay then

response on client app is same with appwrite console response
@rohit90314

below is the response:
{"Status":"M S- yam"}
despite having separate resquest, response is same...

Please don't tag people just because you need help. Please be patient and wait for a response

Please share your code

ok

serverside or clientside?

user side:
dynamic execution = appWriteLogicExtender.functions.createExecution(
functionId: 'automate_service_sender_', data: json.encode(data));
// showloader = true
showLoaderUpdater(true);
if (kDebugMode) {
print("What is sent to server: ${data.toString()}");
}
execution.then((response) {
// show loader = false
showLoaderUpdater(false);
final decoded = json.decode(response.response);
print("What is gotten from server: ${decoded.toString()}");
});

server side:
Future<void> start(final req, final res) async {
final client = Client();
// // ////////////////////////////////
client
.setEndpoint("xxx")
.setProject("xxx")
.setKey("xxx")
.setSelfSigned(status: true);
dataFromClient = await jsonDecode(req.payload);
res.json({
'Status': getResp.toString(),
});
}```
there are other part of the code and it returns a string statement using the variable **getResp**
expecting separate response but getting same as though it is cached

yes, returned getResp

Something might be wrong with your logic then

I crossed checked before asking for help

but does appwrite cache request?

No

Add a print(req.payload)
to confirm the data is coming in correctly. Add a print(getResp.toString())
before res.json() to confirm the data is going out correctly

if (serciceTypeAndServiceName == "MTN SME") {
if (isMTNSMEAvailable.toString() == "Automated") {
x = "M S- yam";
}}
else if (serciceTypeAndServiceName == "MTN CG") {
if (isMTNCGAvailable == "Automated") {
x = "M C- yam";
}
}```
content of code, I decided to say:
```dart
x = "M S- yam";
and
x = "M C- yam";
in place of main code function to see where error was and discovered there was same response for diffrent request

Sorry I don't understand

if request has
"MTN SME"
The response should be:
x = "M S- yam";
and otherwise
but after gettin
"M S- yam";
for the below:
"MTN SME"
I still get:
"M S- yam"
for the above reqeust:
"MTN CG"

Sorry you're going to have to debug your code yourself

sighs

it's unfortunate, but the problem seems to be in your code's logic. I can try to take a look. Please show the code for your full function.

wow, I appreciate you @safwan

I discovered the dart file holding all variables on cloud function code was the one caching it. So I had to dispose them and did a check before every request, I appreciate you @Steven @safwan
I was thinking that cloud function doesn't remember any data after execution, that's why my focus was on both ends
Recommended threads
- ❗[Help] Function stuck in "waiting" stat...
Hi Appwrite team 👋 I'm trying to contribute to Appwrite and followed the official setup instructions from the CONTRIBUTING.md guide to run the platform locall...
- deno 2 Cloud random errors
we have big problems with the functions. although we do not change anything in the function, we have the following random behaviour: - no scope permissions erro...
- Appwrite functions can't connect to data...
I'm trying to create a function that queries my database, but all database operations timeout from within the function, even though CLI access works perfectly. ...
