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.56k stars 293 forks source link

exit code 127 error on Mac Mini M1 #496

Open nc01315 opened 2 years ago

nc01315 commented 2 years ago

david@Davids-Mac-mini restler-fuzzer % python3 ./build-restler.py --dest_dir ./restler_bin

Generating a new RESTler binary drop... Publishing dotnet core apps... Publishing project /Users/david/Developer/restler-fuzzer/src/compiler/Restler.CompilerExe/Restler.CompilerExe.fsproj to output dir restler_bin/compiler Determining projects to restore... Restored /Users/david/Developer/restler-fuzzer/src/compiler/Restler.CompilerExe/Restler.CompilerExe.fsproj (in 3.59 sec). Restored /Users/david/Developer/restler-fuzzer/src/compiler/Restler.Compiler/Restler.Compiler.fsproj (in 3.59 sec). Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET Copyright (C) Microsoft Corporation. All rights reserved.

Restler.Compiler -> /Users/david/Developer/restler-fuzzer/src/compiler/Restler.Compiler/bin/release/netcoreapp5.0/Restler.Compiler.dll Restler.CompilerExe -> /Users/david/Developer/restler-fuzzer/src/compiler/Restler.CompilerExe/bin/release/netcoreapp5.0/Restler.CompilerExe.dll Restler.CompilerExe -> /Users/david/Developer/restler-fuzzer/restler_bin/compiler/ Publishing project /Users/david/Developer/restler-fuzzer/src/ResultsAnalyzer/ResultsAnalyzer.fsproj to output dir restler_bin/resultsAnalyzer Determining projects to restore... Restored /Users/david/Developer/restler-fuzzer/src/compiler/Restler.Compiler/Restler.Compiler.fsproj (in 331 ms). Restored /Users/david/Developer/restler-fuzzer/src/ResultsAnalyzer/ResultsAnalyzer.fsproj (in 491 ms). Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET Copyright (C) Microsoft Corporation. All rights reserved.

Restler.Compiler -> /Users/david/Developer/restler-fuzzer/src/compiler/Restler.Compiler/bin/release/netcoreapp5.0/Restler.Compiler.dll ResultsAnalyzer -> /Users/david/Developer/restler-fuzzer/src/ResultsAnalyzer/bin/release/netcoreapp5.0/Restler.ResultsAnalyzer.dll ResultsAnalyzer -> /Users/david/Developer/restler-fuzzer/restler_bin/resultsAnalyzer/ Publishing project /Users/david/Developer/restler-fuzzer/src/driver/Restler.Driver.fsproj to output dir restler_bin/restler Determining projects to restore... Restored /Users/david/Developer/restler-fuzzer/src/compiler/Restler.Compiler/Restler.Compiler.fsproj (in 333 ms). Restored /Users/david/Developer/restler-fuzzer/src/driver/Restler.Driver.fsproj (in 1.54 sec). Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET Copyright (C) Microsoft Corporation. All rights reserved.

Restler.Compiler -> /Users/david/Developer/restler-fuzzer/src/compiler/Restler.Compiler/bin/release/netcoreapp5.0/Restler.Compiler.dll Restler.Driver -> /Users/david/Developer/restler-fuzzer/src/driver/bin/release/netcoreapp5.0/Restler.dll Restler.Driver -> /Users/david/Developer/restler-fuzzer/restler_bin/restler/ Testing compilation of Python files... Copying all python files... Build failed! Exit code: 127 b'/bin/sh: python: command not found\n' Removing engine compilation build directory...

I am trying to follow the instruction by running command on a M1 mac: latest Python, Git, Docker, .Net are all installed python3 ./build-restler.py --dest_dir ./restler_bin, but got the exit code 127 error, not sure how to fix it

alex-vungle commented 2 years ago

I have same issue on my MBP with the M1 chip

marina-p commented 2 years ago

Hello @nc0135 and @sqli0189,

Do you still see this issue with the latest version of RESTler? I am wondering if the fix in this commit has addressed it: https://github.com/microsoft/restler-fuzzer/commit/88e41f0139589bc2f7b9e99fafbed7a969a48907.

If not, could you please try specifying the full path to python with an additional --python_path argument, and let me know if this resolves the error?

Thanks,

Marina

alex-vungle commented 2 years ago

@marina-p

I did test on both Intel chip devices and Apple M1 chip devices, I am able to successfully build the binaries on both of them, however when I run the restler command on the Mac device with Apple M1 chip, I will get an error as below(It seems dotNet 5. 0 will be deprecated? I can't find the binary package for Mac arm64, so I have to replace it with dotNet 6.0):

It was not possible to find any compatible framework version The framework 'Microsoft.NETCore.App', version '5.0.0' (arm64) was not found.

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:

On the Mac device with Intel chip(dotNet 5.0 + Python 3.9), I can successfully run the Restler command!~