Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: No Nominatim geocoding service. in any person form #3992

Closed
1 task done
odiea opened this issue May 11, 2024 · 9 comments
Closed
1 task done

[Bug]: No Nominatim geocoding service. in any person form #3992

odiea opened this issue May 11, 2024 · 9 comments
Assignees
Labels
bug CodeIgniter4 Issue relates to the conversion to CodeIgniter 4
Milestone

Comments

@odiea
Copy link
Collaborator

odiea commented May 11, 2024

Bug Description?

Try adding a zip code to any person form.
Access blocked
You have been blocked because you have violated the usage policy of OSM's Nominatim geocoding service. Please be aware that OSM's resources are limited and shared between many users. The usage policy is there to ensure that the service remains usable for everybody.

Please review the terms and make sure that your software adheres to the terms. You should in particular verify that you have set a custom HTTP referrer or HTTP user agent that identifies your application, and that you are not overusing the service with massive bulk requests.

If you feel that this block is unjustified or remains after you have adopted your usage, you may contact the Nominatim system administrator at nominatim@openstreetmap.org to have this block lifted.

Steps to Reproduce?

Same as above

Expected Behavior?

Zip should show Info.

OpensourcePOS Version

development (unreleased)

Php version

Php 8.2

What browsers are you seeing the problem on?

No response

Server Operating System and version

Wamp Server

Database Management System and version

Mysql

Web Server and version

Wamp Server

System Information Report (optional)

System Information Report

Unmodified copy of OpensourcePOS

  • I agree this copy has not been modified
@odiea odiea added the bug label May 11, 2024
@jekkos jekkos self-assigned this May 11, 2024
@jekkos jekkos added the CodeIgniter4 Issue relates to the conversion to CodeIgniter 4 label May 11, 2024
@jekkos
Copy link
Member

jekkos commented May 11, 2024

Their rate limit is 1 request per second. Maybe they also require to add a referral header now.

@jekkos
Copy link
Member

jekkos commented May 12, 2024

I tried this now on dev and the form works as expected. Maybe they just temporarily block you because you make too many requrests at a time. I can increase the delay to abide their usage policy, one request per second max.

@jekkos
Copy link
Member

jekkos commented May 12, 2024

It seems that the rate limitation is already set to 1s. Another recommendation is to set the referrer or user agent in the request. Alas this cannot be done if the call is made from a browser. So this means that it might need to be done from the backend instead, this way we also have more control over the rate at which the calls go out to this exernal API

@odiea are you able to reproduce this issue ?

@odiea
Copy link
Collaborator Author

odiea commented May 12, 2024

This is the second time in the last year that I have tested this feature.

Access blocked
You have been blocked because you have violated the usage policy of OSM's Nominatim geocoding service. Please be aware that OSM's resources are limited and shared between many users. The usage policy is there to ensure that the service remains usable for everybody.

Please review the terms and make sure that your software adheres to the terms. You should in particular verify that you have set a custom HTTP referrer or HTTP user agent that identifies your application, and that you are not overusing the service with massive bulk requests.

If you feel that this block is unjustified or remains after you have adopted your usage, you may contact the Nominatim system administrator at nominatim@openstreetmap.org to have this block lifted.

@odiea
Copy link
Collaborator Author

odiea commented May 12, 2024

I just tried the dev demo and get the same access blocked. Damn thing worked when I used a vpn.

@jekkos
Copy link
Member

jekkos commented May 13, 2024

@odiea that might be as expected, my guess is that your specific IP was blocked by nominatim. In fact it does not matter whether you use the service locally or from dev. In this case it's your browser that makes the call so for nominatim, the IP is the same.

So that is probably the reason why it's still working for me. In their error message they mention that you can request to unblock you. You could try to circumvent the block by power cycling your modem. This should give you a new IP that is probably not on the blocklist.

I do wonder whether we should move this functionality to the backend. This would identify all logged in users as the same IP and that could make the experience worse as all logged in browsers need to be throttled to 1 request per second.

I don't think that they now have a way to distinguish which ones are using the same ospos install. That is why they want to have the referrer or user agent header included.

@odiea
Copy link
Collaborator Author

odiea commented May 13, 2024

I am not worried about this. I just test to see if is still working. My idea was to move it to the people /manage form so it does not get loaded with every module change.

@jekkos jekkos added this to the 3.4.0 milestone May 13, 2024
@odiea odiea closed this as completed May 25, 2024
@jekkos
Copy link
Member

jekkos commented May 26, 2024

I tested again and still working for me on dev. Does it work for you now as well?

@odiea
Copy link
Collaborator Author

odiea commented May 26, 2024

Yes it is working for me now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug CodeIgniter4 Issue relates to the conversion to CodeIgniter 4
Projects
None yet
Development

No branches or pull requests

2 participants