Skip to content

Can anyone help explain why Appwrite can't find the collection?  #347

Closed

Description

@KevinMalm

I'm having trouble uploading a file to an AppWrite database in Flutter. I am sure there is a very small thing that I have missed but any help would be much appreciated. Also I apologies that the code is in quote format, I couldn't get the code format to work.

This is my collection ID that I created in the AppWrite console.

Screen Shot 2020-05-23 at 10 16 53 AM

Here is my setup Code:

Client client = Client();
Database log_database = Database(client);
Account account = Account(client);
client.setProject(APPWRITE_CONSTANTS.project_id);
client.setEndpoint(APPWRITE_CONSTANTS.project_endpoint);

Variables

this.log_cnter_data = {"count": 0};
this._collection_address = '5ec93d7725352';

Here's where the Map<String, dynamic> is attempted to be saved

Future log_result = log_database.createDocument(collectionId: this._collection_address, data: this.log_cnter_data, read: [''], write: ['']);
log_result.then(
(response){
print(response);
}
).catchError((error){
print(error);
});

This is the error I keep on receiving:
Screen Shot 2020-05-23 at 10 26 29 AM
And this is the path that is trying to post to (which looks correct to me, but what do I know)
Screen Shot 2020-05-23 at 10 26 11 AM

Thank you and All the Best,


Appwrite Version: UNKNOWN.125

Activity

  1. christyjacob4 commented on May 23, 2020

    @christyjacob4
    Contributor

    Hey @KevinMalm Looks like you haven't passed any permissions to create a document.
    Could you do this and let me know what happens?

    Future log_result = log_database.createDocument(collectionId: this._collection_address, data: this.log_cnter_data, read: ['*'], write: ['*']);
    log_result.then((response){
         print(response);
    }).catchError((error){
         print(error);
    });
  2. KevinMalm commented on May 23, 2020

    @KevinMalm
    Author

    My apologies, that seems to have been formatted incorrectly when I put it in as quotes, here's what's actually ran

    Future log_result = log_database.createDocument(collectionId: this._collection_address, data: this.log_cnter_data, read: ['*'], write: ['*']);
    log_result.then( (response){ print(response); } ).catchError((error){ print(error); });
    Screen Shot 2020-05-23 at 12 07 07 PM

  3. eldadfux commented on May 23, 2020

    @eldadfux
    Member

    @KevinMalm add '*' permission to your collection read permission.

    image

  4. KevinMalm commented on May 23, 2020

    @KevinMalm
    Author

    That fixed it! Thank you much.

  5. added 3 commits that reference this issue on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions