Appwrite Functions - response from functions does not match database entry
- 0
- Self Hosted
- Functions
- Databases
Environment: Appwrite version: 1.4.2 Language/Framework: Dart (dart_appwrite plugin)
Summary: When using an Appwrite function to fetch data from the backend with the dart_appwrite plugin, the response data does not match the data that is actually stored in the Appwrite database.
Expected Behavior: The data retrieved from the Appwrite backend should exactly match the data as stored in the database, including any special characters.
Actual Behavior: The data in the response differs from the database data. The data is stored in the database as an array containing a Base64 string with special characters, but the string in the response lacks these special characters.
Steps to Reproduce: Store data in the Appwrite database as an Array["Base64 String"] with special characters. Use a Dart Appwrite function to fetch this data. Observe that the returned data lacks the special characters present in the stored data.
Whats in the database: L+alBJOsgB8nwGgtJPAoCYtbitLnHBN84dNSak12Kb+rKqetAFYxohCWF3XZ6HQ+
Whats fetched through the function: L alBJOsgB8nwGgtJPAoCYtbitLnHBN84dNSak12Kb rKqetAFYxohCWF3XZ6HQ
Appwrite Functions - response from functions does not match database entry
Thanks for posting this. I'll need to try and reproduce this 🧐
@Steven any update on this ?
sorry i've been pretty busy. it's on my list, though!
OK so I have a string array in my database like this:
my code is:
import 'package:dart_appwrite/dart_appwrite.dart';
import 'config.dart';
var client = Client();
var databaseId;
var collectionId;
var documentId;
var userId;
var teamId;
var teamMembershipId;
var fileId;
var functionId;
var bucketId;
Future<void> main() async {
client
.setEndpoint(endpoint) // Make sure your endpoint is accessible
.setProject(projectId) // Your project ID
.setKey(key) // Your appwrite key
// .setJWT('jwt') // Enable this to authenticate with JWT created using client SDK
.setSelfSigned(status: true); //Do not use this in production
final databases = Databases(client);
final document = await databases.getDocument(
databaseId: 'default',
collectionId: '641496436257c85f727c',
documentId: '650cd29729118506066a',
);
print(document.toMap());
}
and it prints:
{$id: 650cd29729118506066a, $collectionId: 641496436257c85f727c, $databaseId: default, $createdAt: 2023-09-21T23:32:39.169+00:00, $updatedAt: 2023-09-21T23:32:39.169+00:00, $permissions: [], data: {firstString: , secondString: , base64: [L+alBJOsgB8nwGgtJPAoCYtbitLnHBN84dNSak12Kb+rKqetAFYxohCWF3XZ6HQ+], $id: 650cd29729118506066a, $createdAt: 2023-09-21T23:32:39.169+00:00, $updatedAt: 2023-09-21T23:32:39.169+00:00, $permissions: [], $databaseId: default, $collectionId: 641496436257c85f727c}}
from the looks of it, I do get the +
Recommended threads
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...