Back

Function execution showing guest triggering but I'm logged in?

  • 0
  • Flutter
  • Functions
ZachHandley
8 Jul, 2023, 01:58

I click raw data and it shows me that but

TL;DR
The user is experiencing an issue with their function execution showing as triggered by a guest even though they are logged in. They have tried adding a try/except statement to handle exceptions. The user shares their appwrite.json file and mentions that the logs/errors only show an "internal runtime error." They provide a screenshot showing raw data from the logs, but are unclear about where they are seeing the issue. They mention that the function returns data, but it fails when the button is pressed on the client side. The user is trying to call a Python function from their client and suspects that using `asyncx: true` and having an `await
ZachHandley
8 Jul, 2023, 01:58
Drake
8 Jul, 2023, 01:59

When is this error occurring?

ZachHandley
8 Jul, 2023, 01:59

in the function somewhere

ZachHandley
8 Jul, 2023, 01:59

oh

ZachHandley
8 Jul, 2023, 01:59

could it be because

ZachHandley
8 Jul, 2023, 01:59
TypeScript
client = Client()

  # You can remove services you don't use
  account = Account(client)
  avatars = Avatars(client)
  database = Databases(client)
  functions = Functions(client)
  health = Health(client)
  locale = Locale(client)
  storage = Storage(client)
  teams = Teams(client)
  users = Users(client)
ZachHandley
8 Jul, 2023, 02:00

I left that in there in case I needed it but

ZachHandley
8 Jul, 2023, 02:00

that's probably causing it, yes?

ZachHandley
8 Jul, 2023, 02:00

well it shouldn't in theory cause I'm still authenticating with the API key but

ZachHandley
8 Jul, 2023, 02:03

it's occuring in execution, also I noticed the await doesn't work

ZachHandley
8 Jul, 2023, 02:03

maybe because I used asyncx: true

Drake
8 Jul, 2023, 02:04

Sorry I really can't follow what you're trying to do and what's wrong

ZachHandley
8 Jul, 2023, 02:05

I'm trying to call a Python function from my client

ZachHandley
8 Jul, 2023, 02:05

basically when the user presses a button it's supposed to call this function

ZachHandley
8 Jul, 2023, 02:06

The function returns data back

Drake
8 Jul, 2023, 02:08

I don't understand where you're seeing this from

ZachHandley
8 Jul, 2023, 02:10

the Appwrite dashboard when the function executes it fails and shows that in the raw data

ZachHandley
8 Jul, 2023, 02:10

ayy my name is orange now

Drake
8 Jul, 2023, 02:11

Can you show more detail about that?

ZachHandley
8 Jul, 2023, 02:12

the only details I have is the following, I clicked logs on the first one and it says the second image, then I click raw data and I get the picture above

ZachHandley
8 Jul, 2023, 02:12

all it says in logs/errors is "internal runtime error"

ZachHandley
8 Jul, 2023, 02:14

the relevant section of my appwrite.json

Drake
8 Jul, 2023, 02:14

Your function is throwing an exception. Add a try/except to make sure it doesn't throw an exception

ZachHandley
8 Jul, 2023, 02:15

hm okay

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