Is there any possible reason that a Xojo Web app would kill the Apache? The symptom is when the same app is opened more than once in the same PC, all other users will be kicked out and the web server has to be restarted again. But this does not happen to all machines, only some machines in the office cause this problem.
Unique identifier? Can be changed at run-time? Some more information, if the user entered an incorrect password in the Login page which is the first page when the app loads, the app kills immediately. However, the app design is just showing a message box telling the user has entered an incorrect password, nothing else.
@Derk Jochems , I just copy everything in the build folder generated by Xojo to the Linux Samba, not by ftp. The app runs ok if correct password is entered.
[quote=367194:@Tony Lam]Unique identifier? Can be changed at run-time? Some more information, if the user entered an incorrect password in the Login page which is the first page when the app loads, the app kills immediately. However, the app design is just showing a message box telling the user has entered an incorrect password, nothing else.
@Derk Jochems , I just copy everything in the build folder generated by Xojo to the Linux Samba, not by ftp. The app runs ok if correct password is entered.[/quote]
If that’s true, try it in a browser (safari or chrome) with developer tools, then show the page source and see the console. Leave the page source window of the browser open and go back to your web app and fill in the form, wrong (to get the crash) see what the browser is writing in the console.
OR: show us some code that’s inside the function or event that handles the form. It could be your doing something wrong.
The symptom is: when somebody tries to login with invalid login information, sometimes (not always) the app will make down the Apache which then leads to all users using the app being killed. The app keeps running well if it can bypass the login problem, crashing seems only appears during login. The codes regarding login is in folder Interface -> System Login.
Another thing is, I noticed that errors keep recording in the Apache Error Log:
From what you’ve described and the error log you provided I really don’t think Apache is crashing. I would totally believe that your app is crashing though.
At first glance, let me suggest that you add a handler for App.UnhandledException and start logging what gets sent there. The way your app is configured right now, if an exception occurs, your app will definitely quit.
Thanks Greg, I added the following codes to event UnhandledException for both app and session, but it doesn’t seem catch anything:
dim rec as new DatabaseRecord
dim id as integer
rec.IntegerColumn("AppSession") = 2
rec.IntegerColumn("Number") = error.ErrorNumber
rec.Column("Message") = error.Message
rec.Column("Reason") = error.Reason
id = session.InsertRecord(app.UnicornDatabaseName, "ERRORLOG", rec, "app.UnhandledException", 1) //my insert statement
Just found out that I have a bug in a module (not login module) that fires the session.UnhandledException when an exception occurs. The event actually works when an exception occurs, but it doesn’t fire when login fails then make the app crash, which means it is not an Exception error?
Finally, figured out what happened… I used to put all codes in the WebButton Action event, just don’t know why for the Login button, the codes are in the MouseDown event. After I put back the codes to the Action event, the problem is gone. Will MouseDown event of a WebButton make crash the app?
My guess is that the code in this event somehow relies on something else having previously run and now that its running later, the state is as it should be.
It is no doubt that I do not know much about the framework, sorry about that. But your guess reminds me that codes put in the Open event and in Shown event are not the same. I once put codes to create a container at runtime in Open event caused me troubles, then I put them in the Shown event and the problem was gone