Back

error with openai

  • 0
  • General
Ainz
31 Aug, 2023, 15:51

so im getting an error with appwrite assistnat, here's the logs for main docker container

TypeScript
Worker 1 started successfully
[Error] Timestamp: 2023-08-31T15:42:50+00:00
[Error] Method: GET
[Error] URL: /v1/teams/:teamId
[Error] Type: Appwrite\Extend\Exception
[Error] Message: Team with the requested ID could not be found.
[Error] File: /usr/src/code/app/controllers/api/teams.php
[Error] Line: 204
[Error] Timestamp: 2023-08-31T15:43:01+00:00
[Error] Method: GET
[Error] URL: /v1/teams/:teamId
[Error] Type: Appwrite\Extend\Exception
[Error] Message: Team with the requested ID could not be found.
[Error] File: /usr/src/code/app/controllers/api/teams.php
[Error] Line: 204
[Error] Timestamp: 2023-08-31T15:43:13+00:00
[Error] Method: POST
[Error] URL: /v1/console/assistant
[Error] Type: Appwrite\Extend\Exception
[Error] Message: User (role: guests) missing scope (assistant.read)
[Error] File: /usr/src/code/app/controllers/general.php
[Error] Line: 475
[Error] Timestamp: 2023-08-31T15:43:21+00:00
[Error] Method: POST
[Error] URL: /v1/console/assistant
[Error] Type: Appwrite\Extend\Exception
[Error] Message: User (role: guests) missing scope (assistant.read)
[Error] File: /usr/src/code/app/controllers/general.php
[Error] Line: 475
[Error] Timestamp: 2023-08-31T15:43:22+00:00
[Error] Method: POST
[Error] URL: /v1/console/assistant
[Error] Type: Appwrite\Extend\Exception
[Error] Message: User (role: guests) missing scope (assistant.read)
[Error] File: /usr/src/code/app/controllers/general.php
[Error] Line: 475
[Error] Timestamp: 2023-08-31T15:43:22+00:00
[Error] Method: POST
[Error] URL: /v1/console/assistant
[Error] Type: Appwrite\Extend\Exception
[Error] Message: User (role: guests) missing scope (assistant.read)
[Error] File: /usr/src/code/app/controllers/general.php
[Error] Line: 475
[Error] Timestamp: 2023-08-31T15:43:22+00:00
[Error] Method: POST
[Error] URL: /v1/console/assistant
[Error] Type: Appwrite\Extend\Exception
[Error] Message: User (role: guests) missing scope (assistant.read)
[Error] File: /usr/src/code/app/controllers/general.php
[Error] Line: 475
[Error] Timestamp: 2023-08-31T15:43:23+00:00
[Error] Method: POST
[Error] URL: /v1/console/assistant
[Error] Type: Appwrite\Extend\Exception
[Error] Message: User (role: guests) missing scope (assistant.read)
[Error] File: /usr/src/code/app/controllers/general.php
[Error] Line: 475
[Error] Timestamp: 2023-08-31T15:43:23+00:00
[Error] Method: POST
[Error] URL: /v1/console/assistant
[Error] Type: Appwrite\Extend\Exception
[Error] Message: User (role: guests) missing scope (assistant.read)
[Error] File: /usr/src/code/app/controllers/general.php
[Error] Line: 475
[Error] Timestamp: 2023-08-31T15:43:23+00:00
[Error] Method: POST
[Error] URL: /v1/console/assistant
[Error] Type: Appwrite\Extend\Exception
[Error] Message: User (role: guests) missing scope (assistant.read)
[Error] File: /usr/src/code/app/controllers/general.php
[Error] Line: 475
[Error] Timestamp: 2023-08-31T15:43:24+00:00
[Error] Method: POST
[Error] URL: /v1/console/assistant
[Error] Type: Appwrite\Extend\Exception
[Error] Message: User (role: guests) missing scope (assistant.read)
[Error] File: /usr/src/code/app/controllers/general.php
[Error] Line: 475
TL;DR
The user is getting a 401 error with the OpenAI API, specifically the message "User (role: guests) missing scope (assistant.read)". The error occurred during a POST request to "/v1/console/assistant". The user is asked to provide the request headers from their browser dev tools. There is also mention of a domain being set up and SSL breaking. The user mentions accessing their droplet and being logged in. Solution: It is not clear from the support thread what the specific solution is for the 401 error. However, it is suggested to check if the domain is correctly configured in the .env file and to
Guille
31 Aug, 2023, 16:13

Are you on v1.4.1?

Drake
31 Aug, 2023, 20:00

are you logged in? 🧐

Ainz
31 Aug, 2023, 20:01

yes

Ainz
31 Aug, 2023, 20:01

oh and ssl broke aswell

Drake
31 Aug, 2023, 20:04

yes to which question?

Ainz
31 Aug, 2023, 20:04

both

Ainz
31 Aug, 2023, 20:05

i can give you access to it, its on a dropplet i deployed for testing 1.4 also same issue happened even after a re-install

Drake
31 Aug, 2023, 20:07

how are you accessing your droplet?

Ainz
31 Aug, 2023, 20:07

ssh

Ainz
31 Aug, 2023, 20:07

also i setup a domain

Drake
31 Aug, 2023, 20:08

so your domain is configured in the .env file, right?

Ainz
31 Aug, 2023, 20:08

yes

Ainz
31 Aug, 2023, 20:08

want me to dm you them ?

Ainz
31 Aug, 2023, 20:09

oh not do its on gcp

Drake
31 Aug, 2023, 20:09

would you please open your browser dev tools, switch to the network logs and find the /v1/console/assistant request? then, please share the request headers

Ainz
31 Aug, 2023, 20:10

ook

Ainz
31 Aug, 2023, 20:10
TypeScript
POST /v1/console/assistant HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,ar;q=0.8
Connection: keep-alive
Content-Length: 15
Cookie: _ga=GA1.1.832497037.1693512099; a_session_console_legacy=eyJpZCI6IjY0ZjBiMzQ2YzA4Yzg2NTY2YWQ1Iiwic2VjcmV0IjoiYzZlZjlmNGU4ZTBiZTkwN2RkYzg2ZmM1OWQ2ZDdjZWNmMjA1NGI0ZjhhMjNmOTQzZTdkNTY2MGVjYjM1YTdmYjQyNGQ4NmJjYmYxYzc0ZWI2N2UzMWFmYWQ4OGY5MzUxODg0ZGEyNjhkNzIyMTczM2FmNDNiMjU5MzhmOWE5OTIwOTc0M2Q4ZmMxN2ZlNzk0NTY3Yzg0NDFiOTNhMjg4YzdkY2RjZTUzMWM3ODU2NTE4MTQ3ZTIyOTg3MDA0ZDRhN2E1ODM2MzJlNmQ0OTE1YzI3NGU0ZDE4NWMxOGUxNWNkN2U3ODhjNmVjM2MyNDI1M2U0ODllMzIwNTA5MTkxMiJ9; _ga_R4YJ9JN8L4=GS1.1.1693512099.1.1.1693512601.0.0.0
Host: 
Origin: 
Referer: 
Sec-GPC: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
content-type: application/json
x-appwrite-mode: admin
Drake
31 Aug, 2023, 20:11

and this resulted in 401?

Ainz
31 Aug, 2023, 20:11

yes

Ainz
31 Aug, 2023, 20:11
TypeScript
{
    "message": "User (role: guests) missing scope (assistant.read)",
    "code": 401,
    "type": "general_unauthorized_scope",
    "version": "1.4.1"
}```
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