
I got an error when I am trying to create documents. This is my full code
Future<void> createVocabulary(Vocabulary vocabulary) async {
final databases = Databases(ref.read(appwriteClientProvider));
try {
await databases.createDocument(
databaseId: kDatabaseId,
collectionId: kVocabularyCollectionId,
documentId: ID.unique(),
data: vocabulary.toDocument());
} on AppwriteException catch (e) {
_logger.severe(e.message);
state = AsyncError(e.message ?? 'Failed to create ${vocabulary.word}',
StackTrace.current);
}
}
And see the picture attach on how I initialize the appwrite client:
And this is the error I got:
Invalid Origin. Register your new client (minna_transcriber) as a new Windows platform on your project console dashboard

did you add flutter
platform in your project in appwrite console? @Mosh Ontong

yes I already add

Actually everything is okay, I can fetch data from appwrite, but when I am creating documents in client side or in my flutter project. It got me faield

how can I fix this sir @Arth ?

I'm not very familiar with flutter sorry, that was something that I thought could be raising that issue

is there an active session when creating documents? I think user needs to be authenticated to write, but the error message doesn't look like if that's the issue

actually there is no active session, what I did that this particular collection's permission I set to any role and have all the privileges. I am now trying to create a login page. I will inform you later if the error still exist.

even in authentication

@Arth

anyways I already fixed it I just rename the package name in windows into minna_transcriber
Recommended threads
- Is there migration script generation lik...
Having standards migration script is helpful. For example something like same script to apply for multiple DB - each DB for one tenant
- Querying and filtering on relationship a...
Hello! A few short months ago, we decided to migrate from SupaBase over to Appwrite, because we were experiencing a lot of headache with the former when it fina...
- Appwrite Upgrade 1.6.1 → 1.7.4
Just upgraded my Appwrite instance from 1.6.1 → 1.7.4 and ran into some issues during the migration process. What I did: - Upgraded Appwrite to 1.7.4 - Imported...
