Back

[SOLVED] io.appwrite.exceptions.AppwriteException: Not found

  • 1
  • Android
asapsonter
4 Apr, 2023, 03:43

I get this error anytime I push to storage bucket. I have succesfully push a file to that Bucket ID few days ago. I modified the code and added ID.Companion.unique() and now I get the error bellow when I try to push to storage. io.appwrite.exceptions.AppwriteException: Not found at io.appwrite.Client$awaitResponse$2$1.onResponse(Client.kt:497) at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)

Here is the function code snippet

TypeScript
public void cloudStorage() {
Client client = new Client(requireActivity());
client.setEndpoint(endpoint);
        client.setProject(project);
        client.setSelfSigned(true);
 File file = new File(String.valueOf(Objects.requireNonNull(requireContext().getExternalFilesDir("building1.xls"))));
Storage storage = new Storage(client);
        storage.createFile(
                bucketID,
                ID.Companion.unique(),
                InputFile.Companion.fromPath(String.valueOf(file)),
                new CoroutineCallback<>((result, error) -> {
                    if (error != null) {
                        error.printStackTrace();
                        return;
                    }
                    assert result != null;
                    Log.d("Appwrite", result.toString());
                })
        );

}
TL;DR
The user is experiencing an `io.appwrite.exceptions.AppwriteException: Not found` error when trying to push a file to a storage bucket. They have checked their endpoint and it seems fine. They have also verified their permissions and made sure they included the `v1` in the endpoint. The user has also tried generating a new endpoint key and reconnecting the repo to the appwrite API, but the error persists. They have deleted the old bucket and created a new one, but still encounter the same error. The user is using https for the endpoint and has access to the bucket. They have also included the necessary code for the
Drake
4 Apr, 2023, 03:48

Are you using https for the endpoint? Besides that maybe you don't have access to the bucket

asapsonter
4 Apr, 2023, 05:43

I think I do, String endpoint = "*************" String project = "******" String bucketID = "*******" etc

asapsonter
4 Apr, 2023, 05:44

and then used it respectfully where they are required

Drake
4 Apr, 2023, 06:11

Did you include v1 in the endpoint?

Drake
4 Apr, 2023, 06:11

What are the permissions on your bucket?

asapsonter
4 Apr, 2023, 06:27

write, read, delete. I deleted the old bucket and created a new one and i still got the same error

asapsonter
4 Apr, 2023, 06:28

yes "*****us92.gitpod.io/v1"

Drake
4 Apr, 2023, 06:50

Can you share a screenshot?

asapsonter
4 Apr, 2023, 06:52

sure

Drake
4 Apr, 2023, 06:58

I meant in the Appwrite console

asapsonter
4 Apr, 2023, 07:10

ok

asapsonter
4 Apr, 2023, 07:11
Drake
4 Apr, 2023, 07:46

Permission is fine...the only other thing I can think of is mismatching project id or bucket id

asapsonter
4 Apr, 2023, 08:44

well, It worked fine few days ago. Maybe I will generate a new endpoint key, or just reconnect repo to appwrite API and see if it works

Drake
4 Apr, 2023, 13:37

Double check your endpoint too. Especially the region part

asapsonter
5 Apr, 2023, 10:39

[SOLVED] io.appwrite.exceptions.AppwriteException: Not found

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more