Skip to content
Back

[SOLVED] Failed to execute function via console. cloud.appwrite

  • 0
  • Functions
rafagazani
28 Mar, 2023, 16:46

I put it but it gave the same error Unexpected curl error between proxy and executor: Operation timed out

TL;DR
Issue: Failed to execute function via console. cloud.appwrite. Solution: This is a known issue that the Appwrite team is working on. In the meantime, you can try increasing the timeout value in the function settings or debug your function to identify any sections causing delays. Make sure all the environment fields are loaded correctly.
Binyamin
28 Mar, 2023, 16:49

Have you verified that all of the env fields loaded correctly?

rafagazani
28 Mar, 2023, 16:49

yes

rafagazani
28 Mar, 2023, 16:51

I think it might be an error in the cloud @Christy Jacob

rafagazani
28 Mar, 2023, 17:01

the main_test.dart file runs normally on my machine

rafagazani
28 Mar, 2023, 17:01
Binyamin
28 Mar, 2023, 17:02

Yes your code looks flawless

rafagazani
28 Mar, 2023, 17:02
joeyouss
28 Mar, 2023, 17:03

Hey 👋 this is a known issue and we are working on it, however you can try something this might help you, if not - we will let you know when it's solved. So, Operation timed out is there to stop execution when it exceeds the timeout you specify in function settings. This value is 15s by default. Feel free to increase it. If you don't expect your function for running that long, you can debug your function to see which section takes most of the time.

rafagazani
28 Mar, 2023, 17:07

ok i'll put 14s it's a test function just to show another community member how to convert csv to docs

rafagazani
28 Mar, 2023, 17:11

did not work. If it's a known issue let's wait for the update. Thanks @joeyouss and @Binyamin

joeyouss
28 Mar, 2023, 17:11

Thanks for your patience, I wll let you know soon as and when there is more info about this

rafagazani
28 Mar, 2023, 17:13

@Husnain_bashir here is the repository. But I found this limitation, if it is to run on your machine it will work.

Drake
28 Mar, 2023, 18:34

on newer versions of Appwrite, the variables are in request.variables rather than request.env. Maybe you can also wrap your code is a try catch so that your function doesn't throw any exceptions

rafagazani
28 Mar, 2023, 18:50

Same error, it's like @joeyouss wrote, we should wait for the new version

Drake
28 Mar, 2023, 18:58

are you seeing the error for every execution? did you wrap with try/catch?

rafagazani
28 Mar, 2023, 19:02

the error changed

rafagazani
28 Mar, 2023, 19:02

{"error":"type '_OneByteString' is not a subtype of type 'int' of 'index'"}

rafagazani
28 Mar, 2023, 19:03

funny thing is that on the local machine I can run

Drake
28 Mar, 2023, 19:08

also, request.payload is a string, not map so you can't do reqest.payload['fileId']

rafagazani
28 Mar, 2023, 19:17

ok i will treat

rafagazani
28 Mar, 2023, 19:21

bazinga! It worked

rafagazani
28 Mar, 2023, 19:23

Sorry community for not paying attention to the documentation: https://appwrite.io/docs/functions#writingYourOwnFunction "payload A JSON string containing the data when you created the execution."

rafagazani
28 Mar, 2023, 19:26

@Husnain_bashir you can use the function, I updated git sorry for the delay and for not paying attention to the documentation.

rafagazani
28 Mar, 2023, 19:26

[SOLVED] Failed to execute function via console. cloud.appwrite

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