Ran Narrative Web today got the following error message for Heatmaps and Places.
"Referer is required by tile usage policy of Openstreetmap’s volunteer-run servers: osm.wiki/Blocked
Looking this up gives
Referer is required
If and only if the tile mentions “Referer is required” then you were automatically blocked because your application/website is not sending HTTP Referer headers, but doing so is required by the tile usage policy. This block will resolve itself once you make the necessary changes to your application, without further intervention necessary.
For websites/web applications, this can be fixed by setting your Referrer-Policy header to any of no-referrer-when-downgrade, origin, origin-when-cross-origin, strict-origin, or strict-origin-when-cross-origin.
In map libraries, such as Leaflet, you can specify an option referrerPolicy for the OSM layer.
Has anybody else come across this if so is there a fix
Hi, This also happened with another genealogy software I use and programs that use Openstreet maps as they seem to have clamped down on usage terms. Not sure if any have resolved the issues as one program I use still has a large area down the middle of the UK not accessable for GPS data & map tracking.
Thanks for that, have tried looking for a fix but so far they appear to
me as if written in Swahili (no insult intended to Swahili speakers).
Will carry on looking for the “For Dummies” version.
phil
My NarrativeWeb was generated with Gramps 6.0.8. I use Firefox 155.0 on my Fedora 44 Linux machine.
I just checked that the request for a place include a Referer:https://localhost/…/places.html HTTP header. The page for the place displays with the OpenStreetMap. Same when I reference a place from a person or family, Referer is included.
Referrer policy is strict-origin-when-cross-origin.
I see you are under 6.0.6. There might have been a fix; I didn’t check in my local Git repo.
I am now somewhat convinced it is not a GRAMPS issue on Chromium it
works just fine with exactly the same Referer Policy as on Firefox.
Your assurance about working with 155 ver Firefox leads me to suspect my
settings on Firefox.
Where did you add your localhost setting
phil
Nowhere. The referrer policy was reported by the Firefox debug tools. I was not even aware of this setting. As a general rule, for reliability and stability, I try not to customise applications except when I really need it And in this case, I proceed with Preferences, not through about:config.
My NarrativeWeb is served by NginX. The configuration has no parameter for origin/cross-origin. So, this is internal to Firefox.
I was beginning to suspect you were using a local webserver and hence
the difference I am opening the file locally no server connections
except when I look for Maps using OSM tiles.
The issue I cannot resolve yet is why Chromium works and Firefox does
not will continue pursuing this. Have looked at the Openstreet forum
where this has been raised and they admit they have no fix to date in
fact some people have given and changed mapping site.
phil
Have had conversation on Openstreet Community Forum a couple of people
have confirmed that it will not work on Firefox and there is currently
no fix suggestion available via them.
So now I will move to communicating with the Firefox community although
previous experience here was not always good will give it a try and
report back.
phil
After a suggestion from a respondent on OpenStreetMap
Work round for Firefox not opening local files with OpenStreetMap tiles.
The issue is the Firefox “User Agent” not allowing Referer Policy to
work and a solution is to change it for the Chrome User Agent
This is only a partial fix because although the map is visible depending
on Scrolling In/Out the error message can appear and eventually the map
disappear.
Implementation Steps
CTRL+SHIFT+M takes you to the Responsive Design Mode
Alternatively goto More Tools, Responsive Design Mode
Which Displays another MenuBar
Goto Settings (Gear Cog between Camera and Close icons right hand end
menubar)
Select Show User Agent
Click Up/Down Arrows next to UA Custom User Agent Box
Select Chrome
You will then have to sort your screen size at left hand end of menubar.
This is really all about accommodating mobile phones.
phil
I went to my NarrativeWeb with File → Open File and I get your behaviour: no OSM map display.
I understand now why my relatives to whom I sent my NW tree could not see the maps (they are not computer-oriented and totally unable to set up a server; so they open files with their browsers). I also understand why my Gramps demos for local genealogy clubs did not work when maps were concerned: I made a fleshed-out copy on my laptop without setting up a server.
Patrick
Your uses are I suspect precisely why Narrative Web Report was
implemented as it is and is how I use it. For the none computer literate
population.
Dave
So on my version of Firefox once configured (unless you specifically
revert) it is retained as the default
I think I will just use Chromium for this, for the foreseeable future
phil
Please waste no more time on this just received via OpenstreetMap Forum
"Chrome UA should have been blocked in this instance, it will now be
blocked.
The error response image/message incorrect and now correctly sends: `403
Access denied(not403r`). The curl tests do not pass the valid
Chrome / Firefox checks.
For file:// and similar where a Referer is not sent, we expect a X-Requested-With request header which identifies the app or service
requesting the tiles. A browser CORS preflight is an unfortunate side
effect, but is now correctly and cheaply handled at the CDN edge."
No idea what the second para means yet
How can this be brought to the attention of the GRAMPS maintainer of
Narrative Web Report and also anybody else using mapping functions.
phil
Could you please give more details about the stance? I tried Ctrl+Shift+M, opened file index.html in another tab then navigated to a place page but the map didn’t show up.
Suspect I might be the guilty party here I asked the question on
Openstreet Forum why it worked in Chromium but not Firefox eventually
one of the members came on to explain it should not work on any browser
Chromium included and I had exposed a weakness in their system which he
proceeded to fix so now it will not work on any browser when you use a
local file.
This is a result of bot attacks in the last year or so.
There is a way of conforming but first impressions would be this is a
substantial piece of coding to be altered in a range of GRAMPS sub
programs ie everywhere that calls OSM from the Narrative Web Report.
Apologies mea culpa
phil