Wapp

Problem running wapp with scgi
Login

Problem running wapp with scgi

(1) By Rokas (Rokasg) on 2022-11-15 06:52:28 [link] [source]

When I for example a helloworld example from here like this

tclsh hello.tcl --scgi 9001

and try to access it on localhost:9001, I get this error in the console:

can't read "len": no such variable
can't read "len": no such variable
    while executing
"string length "$len:,""
    (procedure "wappInt-scgi-readable-unsafe" line 14)
    invoked from within
"wappInt-scgi-readable-unsafe sock555e4975b9f0"
    invoked from within
"catch [list wappInt-scgi-readable-unsafe $chan] msg"
can't read "len": no such variable
can't read "len": no such variable
    while executing
"string length "$len:,""
    (procedure "wappInt-scgi-readable-unsafe" line 14)
    invoked from within
"wappInt-scgi-readable-unsafe sock555e4975baf0"
    invoked from within
"catch [list wappInt-scgi-readable-unsafe $chan] msg"
can't read "len": no such variable
can't read "len": no such variable
    while executing
"string length "$len:,""
    (procedure "wappInt-scgi-readable-unsafe" line 14)
    invoked from within
"wappInt-scgi-readable-unsafe sock555e4975c070"
    invoked from within
"catch [list wappInt-scgi-readable-unsafe $chan] msg"
can't read "len": no such variable
can't read "len": no such variable
    while executing
"string length "$len:,""
    (procedure "wappInt-scgi-readable-unsafe" line 14)
    invoked from within
"wappInt-scgi-readable-unsafe sock555e4975c0f0"
    invoked from within
"catch [list wappInt-scgi-readable-unsafe $chan] msg"
can't read "len": no such variable
can't read "len": no such variable
    while executing
"string length "$len:,""
    (procedure "wappInt-scgi-readable-unsafe" line 14)
    invoked from within
"wappInt-scgi-readable-unsafe sock555e4975bd70"
    invoked from within
"catch [list wappInt-scgi-readable-unsafe $chan] msg"
can't read "len": no such variable
can't read "len": no such variable
    while executing
"string length "$len:,""
    (procedure "wappInt-scgi-readable-unsafe" line 14)
    invoked from within
"wappInt-scgi-readable-unsafe sock555e4975bf70"
    invoked from within
"catch [list wappInt-scgi-readable-unsafe $chan] msg"
can't read "len": no such variable
can't read "len": no such variable
    while executing
"string length "$len:,""
    (procedure "wappInt-scgi-readable-unsafe" line 14)
    invoked from within
"wappInt-scgi-readable-unsafe sock555e4975bbf0"
    invoked from within
"catch [list wappInt-scgi-readable-unsafe $chan] msg"
can't read "len": no such variable
can't read "len": no such variable
    while executing
"string length "$len:,""
    (procedure "wappInt-scgi-readable-unsafe" line 14)
    invoked from within
"wappInt-scgi-readable-unsafe sock555e4975bc70"
    invoked from within
"catch [list wappInt-scgi-readable-unsafe $chan] msg"
can't read "len": no such variable
can't read "len": no such variable
    while executing
"string length "$len:,""
    (procedure "wappInt-scgi-readable-unsafe" line 14)
    invoked from within
"wappInt-scgi-readable-unsafe sock555e4975bcf0"
    invoked from within
"catch [list wappInt-scgi-readable-unsafe $chan] msg"
can't read "len": no such variable
can't read "len": no such variable
    while executing
"string length "$len:,""
    (procedure "wappInt-scgi-readable-unsafe" line 14)
    invoked from within
"wappInt-scgi-readable-unsafe sock555e4975bdf0"
    invoked from within
"catch [list wappInt-scgi-readable-unsafe $chan] msg"`

Am I doing something from, or is there a bug?

(2) By Rodolfo Carvalho (rhcarvalho) on 2022-11-15 14:57:14 in reply to 1 [source]

The -sgci flag is for when you want to deploy your app along with a web server that speaks SCGI, it is not meant to be accessed directly from a browser.

What you probably want is to run the app using the built-in web-server:

tclsh hello.tcl --server 8080

(Makes it accessible from other devices in your network)

Or for development this is what you probably want:

tclsh hello.tcl