Skip to content
Back

[SOLVED] Frontend showing Function even though it doesn't exist

  • 0
  • Self Hosted
  • Functions
Joshi
6 Sep, 2024, 19:29

Do it manually via REST

TL;DR
A frontend issue was fixed by correcting a typo in the API key. A possible solution was to manually manipulate the database via REST. Restarting Redis and Appwrite was suggested, along with a configuration change in sysctl.conf for `vm.overcommit_memory = 1`. The Redis logs indicated a connection issue, possibly due to low memory. Logs and Docker commands were shared for troubleshooting.
WhMonkey
6 Sep, 2024, 19:29

id assume it's too risky to manipulate the db myself?

WhMonkey
6 Sep, 2024, 19:29

but it doesnt exist, so the api wont do anything

Joshi
6 Sep, 2024, 19:29

No. The deployment doesn't exist

Joshi
6 Sep, 2024, 19:29

Deployment != Function

Joshi
6 Sep, 2024, 19:29

Just delete the function

WhMonkey
6 Sep, 2024, 19:30

oh

WhMonkey
6 Sep, 2024, 19:31

curl -X DELETE
\ 'https://[APPWRITE_ENDPOINT]/v1/functions/[FUNCTION_ID]'
\ -H 'Content-Type: application/json'
\ -H 'X-Appwrite-Project: [PROJECT_ID]'
\ -H 'X-Appwrite-Keys: [API_KEY]'

WhMonkey
6 Sep, 2024, 19:31

I'd assume this would work?

WhMonkey
6 Sep, 2024, 19:34

{"message":"User (role: guests) missing scope (functions.write)","code":401,"type":"general_unauthorized_scope","version":"1.5.10"}%

Joshi
6 Sep, 2024, 19:43

You made a typo

Joshi
6 Sep, 2024, 19:43

It should be X-Appwrite-Key

WhMonkey
6 Sep, 2024, 19:44

Same issue

WhMonkey
6 Sep, 2024, 19:44

the api key i used has all the permissions

Joshi
6 Sep, 2024, 19:47

Weird. It should say role: applicationswhen you use an api key

WhMonkey
6 Sep, 2024, 19:49

ill create a new one

WhMonkey
6 Sep, 2024, 19:49

see if that does anything

WhMonkey
6 Sep, 2024, 19:50

oop that fixed it

WhMonkey
6 Sep, 2024, 19:50

maybe i accidentaly pressed a key at the end o f the other one and it added a character

WhMonkey
6 Sep, 2024, 19:50

who knows

WhMonkey
6 Sep, 2024, 19:51

Hooray! All fixed!

WhMonkey
6 Sep, 2024, 19:51

Tysm :)))

Joshi
6 Sep, 2024, 19:52

You're welcome 🙂

WhMonkey
6 Sep, 2024, 19:52

and that fixed another issue I didn't even know I had lol

WhMonkey
6 Sep, 2024, 19:53

[SOLVED] Frontend showing Function even though it doesn't exist

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