microg / microg/IchnaeaNlpBackend

Daily limit hit

Open
#48 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
124
Forks
29
PR merge metrics
No merged PRs in 30d

Description

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](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?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the Mozilla backend source that builds the location.services.mozilla.com/v1/geolocate request and handles the daily-limit response. Determine how API keys are currently supplied; done would require a decided, documented approach for avoiding the shared limit, such as supporting user-provided keys.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
api, backend, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.