Strange HandleURL issue

Hi all,
I’ve been developing server side apps deployed to XojoCloud for some time but I’ve just come across a strange issue.

I have a very simple app that works on a local network between a desktop app and a web app.

When I deploy to XojoCloud, I’m seeing a request 200 status being returned to the desktop app, but there are issues displaying my data on the web app.

Basically I have a simple endpoint setup in HandleURL:

#Pragma BackgroundTasks False

select case request.Path
case "POCSAG_Input"
  LatestData = request.Body
  response.Write "Data received"
  response.Status = 200// Created
  return true
end select

On my main webpage I have a timer with a period of 200ms running this:

if app.LatestData <> "" then
  app.LatestData = ""
end if

Works fine and populates my listbox on the local network but doesn’t display anything when deployed on XojoCloud.

Did you happen to forget to change the url ?

I wish. I actually get a 200 response on my sender app, so at least I know the data is getting to the handleURL and the response is being generated, I’m also using https for the push as cloud needs a secure connection… Just really hard to debug, because this is how I usually display stuff as I build.

and if you debug log the request content ? do you get what you expect?

When deploying to Xojo Cloud, one instance of your app will be running for each (v)CPU available.
Your desktop app might be polling one instance while your browser is polling another.


How do I read the debug log on Xojo cloud?

That certainly could be it. I keep forgetting about this. I guess I’ll just have to spin up an SQL DB to hold my data and poll from there. Is this what most people do?

Storing data in a SQLite db would be ideal for this use case.

1 Like