I’ve been running a complex standalone Xojo web app on Red Hat 7.2 for many months without a problem. Today, I moved it to a user account that was just a non privileged user (i.e not root, which my login account is). Now, it crashes the moment a session starts with an unhandled exception. The error message is “Can’t create destination file.” Also, the stack trace is 11 completely blank lines, which is not very helpful.
I’m not creating any files in the session, so what does this message mean? I’ve determined that it’s happening after session.open but before the home page is shown.
Do Xojo standalone web apps require root permissions?
Any suggestions are welcome. Thanks!
There’s an option there for changing the location of the http log and that may fix your issue. Otherwise I’ll have to look at this in the morning to see what other files we need to write on app launch as I can’t think of any off the top of my head.
@Greg O’Lone : yes, IncludeFunctionNames is checked. I can’t build as 32 bit because (I think) there are no 32-bit libraries anymore for Red Hat 7.x. I would love a stack trace that’s not completely blank, though, so maybe I’ll hunt around for those again.
My app does write a log file, but it does it in a world-writable directory; and the log is intact, as I get messages about the app starting and the session starting. I’ve also tried the --logging flag with no success. The last thing in that file is this:
[quote=303616:@Charles Weger]When I remove the HTMLHeader and HandleSpecialURL, the app works fine (albeit it looks bad because some styles are missing).
I can work around this by redoing all the styles in the app, but it would be better to know why it’s crashing so I can keep using my custom CSS.[/quote]
Something else that would help narrow it down would be to load the css into memory and write it directly to the socket like this:
[code]try
dim f2 as FolderItem = app.GetResourceFile(request.Path)
if f2 <> nil and f2.Exists then
DEBUGG "Special URL found: " + f2.NativePath
// These 3 Lines
dim tis as textinputstream = TextInputStream.Open(f2)
Request.Print tis.ReadAll
tis.close
// Request.File = f2
request.MIMEType= "text/css"
return true
else
LogError "SpecialURL not found: " + request.Path + " " + f2.NativePath
end if
catch e
LogError "Unknown error in SpecialURL: " + e.Message
return false
try[/code]
On RHEL 7 it could also be security policy voodoo. You may want to try running in permissive mode and seeing if it changes anything for you. Even with file permissions set they way you think they should be applications can still be restricted by policy.
@Greg O’Lone : your suggestion to use “Request.Print” instead of “Request.File” for the CSS solved the problem. I still don’t understand why, but thanks!