#after problems with processing an attribute creating index fails

77 messages · Page 1 of 1 (latest)

serene halo
#

Creating an index with index type key fails. The error toast is unreadable. Index is not created.

serene halo
tardy sparrow
# serene halo

ah this is a bug with the Console. Would you please create a GitHub issue so we don't lose track of this?

tardy sparrow
serene halo
#

you wom‘t forget my index problem ?

tardy sparrow
#

Or close the modal

serene halo
#

Without an index, I can not query my collection, correct?

haughty axle
#

However, you will not be able to Query.contains Query.search on a string (cause you need a fulltext index)

serene halo
#

i use query.equal...

haughty axle
# serene halo

Also in case you haven't read it, I think it says "Attribute not available: org_id"

haughty axle
serene halo
haughty axle
#

If your attribute is processing, that means that the attribute is not ready. Hence the error before then.

serene halo
haughty axle
#

What attribute is processing?

tardy sparrow
haughty axle
#

Ah, my mistake

tardy sparrow
serene halo
#

org_id processing

tardy sparrow
serene halo
#

no. nothing.

tardy sparrow
#

weird...the same old cached entry is back...

#

ok i deleted it...can you try again?

serene halo
#

now all is OK. And index created😄🙏

serene halo
#

But, when I write a document with SDK databases.createDocument(...)
the following error occurs and my program crashes: (see image)
I can not see what the reason is 🥺

serene halo
tardy sparrow
#

Or the console log?

serene halo
#

Unfortunately, i can not see any response payload. Console.log disappears, because the program is logging out .
Code:
const promise = databases.createDocument(datebaseID, DBCollectionArray.get('vbx_schedules'), ${this.uuid}, {
day_of_week: day,
time_range: [startTime1, endTime1],
time_range_2: [startTime2, endTime2],
org_id: pOrg_id

});

serene halo
#

Note: Creating documents manually works without any problems. Reading documents via the SDK also works.

serene halo
tardy sparrow
serene halo
#

Hm, but what does the error message (see image) mean? This is no problem of my code. Every old collection i create a document works, with new tables i create in cloud console it not works.

tardy sparrow
serene halo
#

now i got the console.log error. All attributes in collection are string fields:
Error saving schedule: TypeError: Failed to fetch
at Client.eval (webpack-internal:///./node_modules/appwrite/dist/esm/sdk.js:643:36)
at Generator.next (<anonymous>)
at eval (webpack-internal:///./node_modules/appwrite/dist/esm/sdk.js:47:71)
at new Promise (<anonymous>)
at __awaiter (webpack-internal:///./node_modules/appwrite/dist/esm/sdk.js:43:12)
at Client.call (webpack-internal:///./node_modules/appwrite/dist/esm/sdk.js:640:16)
at Databases.eval (webpack-internal:///./node_modules/appwrite/dist/esm/sdk.js:2400:38)
at Generator.next (<anonymous>)
at eval (webpack-internal:///./node_modules/appwrite/dist/esm/sdk.js:47:71)
at new Promise (<anonymous>)

serene halo
#

I have to repeat this. I tested intensively. In every old collection (migration from my self hosted instance) I create a document with SDK, it works fine. With every new collection I create in the cloud console, it does not work! Can you pls verify this on your site? THX

tardy sparrow
serene halo
#

No, in the appwrite cloud console it works. With SDK web it doesn‘t work.

project id: 645113a5025c36c13f0c

collection: 6717a8ca0006501a0c1c

tardy sparrow
serene halo
#

i gave any for all operations.

tardy sparrow
tardy sparrow
serene halo
serene halo
tardy sparrow
#

what are you doing that's faililng? And can I try to test against your project to reproduce?

serene halo
tardy sparrow
#

i was able to create a document using CURL

#

and since you can create a document using the Console too, that means something is wrong with your code

serene halo
#

Hm, OK, I use "appwrite": "^16.0.2", WEB SDK in my vue.js app.
Here is my code:


           this.uuid = uuid.v4(); // uuid function

           const promise = databases.createDocument(datebaseID,      DBCollectionArray.get('vbx_scheduler_test'), `${this.uuid}`, { //6717a8ca0006501a0c1c
               id: `${this.uuid}`,
               day: "test"
           });

           promise.then((response) => {
               console.log(response); // Success

           }, (error) => {
               console.log(error); // Failure
           });

       },```

And the error you see in my former posts.
tardy sparrow
tardy sparrow
serene halo
#

TypeError: Failed to fetch
at Client.eval (webpack-internal:///./node_modules/appwrite/dist/esm/sdk.js:643:36)
at Generator.next (<anonymous>)
at eval (webpack-internal:///./node_modules/appwrite/dist/esm/sdk.js:47:71)
at new Promise (<anonymous>)
at __awaiter (webpack-internal:///./node_modules/appwrite/dist/esm/sdk.js:43:12)
at Client.call (webpack-internal:///./node_modules/appwrite/dist/esm/sdk.js:640:16)
at Databases.eval (webpack-internal:///./node_modules/appwrite/dist/esm/sdk.js:2400:38)
at Generator.next (<anonymous>)
at eval (webpack-internal:///./node_modules/appwrite/dist/esm/sdk.js:47:71)
at new Promise (<anonymous>)

#

and the payload:

    "documentId": "3c0bc668-d724-4a03-8a00-0af2319bf48b",
    "data": {
        "id": "3c0bc668-d724-4a03-8a00-0af2319bf48b",
        "day": "test"
    }
}```
tardy sparrow
serene halo
tardy sparrow
serene halo
#

no nothing. Only Message: Failed to load response data. No resource with given identifier found.

tardy sparrow
serene halo
#

no, only like shown above in the image

tardy sparrow
#

or a private window without any extensions

serene halo
#

i will try …

tardy sparrow
#

I also tested from my local web app and it ran fine:

serene halo
#

hm ,that's weird. All other inserts in my collections with the same SDK and code work without problems. Edge, the same problem, Safari the same too.

#

inserting in all other tables works without trouble, see example:

serene halo
serene halo
#

from my node.js backend app it works fine🤨