Entering user location no longer works

Environment

Discourse Version: 2.7.0.beta1 ( 5f846531a5 )

Plugin Commit: e18de2a

Other Plugins
Name Version Enabled?
discourse-affiliate 0.2 Y
discourse-data-explorer 0.2 Y
discourse-locations 0.1 Y
discourse-yearly-review 0.1 Y
docker_manager 0.1 Y
styleguide 0.2 N

Steps to Reproduce

1a. Start typing the location in the user’s profile
1b. Nothing happens

  1. Changing the location geocoding provider to any of the available choices results in an error.

Example

In the user’s preferences, i.e. /u/username/preferences/profile

Logs

Message (2 copies reported)

MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-ASN.mmdb) could not be found: No such file or directory @ rb_sysopen - /var/www/discourse/vendor/data/GeoLite2-ASN.mmdb

Backtrace

/var/www/discourse/lib/discourse_ip_info.rb:81:in rescue in mmdb_load' /var/www/discourse/lib/discourse_ip_info.rb:77:in mmdb_load’
/var/www/discourse/lib/discourse_ip_info.rb:15:in open_db' /var/www/discourse/lib/discourse_ip_info.rb:10:in initialize’
/usr/local/lib/ruby/2.7.0/singleton.rb:125:in new' /usr/local/lib/ruby/2.7.0/singleton.rb:125:in block in instance’
/usr/local/lib/ruby/2.7.0/singleton.rb:123:in synchronize' /usr/local/lib/ruby/2.7.0/singleton.rb:123:in instance’
/var/www/discourse/lib/discourse_ip_info.rb:149:in get' /var/www/discourse/app/serializers/concerns/user_auth_tokens_mixin.rb:22:in location’

Screenshot:
https://d11a6trkgmumsb.cloudfront.net/original/3X/6/a/6a998da9b5bc10825397742a49e41597c4e75197.png

1 Like

If I change the provider from ‘nominatim’ to ‘mapquest’ and back I get no error.

The issue is you may need an API key.

It looks like Mapquest is the only one that can be selected without an error. However, the problem persists even with Mapquest selected - there is no lookup happening in the user’s Map Location field.

EDIT: I tried with an API key from Mapquest and nominatim and mapquest as the providers, but still no lookup in the user’s field.

The error is likely to be you not being permitted to use the service without an API key

nominatim is working for me on User Page

Check your server logs for denial of access to service.

1 Like

Yes, there is an error:
GeocoderError (Your request was denied. If the problem persists, contact your site administrator.)

But I do have an API key from Mapquest. So what to do?

Could be related to this:

Is there a Callback URL for the Mapquest API to set in Discourse?

I don’t believe so.

Please check with MapQuest concerning your quota?

I had it without an API using nominatim before. I’ll have to poke around to see where I can find any info about a quota.

If you switch it to MapQuest without a key, it will error.

Now you are confusing me

Which service are you using and which is erroring?

nominatim is working for me, though likely they will also have rate limits.

Heh. :slight_smile:

  • Previously, working fine without an API key was nominatim.
  • Currently, none of the providers are working - there is no lookup happening.
  • I obtained an API key today from Mapquest and I can save the nominatim and mapquest as providers without an error, but the lookup in the user field is still not working.

This is on latest for me with Nominatim, after typing Liverpool:

Looks like you’ve got some denial of service?

With or without an API key?

without

1 Like

That was dev server though … let me confirm again on a Production server, same provider …

There is no error in the log for this action.

MapQuest with valid key

Yeah, on user page I think it’s failing silently, go by the server error on the settings change

Consumer Key or Consumer Secret?