pure-maps icon indicating copy to clipboard operation
pure-maps copied to clipboard

loading style failed: Connection refused when loading while offline, but map works

Open prurigro opened this issue 3 years ago • 7 comments

I have Pure Maps connected to OSM Scout Server in offline mode. When I start Pure Maps normally everything boots up correctly, but when I'm not connected to wifi Pure Maps loads with the error "loading style failed: Connection refused". If I click out of the error screen the map is visible and everything works correctly. I tried wiping pure maps settings and set it up again but I hit the same issue.

I'm using the flatpak versions of both.

Thanks!

prurigro avatar Jun 22 '22 18:06 prurigro

I presume you are using Offline mode in Pure Maps. Try to start OSM Scout Server as a separate app and open Pure Maps. Do you see access by Pure Maps in the server logs (shown on main display). To see more logs, you may have to enable extra logging in the server settings.

While tiles can be cached, try to search in offline mode. Do logs in the server show access?

On older Qt (5.6), there is a problem with changes in local access in the absence of network. I wonder if something similar is going on here as well. Which OS do you have?

rinigus avatar Jun 22 '22 20:06 rinigus

Hey, apologies for the delay, yes I get a ton of requests in the scout server log when I search or pan. The OS is Arch Linux ARM on Mobile (https://github.com/dreemurrs-embedded/Pine64-Arch), but I'm using the flatpak versions which have their own libraries.

I did notice that the initial load doesn't add anything to the OSM scout server logs-- those entries only start to appear once click back from the error and start to use the map.

prurigro avatar Jul 18 '22 16:07 prurigro

Rather odd, but I don't know how to help you out. You can try to restart OSM Scout Server and then access it using one of the APIs from your browser. For example, http://localhost:8553/v1/poi_types . I wonder if it also has the same issue - failing on first connection

rinigus avatar Jul 18 '22 19:07 rinigus

I just checked and I get a long list of POIs when I hit that address in the browser.

I did a bunch of additional testing-- with OSM scout server running by no network connection, I get the error message 100% of the time when pure maps starts up, and then it works perfectly 100% of the time after I close it. Is it possible there's a non-local connection being made on startup before relying on the OSM scout server despite being in offline mode?

prurigro avatar Jul 22 '22 14:07 prurigro

If you have set Pure Maps to offline, it should use only localhost for connections. Would have to think how to check it, maybe you could look it up?

rinigus avatar Jul 22 '22 17:07 rinigus

Hmm, so using the tool I'm familiar with I'm only able to see successful network connections, meaning that when wifi is disabled I only catch the successful local connections being made to osm scout server. I tried enabling wifi and watching for unexpected connections though, and the only non-local connection made on startup seems to be to mozilla location services (which might be happening at the system level to detect my location?). Aside from that, in theory there shouldn't be any difference between me running it without wifi or with, yet without gives me that error screen and with doesn't.

prurigro avatar Jul 22 '22 18:07 prurigro

for example something along the lines of https://unix.stackexchange.com/questions/375387/how-to-trace-networking-activity-of-a-command

rinigus avatar Jul 22 '22 18:07 rinigus

Closing as stale

rinigus avatar Jan 21 '23 16:01 rinigus