#[SOLVED] Old Cloud Functions Not Working After 1.4.2 Migration

97 messages · Page 1 of 1 (latest)

lavish timber
#

All of my old cloud functions are failing after migrating to 1.4.2

#

no error or logs in console .. will paste traceback from docker container logs

#

errors like these i wasnt getting in 1.3.4 ;-;

oak thunder
#

According to this :#🏠│general message it's not the expected behaviour.

cc @worthy veldt

#

Hope you don't mind me tagging you LOL

lavish timber
#

xd

#

for now i will restore backup

pine cobalt
#

probably you are using an older version of sdk?

lavish timber
#

i did update dark sdk to latest one

#

and couldnt see any changes

pine cobalt
#

and the runtime is python?

lavish timber
#

i meant both

#

like doesnt work for any of the runtime

pine cobalt
#

whats on line 40 of your main.py?

lavish timber
#

list_documents function

#

lemme

#

check

#

brb

pine cobalt
#

can you share the impl? and the sdk version used?

lavish timber
#

btw can it be because i directly upgraded from 1.3.4 to 1.4.2

pine cobalt
#

there are major changes so its quite possible. there's a possibility of older sdk used as well. hence i requested for the details.

lavish timber
worthy veldt
#

what values are you passing into list_documents?

#

If env variable, then migration maynedidnt go well because of problematic value in your encrypt key in .env. That results in false as value of env variables

lavish timber
#

openssl key?

oak thunder
#

But wait

#

THere's also a _APP_EXECUTOR_SECRET

lavish timber
#

oh

#

i see your-secret-key for 1.3.4

oak thunder
lavish timber
#

okay so i think i might have to make a new issue ..

I tried running backup after re installing 1.3.4 image and then ./restore.sh in appwrite dir

#

i did replace .env fle with the backed up one

#

but i am getting this for functions

#

i hope its okay to continue in the functions issue

#

from docker logs appwrite

#

so auth and functions are showing internal 500 error

lavish timber
lavish timber
#

ok i think i fixed it somehow with fresh installation
and again restoring 1.3.4

lavish timber
#

now i am thinking of upgrading to 1.3.8 then 1.4.0 migrate then 1.4.2 migrate?

#

anything else i should keep in mind?

#

_APP_OPENSSL_KEY_V1 and _APP_EXECUTOR_SECRET env variables i should check after 1.4.2 migration?

oak thunder
lavish timber
#

another issue i get while going to 1.3.8

#

weird thing is it doesnt show it if i go for 1.4.2

#

maybe smth wrong with my installation cmd ;-;

oak thunder
#

Okay are you on 1.3.4 right now?

#

can you confirm by running docker ps | grep appwrite

lavish timber
lavish timber
#

sorry for so much confusion

oak thunder
#

that’s okay

#

okay are you in production right now?

#

like are there active users of your app?

lavish timber
#

yea 3 production projects

lavish timber
#

thats why i tried reverting back to 1.3.4 just after the function issue in 1.4.2

oak thunder
#

okay here's what I recommend you to do. Perform a backup of your current instance. Make sure to stop traefik while data is being backed up.
Take this backup, and restore it on another appwrite instance v1.3.4

#

Then try to upgrade to 1.3.8, then migrate

#

Then try 1.4.2 and migrate

#

See if you face any issues.

lavish timber
#

will try searching if anyone else faced this when going to 1.3.8

lavish timber
#

Fatal error: Uncaught Utopia\Database\Exception\Query: Invalid query: Invalid cursor: UID must contain at most 36 chars

#

going from 1.3.8 to 1.4.1 migration

lavish timber
lavish timber
#

Fatal error: Uncaught Utopia\Database\Exception\Query: Invalid query: Invalid cursor: UID must contain at most 36 chars. Valid chars are a-z, A-Z, 0-9, and underscore. Can't start with a leading underscore in /usr/src/code/vendor/utopia-php/database/src/Database/Database.php:4061 Stack trace: #0 /usr/src/code/src/Appwrite/Migration/Migration.php(197): Utopia\Database\Database->find(Object(Utopia\Database\Document), Array) #1 /usr/src/code/src/Appwrite/Migration/Migration.php(154): Appwrite\Migration\Migration->documentsIterator('cache') #2 {main}

#

btw is this resolved in 1.4.2

lavish timber
#

just below appwrite: one?

storm sail
lavish timber
#

am i missing the point

#

oh i am dumb

#

i can just open the full file whats wrong with me đź’€

#

appwrite-schedule got it

#

and regarding compose.phtml

#

is it possible to update that?

storm sail
storm sail
#

just your docker-compose.yml file

lavish timber
#

and did docker compose down , docker compose up -d

#

i still have this listDocuments issue lemme get it brb

#

I checked the guest perms and read perm is still there 🤔

#

btw i have logged in from a verified account

#

fixed

#

it was because of a relation collection (gave the perrms)

#

probably because i directly moved from 1.3.4 > 1.3.8 > 1.4.2