Deployment - Getting Discouraged

Julia, try it without the htaccess file that we create. That’s only necessary under certain circumstances.

Same thing. If I put the stuff in a location that doesn’t result in a 404, I get an Internal Server Error after 20 seconds or so.

Internal Server Error usually means a couple different things.

Permissions eligible to execute? chmod 755?

If it can execute then perhaps it is crashing. We know it is trying to execute otherwise the CGI script would come back as text - so the server handler is defined. Maybe something in the App.Open event is crashing it.

Try a blank Xojo app with nothing but like a button and a MsgBox when you press it. Get that working first.

Good idea, @Phillip Zedalis , thanks. I made an app exactly as you describe. On first, run the server (I assume) complained that it didn’t have write privileges for the cfg file - so something is working. I fixed that, and now I get an immediate Internal Server Error. Seems the server doesn’t like Xojo apps.

I would try building the same simple app again, but this time build it with a different App Identifier. Then upload it to a different folder than the other one and make sure you got the permissions right this time (CFG file, etc.). See if this new one still gives an immediate Internal Server Error.

Julia, have you tried just running the binary from the command line? I’m wondering if the dependencies aren’t satisfied and it might tell us more.

I built it for MacOS and ran it from Terminal - nothing seems to happen, it just gives me a new terminal prompt.

You should build it for the OS of the server, if the server runs Linux, you build for Linux, is it Windows , you should build for Windows. It doesn’t matter much on which browser the program should be show, most known browsers will work well.

Sorry, I meant “on the machine where you are having these problems”

On my client’s server? I have no idea how to run something there; I have FTP access only.

I never found any standard webhosting which would allow for execution of binaries. The only way to run cgi is when it is a php app.

You must have ssh access to the server, with permission to copy and run applications on that server. Usually you get this only with a vps.

UPDATE! I bit the bullet and rented a XojoCloud server. Deployment of my full calculator app went swimmingly; everything pretty much “just worked”. The only thing that’s a little disturbing is that if I leave the browser window open and put the laptop to sleep, after waking it up, the calculator seems to be working but yields erroneous results until I reload it. I don’t think I’ve ever seen that behavior on a web page.

Back to the quest to get it working on something other than XC, my client’s host has now stepped into the fray. They set up my test app, which consists of nothing but a pushbutton that opens a MsgBox.

Running the script produces this error:

End of script output before headers: xjtest.cgi

and running it [the executable, I presume] from the command line, this one:

/home/xxxxxxx/www/cgi-bin/xjtest/xjtest: error while loading shared libraries: libunwind.so.8: cannot open shared object file: No such file or directory Use of uninitialized value $ENV{"REQUEST_METHOD"} in string eq at ./xjtest.cgi line 110. Can't use an undefined value as a symbol reference at ./xjtest.cgi line 118.

Perhaps this will help your sysadmin: https://forum.xojo.com/50481-internal-server-error-since-2018

Thanks, Ralph. I think it’s disingenuous of Xojo to push users toward their high-priced service (after we’ve already shelled out for WE) by hoarding details about deployment requirements and hiding behind the disclaimer that “we can’t tell you how to configure your server”. Any issue seems to be met with a response from @Paul Lefebvre that everything that one needs to be known can be found in the Xojo docs, but the forum is absolutely strewn with threads about difficulties because a file doesn’t have its permissions set right or it was uploaded as ASCII instead of binary, or some obscure library or other is missing on the server. There is nothing in the Xojo docs about any of this. Would a consolidated list, in one place, of all the prerequisites and dependencies be too much to ask?

To be fair I believe Xojo created their cloud to overcome these deployment issues rather than force their customers to purchase. I deploy all my Web Apps behind IIS on Windows Server & offload the SSL to IIS. Works every time and takes minimal configuration. I also deploy test apps on Pi devices - but as stand-alone - again they just work.

Your issue is not deploying a Xojo Web Application, is it deploying it as CGI on Linux thus requiring Bofins. Ever wonder why the “Year of Linux Desktop” hasn’t arrived?

I just recompiled an old licensing webapp with Xojo 2018r4 and run it as standalone behind a haproxy loadbalancer on a Ubuntu Linux VPS.

This is the setup where Xojo webspps work best, imho.

https://lic.seminar.pro

(this webapp then is loaded into an iframe of a homepage)

[quote=423788:@Wayne Golding]To be fair I believe Xojo created their cloud to overcome these deployment issues rather than force their customers to purchase. I deploy all my Web Apps behind IIS on Windows Server & offload the SSL to IIS. Works every time and takes minimal configuration. I also deploy test apps on Pi devices - but as stand-alone - again they just work.

Your issue is not deploying a Xojo Web Application, is it deploying it as CGI on Linux thus requiring Bofins. Ever wonder why the “Year of Linux Desktop” hasn’t arrived?[/quote]
I’m sure there is some truth in what you say, and XC certainly delivers what it promises. But I don’t think that excuses lamentably incomplete documentation of other deployment options.

Maybe this thread will finally stimulate Xojo Inc into assembling documentation for server requirements for running a Xojo Web app.

We are not trying to hide anything. The reality is just that there are too many configuration options to document them all. I did a quick scan back through the thread and most of your specs simply as that they are hosting with GoDaddy. I should have asked earlier in the conversation because GoDaddy not only offers several different flavors of Linux, but Windows hosting as well.

FWIW, The issue you are running into is documented on the System Requirements page in the Linux section.

1 Like

Have you asked the client for a list of installed libraries, os version etc to replicate the setup?
Have you tried all this in a linux VM yet, locally so you can actually see if your code works on the target platform?
Have you tried building a binary and asking them to ldd or objdump the file to see if dependencies are missing?