microg / IchnaeaNlpBackend

Backend for UnifiedNlp that uses Mozilla Location Service for geolocation.
116 stars 29 forks source link

Daily limit hit #48

Open ghost opened 5 years ago

ghost commented 5 years ago

When I tried to use location service on my phone today I noticed that UnifiedNlp did not work. I was using Mozilla backend so I switched to GSM location service and everything worked again. I then investigated a little more and I found a warning from logcat:

W OkHttpClient: A connection to https://location.services.mozilla.com/ was leaked. Did you forget to close a response body?

So I searched your source code and found the url the backend tries to visit should be https://location.services.mozilla.com/v1/geolocate?key=068ab754-c06b-473d-a1e5-60e7b1a2eb77. When I opened this url in my browser I got this response:

{"error":{"code":403,"message":"You have exceeded your daily limit.","errors":[{"domain":"usageLimits","message":"You have exceeded your daily limit.","reason":"dailyLimitExceeded"}]}}

So apparently there are too many visits to Mozilla's location service using the same API key.

Is there a way to avoid this? For example, let user register for their own keys?