astuder / lightroom-map-fix

Fixing the Map module in Lightroom Classic
125 stars 17 forks source link

MAP Error: Too many requests #25

Open quaid42 opened 4 years ago

quaid42 commented 4 years ago

I've applied your wonderful solution, thanks so much for your work! The map module has started working again, however, after significant - but not excessive - usage, the error "MAP Error: Too many requests" is displayed in two cases:

  1. Scrolling the map. Despite the error, scrolling still works.
  2. Searching for places. This does not work when the error occurs.

The solution for 2 seems to either wait a few minutes - I couldn't determine how long the required wait is - or to restart LR. Although I'm not fully sure whether the restart was actually a solution, it might have coincided with the long enough wait time.

I have checked the the measured number of requests against the API contingents and they're all well within the allowed limits. So I'm wondering why I get the error.

An interesting point which might or might not be relevant: 4xx errors were shown for the "Maps Elevation API", which you don't mention in your solution. I activated this API and it definitely receives requests from LR, too. Could this have something to do with the error message?

I'm using LR 6.14 on macOS Mojave.

astuder commented 4 years ago

I haven't run into this issue myself. But I use Lightroom very lightly these days. Maybe check your billing details and the configuration of your license key restrictions. https://github.com/astuder/lightroom-map-fix/#google-billing

quaid42 commented 4 years ago

I did check the configuration while creating it and again when I encountered the error. The license key restrictions are configured as per your documentation and the billing details are also correct.

What do you make of the requests LR sends to the Maps Elevation API, are they relevant in any way? I wondered whether these requests might require patching an additional Lua module with my API key.

astuder commented 4 years ago

I don't know. I don't have that API activated on my account.

astuder commented 4 years ago

PS: Check the note on the top of this page https://developers.google.com/maps/documentation/elevation/start

astuder commented 4 years ago

PS2: There are many references to the Elevation API in the LRModule and the JavaScript checks for the availability of that service in multiple places. Don't know what would trigger it for you as this is not a problem on my installation. I don't see any elevation data on my geotagged photos.

quaid42 commented 4 years ago

The page you linked mentions (in the blue box): "This service is also available as part of the client-side Maps JavaScript API [...]", and this page seems to confirm that the Maps JavaScript API uses the ElevationService.

When I drop a picture onto a place in the Maps module, my LR 6.14 sets both GPS data and elevation data. That explains the calls to the Elevation API. And they obviously work, as can be seen from both the elevation data and the logged calls to the API. When I deactivate the Elevation API, only the GPS data is set - as in your configuration.

I'm tending to think that the usage of this API is more likely to be unrelated to the error I'm seeing. Or maybe not, I'm not able to see or read the code and wouldn't know either way ;)