microsoft / restler-fuzzer

RESTler is the first stateful REST API fuzzing tool for automatically testing cloud services through their REST APIs and finding security and reliability bugs in these services.
MIT License
2.52k stars 285 forks source link

System.Exception: Could not find path to RESTler engine #454

Open divyakrishnankutty opened 2 years ago

divyakrishnankutty commented 2 years ago

Compilation worked:

Starting task Compile... Task Compile succeeded. Collecting logs...

smoketest fails with exception:

Starting task Test...

ERROR: Task Test failed. Exception: System.Exception: Could not find path to RESTler engine. Please re-install RESTler or contact support. at Program.Fuzz.runRestlerEngine@273-1.Invoke(String m) in /Users//Projects/restler-fuzzer/src/driver/Program.fs:line 273 at Program.Fuzz.runRestlerEngine@272.Invoke(Unit unitVar) in /Users//Projects/restler-fuzzer/src/driver/Program.fs:line 273 at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation1 ctxt, TResult result1, FSharpFunc2 part2) in F:\workspace_work\1\s\src\fsharp\FSharp.Core\async.fs:line 398 at Microsoft.FSharp.Control.AsyncPrimitives.unitAsync@589.Invoke(AsyncActivation1 ctxt) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 589 at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc2 firstAction) in F:\workspace_work\1\s\src\fsharp\FSharp.Core\async.fs:line 109

Task Test failed. Collecting logs...

marina-p commented 2 years ago

Hello @divyakrishnankutty,

In the RESTler bin folder, do you see the "engine" folder? If not, could you please share the output of the following commands:

python --version python .\build-restler.py --dest_dir --compile_type engine

This may be the same issue as mentioned at the end of #440, it appears to be recent and we are still tracking down the cause.

Thanks,

Marina

marina-p commented 2 years ago

One guess: this could be caused by recent changes to the build script. It would be very helpful for the investigation if you could sync to this earlier commit to see if the issue is resolved: https://github.com/microsoft/restler-fuzzer/commit/7eba32cd37e54e150197bb63cd540c318350d394

Thanks,

Marina

divyakrishnankutty commented 2 years ago

Hi Marina,

I do not have the engine folder under bin.

root@:/home//demo/restler_bin# ls compiler restler resultsAnalyzer

Here are the details,

--compile_type engine fails,

Testing compilation of Python files... Copying all python files... Build failed! Exit code: 127 b'/bin/sh: 1: python: not found\n' Removing engine compilation build directory...

python version

python3 Python 3.8.10 (default, Jun 2 2021, 10:49:15) [GCC 9.4.0] on linux

Code base have been updated to latest - #455

marina-p commented 2 years ago

Thank you for the repro information. The script defaults to 'python' for this step - it needs to be updated to try both 'python' and 'python3'.

Could you please try the following workaround (additional argument --python_path below):

python .\build-restler.py --dest_dir --compile_type engine --python_path

Thanks,

Marina

divyakrishnankutty commented 2 years ago

Hey Marina,

Providing explicit python path helped.

restler-fuzzer# python3 ./build-restler.py --dest_dir ../restler_bin/ --compile_type engine --python_path /usr/bin/python3 Generating a new RESTler binary drop... Testing compilation of Python files... Copying all python files... Removing engine compilation build directory... Copying all python files...