Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug Report: Dart Function Runtime Doesn't Handle Errors #4529

Open
2 tasks done
stnguyen90 opened this issue Oct 18, 2022 · 5 comments
Open
2 tasks done

馃悰 Bug Report: Dart Function Runtime Doesn't Handle Errors #4529

stnguyen90 opened this issue Oct 18, 2022 · 5 comments
Labels
bug Something isn't working product / functions Fixes and upgrades for the Appwrite Functions.

Comments

@stnguyen90
Copy link
Contributor

馃憻 Reproduction steps

  1. Deploy a dart function like:
Future<void> start(final req, final res) async {
  throw new Exception('panic!');
}
  1. Execute the function

馃憤 Expected behavior

The execution has stderr with the panic! message

馃憥 Actual Behavior

An internal curl error has occurred within the executor! Error Msg: Operation timed out

馃幉 Appwrite version

Version 1.0.x

馃捇 Operating system

Linux

馃П Your Environment

No response

馃憖 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

馃彚 Have you read the Code of Conduct?

@stnguyen90 stnguyen90 added bug Something isn't working product / functions Fixes and upgrades for the Appwrite Functions. labels Oct 18, 2022
@InfiniteVerma
Copy link

I'd like to work on this .

@DEADSEC-SECURITY
Copy link

This is a problem in python too. No print or logs are showing up when a exception crashes the program which is not the expected behavior. It should display the past stdout too as well as traceback just like AWS Lambda does for example or the normal "run in console"

@DEADSEC-SECURITY
Copy link

@InfiniteVerma anyway I can be useful? This is posing as a huge problem for debugging in our setup and I need this fixed ASAP so we can have more productivity.

I'm a python dev and also know docker pretty well so if I can be of use let me know

@DEADSEC-SECURITY
Copy link

DEADSEC-SECURITY commented Jan 6, 2023

image
The problem seems to be happening in the file executer.php in the part of the code in the image. The executer response doesn't seem to be returning the traceback or log when a 500 code is raised so it defaults to Internal Runtime Error.

Request header of the function where that code is located:
App::post('/v1/execution')

@stnguyen90
Copy link
Contributor Author

image The problem seems to be happening in the file executer.php in the part of the code in the image. The executer response doesn't seem to be returning the traceback or log when a 500 code is raised so it defaults to Internal Runtime Error.

Request header of the function where that code is located: App::post('/v1/execution')

@DEADSEC-SECURITY this specific problem you're mentioning is related to issue #4594 and already has a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product / functions Fixes and upgrades for the Appwrite Functions.
Projects
None yet
Development

No branches or pull requests

3 participants