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
- Migration from cloud to self-hosted fail...
Hi! I'm trying to migrate a small project from the cloud to a self hosted instance to play around but without any success! The migration process fails with the ...
- Feedback and Deployment Challenges with ...
Hello world!, I've been developing a project using FastAPI in Python, and I was considering deploying it through Appwrite Functions. However, I encountered a f...
- Transaction Error
AppwriteException: Transaction with the requested ID could not be found. at Generator.next (<anonymous>) { code: 404, type: 'transaction_not_found', r...