WebListBox items not shown by webapp unless run as sudo

different machines, neither have SElinux. Apparmor is present on both, as is the default for Ubuntu and Mint; all in default state.

Just in case, could you run these three commands with sudo just to see if the IDE or your apps are being restricted?

  • grep -i denied /var/log/kern.log
  • grep -i denied /var/log/messages
  • grep -i denied /var/log/audit/audit.log (if using auditd)

/var/log/kern.log has no references to Xojo except the segfaults; the other two files do not even exist (on both machines, Ubuntu and Mint.)

some apparmor=“DENIED” entries exist but for “cups-browsed”, seems totally unrelated.

Well… I’m out of ideas. I too run Mint 20.2 Cinnamon and I don’t have any of the issues that you are describing.

starting to get baffled here… a webapp simply does not list any weblistbox items, unless executed with sudo. it’s in my home directory, everything in it is owned by my user. I can output to debug everything that is supposed to go into the listbox, but it does not get added. if run as sudo, it is.

what access can it possibly need to open just to add items into a listbox?

any strace or anything else that cane be used to diagnose this?

thanks

Xojo 2021r2.1 Ubuntu-1804-bionic-64 4.15.0-154-generic

Wild guess here… are the listbox items coming from a database connection?

Does running as sudo allow you rights to accessing the database (or access to networking to reach the database) which your user otherwise doesn’t have?

they do come from a database, but even when not run as sudo i can print those items that are listed by running a system.debuglog for each entry.

but even without db, i added this to the opening event. it is only shown in listbox when executed as sudo!

.AddRow(“something”, “something”,“something”, “something”,“something”, “something”)

Was trying to think of any less obvious things. (i.e. separate bugs which would make it seem like the issue was the weblistbox)

Only other one which springs to mind is fonts. Any reason font(s) you’re using wouldn’t be available to super user?

If you make a very simple project (one page, one listbox, no styling, manually add two rows) are the cells still blank?

a simple webapp like this works, just tested. in the one that doesn’t i have no font or style customization at all.

to the complex i even added a page with no functions except a listbox and manually added rows - they do not show up unless run as sudo.

i set as default app page a simple page with nothing but listbox and manually added rows, and disabled all database connection and session stuff.

same… it’s some global bug that applies to the built web app. only when run as sudo the rows are shown in the listbox, which is ridiculous…

If I understood you correctly, a very simple app works and text shows up in WebListbox.

In the complex app is there anything in App or Session events which is doing anything which might require higher privileges? Any manual JS or CSS being called/setup?

Again, just trying to think out loud about things which have bitten me when working on web apps… (and hoping one might cause a “Eureka!” moment for you! :smiley: )

i’ve got no js or css at all, and even if i did - i set startup page to a blank one with nothing but listbox, so nothing is getting called but this page. yet, same sudo bug.

thanks!

there’s more. a completely different webapp does not respond to HandleUrl requests and just hangs, unless run as sudo. can anyone at xojo look at this?

thanks

If you show some code…

@Shant_Khatcherian

We really have nothing to go on except your description of the problem. None of us can reproduce your issue on our systems which makes this a literal needle in a haystack for us.

Here’s an idea for you though…

In the docs for WebApplication, there are a list of command-line options. Would you try setting the log path when you launch and then do this:

tail -f path/to/log

and then try to access your app? You should get a log of requests in Apache default format into that file. If the framework is denying the Listbox requests, they should show up in there with response codes > 299.

Note: I’m including the 30x response codes here in case there’s a redirect going on.

i tried --logging; everything there shows returning 200 even though this app is running as normal user, and therefore listbox items are not getting shown. log below, thanks!

