Giter VIP home page Giter VIP logo

Comments (18)

msoap avatar msoap commented on August 11, 2024

The reason is that the script (script.bat) exits with code 1.
You can try use -show-errors option for show this error in browser.

from shell2http.

selvakumar7991 avatar selvakumar7991 commented on August 11, 2024

image
My browser showing empty response after adding -show-errors option for show this error in browser like below

shell2http -form -show-errors /starttest "C:\Selva\software\shell2http\script.bat"
2020/03/02 15:32:07 register: /starttest (C:\Selva\software\shell2http\script.bat)
2020/03/02 15:32:07 register: / (index page)
2020/03/02 15:32:07 listen http://:8080/
2020/03/02 15:32:09 localhost:8080 [::1]:57083 GET /starttest "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36"
2020/03/02 15:32:09 exec error: exit status 1

from shell2http.

msoap avatar msoap commented on August 11, 2024

sorry, it turned out that this option is about another. Anyway, you should investigate your script, why it exits with code 1

from shell2http.

selvakumar7991 avatar selvakumar7991 commented on August 11, 2024

okay thanks man

from shell2http.

selvakumar7991 avatar selvakumar7991 commented on August 11, 2024

image

I tired with basic command in the bat file, Still getting above error only, Do you any idea about this

from shell2http.

selvakumar7991 avatar selvakumar7991 commented on August 11, 2024

shell2http -form /starttest "C:\Selva\software\shell2http\sam.bat"
2020/03/02 15:56:06 register: /starttest (C:\Selva\software\shell2http\sam.bat)
2020/03/02 15:56:06 register: / (index page)
2020/03/02 15:56:06 listen http://:8080/
2020/03/02 15:56:09 localhost:8080 [::1]:58464 GET /starttest "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0"
2020/03/02 15:56:09 exec error: exit status 1
2020/03/02 15:56:11 localhost:8080 [::1]:58464 GET /starttest "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0"
2020/03/02 15:56:11 exec error: exit status 1

from shell2http.

msoap avatar msoap commented on August 11, 2024

I don’t have Windows right now, but please try that script:

ipconfig

if errorlevel 1 (
   echo Failure reason given is %errorlevel%
   exit /b 0
)

and run command like this:

shell2http -include-stderr /starttest "c:\path\to\script\sam.bat"

from shell2http.

selvakumar7991 avatar selvakumar7991 commented on August 11, 2024

image

still getting same issue. let me try this same in linux machine

from shell2http.

selvakumar7991 avatar selvakumar7991 commented on August 11, 2024

image

from shell2http.

msoap avatar msoap commented on August 11, 2024

You should use real path to script, not "c:\path\to\script\sam.bat" (this is example)

from shell2http.

msoap avatar msoap commented on August 11, 2024

And please just run this script from terminal, is it running normally?

from shell2http.

selvakumar7991 avatar selvakumar7991 commented on August 11, 2024

image
ran this script from terminal, it is running fine

from shell2http.

selvakumar7991 avatar selvakumar7991 commented on August 11, 2024

image
folder structure for your reference

from shell2http.

msoap avatar msoap commented on August 11, 2024

i see - test.bat is nothing output

from shell2http.

msoap avatar msoap commented on August 11, 2024

you can use ipconfig directly:

shell2http -include-stderr /starttest ipconfig

from shell2http.

selvakumar7991 avatar selvakumar7991 commented on August 11, 2024

tired to use directly, but getting different error

shell2http.exe -include-stderr -port=8010 /test "C:\Selva\NeoLoad 7.2\bin\NeoLoadCmd.exe"
2020/03/03 12:27:41 register: /test (C:\Selva\NeoLoad 7.2\bin\NeoLoadCmd.exe)
2020/03/03 12:27:41 register: / (index page)
2020/03/03 12:27:41 listen http://:8010/
2020/03/03 12:27:49 localhost:8010 [::1]:58124 GET /test "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36"
2020/03/03 12:27:59 exec error: exit status 3221226505

from shell2http.

msoap avatar msoap commented on August 11, 2024

script (or any program) must be return 0 exit code, in any other case there will be such an error

from shell2http.

selvakumar7991 avatar selvakumar7991 commented on August 11, 2024

Planning to build an own API according to my recruitment, Anyway, Thanks for your help

from shell2http.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.