2a01:4f9:3a:2b9c::2 - - [17/Sep/2021:13:25:56 0200] “POST /240DB144CE3B3B284497F442F5F4FA3B2B77BAE18F2C5B2C9C702AF58D55EF11/comm/event/j34taz.Pressed HTTP/1.0” 200 53499 “-” “close”
2a01:4f9:3a:2b9c::2 - - [17/Sep/2021:13:25:57 0200] “POST /240DB144CE3B3B284497F442F5F4FA3B2B77BAE18F2C5B2C9C702AF58D55EF11/comm/event/H7sz1P.shown HTTP/1.0” 200 2 “-” “close”
2a01:4f9:3a:2b9c::2 - - [17/Sep/2021:13:25:57 0200] “POST /240DB144CE3B3B284497F442F5F4FA3B2B77BAE18F2C5B2C9C702AF58D55EF11/comm/event/LyBsEG.shown HTTP/1.0” 200 65 “-” “close”
2a01:4f9:3a:2b9c::2 - - [17/Sep/2021:13:25:57 0200] “POST /240DB144CE3B3B284497F442F5F4FA3B2B77BAE18F2C5B2C9C702AF58D55EF11/comm/event/E2L9AT.shown HTTP/1.0” 200 65 “-” “close”
2a01:4f9:3a:2b9c::2 - - [17/Sep/2021:13:25:57 0200] “POST /240DB144CE3B3B284497F442F5F4FA3B2B77BAE18F2C5B2C9C702AF58D55EF11/comm/event/cCMHgQ.hidden HTTP/1.0” 200 2 “-” “close”
2a01:4f9:3a:2b9c::2 - - [17/Sep/2021:13:25:57 0200] “POST /240DB144CE3B3B284497F442F5F4FA3B2B77BAE18F2C5B2C9C702AF58D55EF11/comm/event/QACGlS.shown HTTP/1.0” 200 65 “-” “close”
2a01:4f9:3a:2b9c::2 - - [17/Sep/2021:13:25:57 0200] “POST /240DB144CE3B3B284497F442F5F4FA3B2B77BAE18F2C5B2C9C702AF58D55EF11/comm/event/BYWn0S.hidden HTTP/1.0” 200 2 “-” “close”
2a01:4f9:3a:2b9c::2 - - [17/Sep/2021:13:25:57 0200] “POST /240DB144CE3B3B284497F442F5F4FA3B2B77BAE18F2C5B2C9C702AF58D55EF11/comm/event/B3Cbo0.hidden HTTP/1.0” 200 2 “-” “close”
2a01:4f9:3a:2b9c::2 - - [17/Sep/2021:13:25:57 0200] “POST /240DB144CE3B3B284497F442F5F4FA3B2B77BAE18F2C5B2C9C702AF58D55EF11/comm/event/njk16k.hidden HTTP/1.0” 200 2 “-” “close”
2a01:4f9:3a:2b9c::2 - - [17/Sep/2021:13:25:57 0200] “POST /240DB144CE3B3B284497F442F5F4FA3B2B77BAE18F2C5B2C9C702AF58D55EF11/comm/event/JIFnXN.shown HTTP/1.0” 200 929 “-” “close”
2a01:4f9:3a:2b9c::2 - - [17/Sep/2021:13:25:57 0200] “POST /240DB144CE3B3B284497F442F5F4FA3B2B77BAE18F2C5B2C9C702AF58D55EF11/comm/event/hLP94S.hidden HTTP/1.0” 200 2 “-” “close”
2a01:4f9:3a:2b9c::2 - - [17/Sep/2021:13:25:57 0200] “POST /240DB144CE3B3B284497F442F5F4FA3B2B77BAE18F2C5B2C9C702AF58D55EF11/comm/event/HQOLww.hidden HTTP/1.0” 200 2 “-” “close”
2a01:4f9:3a:2b9c::2 - - [17/Sep/2021:13:25:57 0200] “POST /240DB144CE3B3B284497F442F5F4FA3B2B77BAE18F2C5B2C9C702AF58D55EF11/comm/event/kNAKXh.shown HTTP/1.0” 200 931 “-” “close”

as a followup; same webapp running as sudo, has extra log entries that do not show up in logging when run as normal user, “rowdata”:

2a01:4f9:3a:2b9c::2 - - [17/Sep/2021:13:32:15 0200] “POST /FEB0961F057C9136BDD520B721814717E95557285FF3013302875800602F88F9/data/Q957fv/rowdata HTTP/1.0” 200 57 “-” “close”