Comments (99)
OK, I fixed mine! π
It seems the March 2023 deprecation of some properties by Google was responsible: https://developers.google.com/maps/documentation/javascript/releases#3.52.5
Instead of playing with the LUA file to figure out how to update it and make it compatible with the new Maps API, I actually forced it to use the version from February 2023 (v3.51) instead. This is probably not meant to last (even less than the current fixes) but at least it buys us time until someone else does a "proper" fix, if relevant :)
Steps to follow:
- Open the great tutorial on https://github.com/astuder/lightroom-map-fix
- Follow or re-follow the same steps, and at Step 6, when patching the LOCATIONMAPVIEW.LUA resource, add the following replacement:
patchluastr.exe LOCATIONMAPVIEWpatched.LUA "sensor=false" "sensor=false&v=3.51" -o LOCATIONMAPVIEWpatchedandversioned.bin
. What this does is: look for calls to googleapis, and add a version parameter in the URL. I figured out "sensor=false" was there in the 3 URLs. I am not sure the 3 replacements are necessary.
In my case, on Windows, I patched the LUA resource that was already patched from @astuder 's previous instructions. The output of patchluastr.exe
is:
Processing LOCATIONMAPVIEWpatched.LUA.bin
Lua 5.1 detected
Lua settings: endian 1, int 4, size_t 8, instruction 4, number 4
119494 bytes read from file
Found 'sensor=false' at 10484
Found 'sensor=false' at 21170
Found 'sensor=false' at 21478
Updated 3 strings
119515 bytes written to LOCATIONMAPVIEWpatchedandversioned.bin
After replacing that repatched LUA resource in the Location.lrmodule, and restarting LR, my Map re-appeared.
Happy patching!
Warning: I just did it, and didn't thoroughly test all other geo features.
from lightroom-map-fix.
Thanks!
I did a few more tries and managed to get the Map module to work (for me) without forcing the Maps API version to 3.51. It would mean that it has a higher chance to survive the year 2024:
From your decompiled module TXT file, without inserting 3.51
in the API URL or at line 142, I did:
- Removed line 2651,
components.district = result.address_components[ comp ].long_name;
- Removed line 2657,
components.level3 = result.address_components[ comp ].long_name;
- Removed line 5536,
{ featureType: "administrative.neighborhood", elementType: "all", stylers: [ { lightness: -67 }, { gamma: 1.26 } ] }
I incrementally removed lines, therefore these 3 removals may not all be required.
from lightroom-map-fix.
Great work!
As the patching procedure is getting more complex, I guess it's time to update patchluastr
to do all the necessary steps in one go with just a patch file and the Google API key as command line parameters.
from lightroom-map-fix.
Yes it's still working for me. What can be different:
- Mac platform (with High Sierra)
- only @astuder original workaround (3 files patched)
Sorry if I can't help further
from lightroom-map-fix.
adrianstuder
done
from lightroom-map-fix.
Thanks @jbd7 !!
I played with the version number earlier, using the one from the GeoSetter thread. But I didn't think about using that new of an API version. I guess Google serves up the latest version if the requested version is too old.
There's Lua code that sets the preferred API version:
L33_1.last_stable = "3.12"
L33_1.latest_nightly = ""
L34_1 = L33_1.last_stable
L32_1.PREFERRED_API_VERSION = L34_1
L34_1 = L7_1.LocationModule_api_version
if not L34_1 then
L34_1 = L0_1.locationModule
L34_1 = L34_1.api_version
if not L34_1 then
L34_1 = L32_1.PREFERRED_API_VERSION
end
end
Which leads me to this new patch, which also works:
python patchluastr.py LOCATIONMAPVIEW.bin "3.12" "3.51" -o LOCATIONMAPVIEW-version.bin
Your patch works, probably because your version field comes first in the final URL, but I think this alternative is a bit cleaner.
from lightroom-map-fix.
The breaking change seems to be about removing some features, including
NEIGHBORHOOD
, which appears in the LUA module at line 1601 invar darkStyle
declaration, 4 lines before making a call to the API withnew google.maps.StyledMapType( darkStyle, styledMapOptions )
. I couldn't remove that line without rendering the resource file corrupt.
Good sleuthing!
To fix that it's probably easier to use the patch file option (-p
). Something along these lines should work to remove the offending property:
< { featureType: "administrative.province", elementType: "all", stylers: [ { lightness: -27 } ] },
> { featureType: "administrative.province", elementType: "all", stylers: [ { lightness: -27 } ] }
< { featureType: "administrative.neighborhood", elementType: "all", stylers: [ { lightness: -67 }, { gamma: 1.26 } ] }
>
See hacks section in the README for examples of how to use a patch file.
from lightroom-map-fix.
from lightroom-map-fix.
Oh, that's interesting about Geosetter. The two relevant tickets seem to be:
https://geosetter.de/mantis/view.php?id=2261
https://geosetter.de/mantis/view.php?id=2256
A quick search in location.lrmodule didn't bring up showMap3, but maybe there are similarities with our issue.
Unfortunately, I won't have time the next few days to dig deeper into this.
from lightroom-map-fix.
This may be related, but I no longer seem to be able to manually adjust the Country/State/City/Sublocation metadata fields for my photos. In the Grid/Loupe views, I can manually type something into those metadata fields, but upon hitting Enter, the application does not save my entries.
DISREGARD: I restarted Lightroom and the Metadata panel works as intended. Just a weird glitch.
from lightroom-map-fix.
from lightroom-map-fix.
No real progress so far, but a short update of what I've tried so far:
I used unluac to decompile the Lua files. While the decompiler works, unfortunately the output is hard to read. I also wasn't able to recompile. Based on the Lua source, there seems to be some kind of debug console that can be enabled. No success to do that so far.
I dug into Lightroom and associated dll's using Ghidra. There are a few useful symbols which helps finding areas of interest. The Lua engine is implemented in AgKernel.dll
and initialized in wichitafoundation.dll
. Tried to set the value of the DEBUG
Lua variable to True by patching wichitafoundation.dll
, unfortunately without any effect.
I patched the window.onerror
functions in LOCATIONMAPVIEW.LUA to display a pop-up with alert()
. This only shows a message box when pressing the CTRL key, but nothing while launching the map module. I think this indicates that the map view window gets initialized, but still no clue where and why it fails.
from lightroom-map-fix.
DANGER ZONE !!!
For those playing along at home, this patch file will display the JavaScript code behind the map view. This patch breaks the map module, so make triple-sure that you have a backup!
# Dump styles and javascript in map view, this will break the map module!!
# patchluastr.py LOCATIONMAPVIEW.LUA -p dumpscript.patch -o LOCATIONMAPVIEW-dumpscript.bin
< <script
> <pre
< </script
> </pre
< <style
> <pre
< </style
> </pre
Anyone with experience integrating GoogleMaps seeing an obvious issue? The Google Maps URL does return the JS, though that even works with an invalid key
I see that the URL includes Adobe's signature, which we had to patch out for reverse-geocoding to work. Don't know where that's coming from or whether it's relevant. (nevermind, I forgot to apply the nature->street patch)
Any ideas on how to copy & paste that code? Currently hotkeys and right-click are captured by Lightroom.
from lightroom-map-fix.
Interesting! I haven't been using the map module in a while now, but I'll see what I can figure out.
From reading the error descriptions, it sounds like we'll have to rewrite the complete Javascript map code in Lightroom, updating it to the current version of Google Maps, AND write a layer around it to make Lightroom think we're still in the old Google Maps. So, not trivial, but I haven't looked yet, so cross your fingers.
from lightroom-map-fix.
I just confirmed with alert boxes that GoogleMaps invokes initialize (twice), and that it runs to completion without throwing exceptions.
from lightroom-map-fix.
@astuder I haven't tried this, but what if you use
<textarea>
instead of\<pre\>
?
I managed to mark the text with the mouse and drag & drop it into Notepad. Now thinking about how I can get Lightroom to output the full HTML :) ...maybe CDATA?
from lightroom-map-fix.
This works to get full source of the map view (minus HTML tags at start and end):
< <html>
> <html><textarea><![CDATA[
< </html>
> ]]></textarea></html>
As mentioned above, the text can be copied by marking it with the mouse and drag & dropping it into a text editor.
Hopefully this helps with tracking down where things break.
from lightroom-map-fix.
For those playing along at home, I just figured out how to enable the debug log:
- In Lightroom, go to
Help > System Info
and findSettings Folder
- In that folder, create a new file named
config.lua
with the following text content:
loggers["Location"] = {
logLevel = 'trace',
action = 'logfile',
}
- Restart Lightroom and you will see log files in your user's
Documents
folder (Windows, might be somewhere else on Mac)
There are a few ERROR entries, though not sure how to interpret them. Log level trace
can be replaced with debug
for different output.
from lightroom-map-fix.
Thanks, I had checked before to post the files
from lightroom-map-fix.
I didn't want to install Python on windows
patchluastr.exe
also supports the -p option, no need to install Python.
from lightroom-map-fix.
Great work!
As the patching procedure is getting more complex, I guess it's time to update
patchluastr
to do all the necessary steps in one go with just a patch file and the Google API key as command line parameters.
Has this been done? I've got Lightroom patched with the current lightroom-map-fix, but am having the blank map issues caused by the change in Google Maps API mentioned in this thread. It's been a long time since I did the original fix and am not confident in my use of Python. Is it possible to update the .exe to help make this process more dummy-resistant? :)
EDIT: I didn't use the patchluastr.exe when applying this fix a few years ago. However, I just read up on it and tried it with great success (cue: Borat GIF). Thanks a ton to this community for helping to keep this software limping along so many years after Adobe abandoned us for more cash.
from lightroom-map-fix.
That's unfortunate... I hoped to procrastinate on this until at least February 2024 :(
I tried removing the deprecated attributes as @jbd7 did above. Unfortunately, that didn't fix it for me. Even when forcing the version to the one active in early 2023 (tried 3.52 and 3.52.1).
I see in the release notes of the Google Maps JavaScript API, that more attributes were removed later on, but I hoped to circumvent that with selecting the older version.
@jbd7 does your map module still work?
Attached the patch file implementing the (non-working) changes discussed above.
jbd7.patch
from lightroom-map-fix.
@jbd7 does your map module still work?
I finally moved on from Win8.1 and had to upgrade my whole setup, I am now with LR12.
Sorry, I don't need to play with LUA hacks anymore ...
I can only encourage you to try making the Map module work. I don't do anything in LR12 that I couldn't do in LR6, apart from occasional AI-powered background/subject selection, and the Dehaze slider needing less clicks than the old version as a plugin.
from lightroom-map-fix.
from lightroom-map-fix.
Kudos to Astruder for the fantastic work here.
As Google is changing there APIs with no backward-compatability: It would be perfect for me if Lightroom 6.14 could work with Openstreetmap or alike in conjunction with GPS.
from lightroom-map-fix.
Same here on Windows 11. Google first showed error in the account console and Lightroom showed βrequest deniedβ but now it just doesnβt work anymore
from lightroom-map-fix.
Uh, oh! SaaS bit rot may finally catch up with us. π’
I also get the blank screen. But didn't get a "request denied" message and don't see errors in the Google cloud account console. The only thing I see in the cloud console, is that there are calls to the Geocoding API but no calls to the Maps Javascript API. I see both calls on Feb19 when I last used Lightroom maps.
If anyone has more details about error messages, or maybe even a HTTP logs, please share. But don't forget to redact API keys.
from lightroom-map-fix.
I wonder if this is related to deprecation of Google Maps JavaScript API V2
https://developers.google.com/maps/documentation/javascript/v2tov3
from lightroom-map-fix.
But they say V2 was made unavailable in May 2021β¦ also the OSM hack does not work anymore: bottom left menu does only show LR original map styles
from lightroom-map-fix.
I looked at this today, and can't figure out where it fails. It seems that it fails creating the map view even before calling Google.
Can everyone that encounters the issue please state their platform? I'm on Windows 11 like Peter. Any Mac users?
from lightroom-map-fix.
Same thing with me on Windows 11.
from lightroom-map-fix.
I'm still on WIndows 10 and have the same symptoms with LR6. I noticed in my Google cloud console that there was a recommendation that I restrict my key to adobe.com, which I don't recall seeing before. Is LR6 actually sending the request to Google via adobe.com, and Adobe have now blocked it; but that doesn't make any sense to me and wouldn't explain why the OSM hack fails
from lightroom-map-fix.
Exactly the same on my PC with Windows 10 π’ Only the reverse geocoding ("LR adresss suggestions") still works for the GPS data in the picture. Map search however e.g. for the state name doesn't work as well. I just looked on the google maps platform and my last recognized requests to MapsJavaScript API have been on Thursday 23. Feb. , without any errors recordet at that time and since then...
from lightroom-map-fix.
Any Mac users? Never mind, just noticed that the original poster is running on Mac. So definitely not a platform issue.
@teskeyn do you have more details about the recommendation regarding key restriction? A newly enforced security measure (like CORS) sounds like a "good" candidate.
from lightroom-map-fix.
@teskeyn: interestingly the old Geosetter now also does not work anymore - map requests end with "01.03.2023 15:51:12 ERROR: Could not complete the operation due to error 80020101
showMap3(2, 4, 45.4741962777, 9.1738253847, 10);"
from lightroom-map-fix.
from lightroom-map-fix.
Just chiming in to say that I'm also experiencing this issue with Windows 10 and Lightroom Classic 6.13.
This fix has allowed me to keep using this paid-for software for far longer than Adobe would have otherwise allowed, so I appreciate all the hard work of this community!
from lightroom-map-fix.
Arrghhhh this fix was so nice, I will stay tuned if someone find another workaround.
As we are all trying to make LR works the way we bought it, for Mac users I managed to make face recognition works even in march 23 ;)
from lightroom-map-fix.
Also, what's up with http://app-storage:51000
? Is that a general browser/JS feature or specific to Lightroom?
from lightroom-map-fix.
Any ideas on how to copy & paste that code? Currently hotkeys and right-click are captured by Lightroom.
The Microsoft OCR engine doesn't seem to work at all for source code. Google Drive works better, but you still have to fix the line breaks in some places. I saved the image to Google Drive and right-click > Open with > Google Docs.
Edite: deleted the source code, just to be sure to avoid any copyright concerns.
from lightroom-map-fix.
@astuder I haven't tried this, but what if you use <textarea>
instead of <pre>
?
from lightroom-map-fix.
Hi, I have same issue with LR6.14 / Windows 10. My API is not restricted and no error showed on Google panel. Also, when I go to map section in LR, the last position name (city) I used one month ago i click is showed on top right corner.
if this information can be usefull, and each time I try to show picture, I have one more connection in my google statistic panel. That's mean LR use well the API, but not show the map.
Hope the community find a solution.
from lightroom-map-fix.
Well, that sucks.. the view as standalone HTML page works (after editing app-storage URL to point to Google Maps) :-/
from lightroom-map-fix.
After extracting the missing JS libraries with ResourceHacker, there's only one error not related to failed calls to the Lightroom backend:
Uncaught TypeError: projection is null
getExtendedBounds file:///C:/Users/adrian/OneDrive/Code/Projects/lightroom-map-fix/mapview/markerclusterer.js:570
MarkerClusterer file:///C:/Users/adrian/OneDrive/Code/Projects/lightroom-map-fix/mapview/markerclusterer.js:217
Here's the failing code:
/**
* Extends a bounds object by the grid size.
*
* @param {google.maps.LatLngBounds} bounds The bounds to extend.
* @return {google.maps.LatLngBounds} The extended bounds.
*/
MarkerClusterer.prototype.getExtendedBounds = function(bounds) {
[..]
var projection = this.getProjection();
[..]
// Convert the points to pixels and the extend out by the grid size.
var trPix = projection.fromLatLngToDivPixel(tr);
I'm not familiar with Google Maps, but I think this.getProjection() is an API call to Google's code.
from lightroom-map-fix.
Ok, that was a red herring.. after fixing the escaping of the version number requested from Google Maps (v3.12) the error disappears. I now get a warning:
Google Maps JavaScript API warning: RetiredVersion https://developers.google.com/maps/documentation/javascript/error-messages#retired-version
But, the same warning is shown when using the version mentioned in the GeoSetter threads (v3.47). So I don't think that's the issue.
Next step probably requires digging into the Lua code.
from lightroom-map-fix.
Breaking news : it works again, I think the only thing I did was to connect to my google console account (I never do that) and make another billing account. Even if I don't know what it is :)
from lightroom-map-fix.
from lightroom-map-fix.
You have to know that I'm very bad at google's thing and I had no idea of what I meant to do.
So connection to console.google
I saw that my billing account was with a red flag. Maybe I click on manage and then renew it (maybe or something like that I don't have this menu any more). I remember that the red flag become orange or green (not red for sure).
If I knew it was going to work I would have make some screenshot.
from lightroom-map-fix.
Maybe something : I only used the first part of @astuder workaround (it was in 2019 I think ;)
from lightroom-map-fix.
Always not work for me. My google console is green. No problem. Payment card active.
Very strange !
Hope somebody find a solution for all.
from lightroom-map-fix.
Hi
I try to delete my current credit card, by another. no map
I try to desactivate the 2 API. Error message in LR with no found google account... And re-activate them. no map.
Perhaps we need te generated a new google key ? someone has tested this way ?
from lightroom-map-fix.
You have to know that I'm very bad at google's thing and I had no idea of what I meant to do.
@cyr06 if you go to https://console.cloud.google.com/logs , you might see what changes you made to your account.
from lightroom-map-fix.
I tried enabling and disabling various stuff in the billing account and the project in Google Cloud console. Two times I happened to get a "Map error: request denied" in Lightroom and I got two errors in the Geocoding API error count in the console. The error count is also increased if I search for a place name that the API doesn't find. If I search for a valid place name, there's no error and Lightroom confirms the address. The request count in the console is increased.
However, the request count in the Maps JavaScript API is never increased by Lightroom. I'm able to access both APIs using the API key via https://maps.googleapis.com/maps/api/js?key=...&callback=...
and https://maps.googleapis.com/maps/api/geocode/json?address=...&key=...
. Both geocoding and maps work and the request counts are increased this way.
from lightroom-map-fix.
You have to know that I'm very bad at google's thing and I had no idea of what I meant to do.
@cyr06 if you go to https://console.cloud.google.com/logs , you might see what changes you made to your account.
my log is empty ... :(
from lightroom-map-fix.
my log is empty ... :(
Did you notice that it only shows last hour or so? You can click Edit time
and select for example Last 7 days
.
from lightroom-map-fix.
I noticed but it was before I thought ;)
{
"protoPayload": {
"@type": "type.googleapis.com/google.cloud.audit.AuditLog",
"authenticationInfo": {
"principalEmail": « bbbb@jjjjj »
},
"requestMetadata": {
"callerIp": « xxxxxxxxxxxx »,
"requestAttributes": {},
"destinationAttributes": {}
},
"serviceName": "cloudbilling.googleapis.com",
"methodName": "AssignResourceToBillingAccount",
"authorizationInfo": [
{
"resource": "billingAccounts/xxxxxxxxxxΒ Β»,
"permission": "billing.resourceAssociations.create",
"granted": true,
"resourceAttributes": {}
},
{
"resource": "projects/xxxxx-xxxxxΒ Β»x,
"permission": "resourcemanager.projects.createBillingAssignment",
"granted": true,
"resourceAttributes": {}
},
{
"resource": "billingAccounts/xxxxxxxΒ Β»,
"permission": "billing.resourceAssociations.create",
"granted": true,
"resourceAttributes": {}
},
{
"resource": "projects/xxxxxΒ Β»xx,
"permission": "resourcemanager.projects.deleteBillingAssignment",
"granted": true,
"resourceAttributes": {}
},
{
"resource": "billingAccounts/xxxxxxΒ Β»,
"permission": "billing.resourceAssociations.delete",
"granted": true,
"resourceAttributes": {}
}
],
"resourceName": "projects/lxxxxxΒ Β»,
"request": {
"billingAccountName": "billingAccounts/xxxxxxΒ Β»,
"resourceName": "projects/xxxxxxΒ Β»,
"@type": "type.googleapis.com/google.internal.cloudbilling.billingaccount.v1.AssignResourceToBillingAccountRequest"
}
},
"insertId": « xxxxxxx »,
"resource": {
"type": "project",
"labels": {
"project_id": « xxxxxx »
}
},
"timestamp": "2023-03-12Txxxxxx",
"severity": "NOTICE",
"logName": "projects/xxxxxxx/logs/cloudaudit.googleapis.com%2Factivity",
"receiveTimestamp": "2023-03-12Txxxx"
}
from lightroom-map-fix.
@cyr06 that log message, "AssignResourceToBillingAccount", comes from linking the billing account to the project. I checked by removing the billing and then adding it again to the project. I get the same kind of log message. Still no map in Lightroom. It's working normally for you now?
from lightroom-map-fix.
@cyr06 don't worry, I'm just dumbfounded myself too! I tried also using only the 3 necessary patches. No luck. I'm using Windows, but the OP is using Mac, so I guess that's not the problem either. I give up, but hopefully someone else can figure this out.
from lightroom-map-fix.
@cyr06 can you share your patched .lua files with me by email? I'd like to check whether a) they work with my Windows install, and if they do, b) investigate what's different compared to mine. adrian at adrianstuder dot com
from lightroom-map-fix.
Hi Astuder, I try your instruction. No new line in the file config.lua.
My setting location is "C:\Users\Thibault\AppData\Roaming\Adobe\Lightroom"
I restart few time, change picture, goes du development / map / .... nothing recorded in the file.
Attached my file (just add '.txt' to load attchment in this website.
config.lua.txt
from lightroom-map-fix.
Copied your file, and Works For Me (TM)
The log files are created in C:\Users\[login]\Documents
from lightroom-map-fix.
Copied your file, and Works For Me (TM)
The log files are created in
C:\Users\[login]\Documents
Works for me as well. A click on location information flag goes to Map module and creates 4 log files Location....log
from lightroom-map-fix.
adrianstuder
done
Thanks! I replaced the .lua files with yours, and the map still doesn't work. :(
Can you check in your Google Cloud Console if you see API calls around 14:50 PDT (UTC-7)?
from lightroom-map-fix.
My log is empty and I sent you the data of my console
from lightroom-map-fix.
OK, the lua file should be in setting folder, but the log are in Documents folder.
Attached my files.
AgGPSLocationSupport.log
LocationContentQueries.log
LocationSelectionController.log
LocationUndoActions.log
LocationViewController.log
from lightroom-map-fix.
Careful with posting logs. I didn't see any API keys, but you never know without going through them in detail.
from lightroom-map-fix.
@astuder Coming here after maps stop showing in LR. I had patched my Location.lrmodule
a long time ago and it helped very well so far, thanks!
Since this month, the Map view is empty but it only looks like the Display is off: looking for a location seem to work (searching for Berlin returns "Berlin, Germany", a black overlay popup looks like it's centering the map on it.) I. the Google console, I get hits on the Geocoding API, but 0 on Maps Javascript API.
I enabled the logging with
-- BEGIN
loggers["AgReverseGeocodeService"] = {
logLevel = 'trace',
action = 'logfile',
}
loggers["Location"] = {
logLevel = 'trace',
action = 'logfile',
}
-- END
and can see these files being generated:
23/03/2023 14:01 271,842 AgGPSLocationSupport.log
23/03/2023 14:02 1,908,336 AgReverseGeocodeService.log
23/03/2023 14:05 1,148 LocationContentQueries.log
23/03/2023 14:08 552,474 LocationMapView.log
23/03/2023 14:05 2,910 LocationSelectionController.log
23/03/2023 14:05 2,902 LocationViewController.log
My AgGPSLocationSupport.log looks like the one posted by @Tibashoult 3 days ago. I think the most interesting one is LocationMapView.log, it gains ~1 KB per second wile LR is open, and populates with these same 2 blocks:
03/23/2023 14:03:11 TRACE CALLBACK: clearJSResults
03/23/2023 14:03:13 TRACE callScript bounceMarker
03/23/2023 14:03:13 TRACE {
var markerId = "";
if ( bouncingMarker ) {
if ( bouncingMarker.setAnimation )
bouncingMarker.setAnimation( null );
bouncingMarker = null;
}
if ( markerId && markerId != "" && markersMap[ markerId ] ) {
bouncingMarker = markersMap[ markerId ];
if ( bouncingMarker && bouncingMarker.setAnimation && google.maps.Animation ) {
bouncingMarker.setAnimation( google.maps.Animation.BOUNCE );
}
}
}
03/23/2023 14:03:13 TRACE CALLBACK: clearJSResults
and
03/23/2023 14:11:32 TRACE CALLBACK: clearJSResults
03/23/2023 14:11:33 TRACE callScript
03/23/2023 14:11:33 TRACE if ( map != null ) {
var result = map.getBounds();
if( result != null ) {
var ne = result.getNorthEast();
var sw = result.getSouthWest();
callCallback( "sendJSResults", "012345F-4A64-42D1-B295-ABC123ABC123", ne.lat(), ne.lng(), sw.lat(), sw.lng() );
}
}
I didn't see any API key in the logs. I did a fair amount of geoencoding on the first week of Feb, didn't use the Maps module until yesterday, didn't modify my LR6 install, so I would guess something has changed on the Google API side in the past 6 weeks (possibly one of these changes: https://developers.google.com/maps/documentation/javascript/releases). I only see green ticks, no red flags, in my Google Console billing section. I updated my CC there (the Primary one was no longer active, but Google didn't seem to have noticed) and the monthly invoice a few cents (within free quota), but it didn't impact Lightroom.
Let me know if I can help further. I attach here the log from LocationMapView.log collected during the 10 seconds of the boot of LR6 directly into the Maps module, which remains empty.
LocationMapView - bootsequence.log
from lightroom-map-fix.
JDB7 many thanks guy.
I confirm, it's works.
Just a precision of your procedure, you should copy your file LOCATIONMAPVIEW.bin to LOCATIONMAPVIEWpatched.LUA and not use your (non patched) LOCATIONMAPVIEW.LUA to LOCATIONMAPVIEWpatchedLUA.
Just now to chekc how long this patched will be works (version 3.51 can be desactivated by google later ?).
from lightroom-map-fix.
Your patch works, probably because your version field comes first in the final URL, but I think this alternative is a bit cleaner.
Absolutely! I had not noticed there was a placeholder for the preferred API version.
I would also think that it could be possible to create a patch that doesn't force Location.lrmodule to use v3.51, which is bound to fail at some time (well, v3.12 was from 2013, so if we get another 10y out of this patch, it's still a small victory)(I would still recommend to move along with software releases, if you can :) ).
The breaking change introduced by v3.52.5 can be understood by looking at the code difference of the JS files (v3.51 vs v3.52.5). I've only spent an hour in the LocationMapView LUA resource, @astuder you would probably be able to tell how feasible it is. The breaking change seems to be about removing some features, including NEIGHBORHOOD
, which appears in the LUA module at line 1601 in var darkStyle
declaration, 4 lines before making a call to the API with new google.maps.StyledMapType( darkStyle, styledMapOptions )
. I couldn't remove that line without rendering the resource file corrupt.
What does it matter?
Only the last 4 versions are supported (12 months worth of updates), former ones are retired and if the requested version is not available, Google will serve the latest version. Source: https://groups.google.com/g/google-maps-js-api-v3-notify/c/3YkbMM9FWZ4.
It means that this patch may fail as soon as May 2024. If we stay in McGyver mode, we could try to host this v3.51 version publicly and patch the LUA module to fetch it instead of from Google servers, but it could make it fail in another way.
from lightroom-map-fix.
The breaking change seems to be about removing some features, including
NEIGHBORHOOD
, which appears in the LUA module at line 1601 invar darkStyle
declaration, 4 lines before making a call to the API withnew google.maps.StyledMapType( darkStyle, styledMapOptions )
. I couldn't remove that line without rendering the resource file corrupt.Good sleuthing!
To fix that it's probably easier to use the patch file option (
-p
). Something along these lines should work to remove the offending property:< { featureType: "administrative.province", elementType: "all", stylers: [ { lightness: -27 } ] }, > { featureType: "administrative.province", elementType: "all", stylers: [ { lightness: -27 } ] } < { featureType: "administrative.neighborhood", elementType: "all", stylers: [ { lightness: -67 }, { gamma: 1.26 } ] } >
See hacks section in the README for examples of how to use a patch file.
I just gave it a try. I didn't want to install Python on windows and realized that because a trailing comma in this array is still valid Javascript, I could just escape double quotes and replace that line with ""
, using your small patchluastr.exe
.
Unfortunately it's not that simple and doesn't work.
There are mentions of the deprecated features (administrative_area_level_2
etc) elsewhere in the LUA resource, but surrounded by binary data in Notead++. How do you get to see clean LUA code as in your snippet on #41 (comment) ? Is that somewhat editable and repackageable?
from lightroom-map-fix.
There are mentions of the deprecated features (
administrative_area_level_2
etc) elsewhere in the LUA resource, but surrounded by binary data in Notead++. How do you get to see clean LUA code as in your snippet on #41 (comment) ? Is that somewhat editable and repackageable?
Sorry, missed your question.
I used unluac to decompile the Lua files. Unfortunately, they don't directly recompile due to some broken syntax (goto not supported by Lua 5.1). Without that, I don't know if its as simple as recompiling and replacing the resource.
For your reference, below the decompiled output for LOCATIONMAPVIEW.
LOCATIONMAPVIEW.LUA.txt
from lightroom-map-fix.
That's a good idea, especially if you can leave the existing options allowing anyone to use the EXE file for custom patches.
Also, note that I've only tested the Map module loading on my machine once, it may be worth testing a bit more, for example on Mac, and within a tagging/editing Lightroom session, etc.
from lightroom-map-fix.
Hi guys,
I am very impressed about the work you have done.
I have less experience about the work you have done but I want to use the LR6 map module further.
In November 2020 I changed the location.lrmodule as described in the great tutorial on https://github.com/astuder/lightroom-map-fix, therefore I have an own API-key. But now I am a little confused what I have to do to reanimate the map modul once more.
Please help me ....
from lightroom-map-fix.
Following this worked for me:
#41 (comment)
from lightroom-map-fix.
Thanks a lot, the job is done and the map module runs :-)
from lightroom-map-fix.
OK, I fixed mine! π
It seems the March 2023 deprecation of some properties by Google was responsible: https://developers.google.com/maps/documentation/javascript/releases#3.52.5
Instead of playing with the LUA file to figure out how to update it and make it compatible with the new Maps API, I actually forced it to use the version from February 2023 (v3.51) instead. This is probably not meant to last (even less than the current fixes) but at least it buys us time until someone else does a "proper" fix, if relevant :)
Steps to follow:
* Open the great tutorial on https://github.com/astuder/lightroom-map-fix * Follow or re-follow the same steps, and at Step 6, when patching the LOCATIONMAPVIEW.LUA resource, add the following replacement: `patchluastr.exe LOCATIONMAPVIEWpatched.LUA "sensor=false" "sensor=false&v=3.51" -o LOCATIONMAPVIEWpatchedandversioned.bin` . What this does is: look for calls to googleapis, and add a version parameter in the URL. I figured out "sensor=false" was there in the 3 URLs. I am not sure the 3 replacements are necessary.
In my case, on Windows, I patched the LUA resource that was already patched from @astuder 's previous instructions. The output of
patchluastr.exe
is:Processing LOCATIONMAPVIEWpatched.LUA.bin Lua 5.1 detected Lua settings: endian 1, int 4, size_t 8, instruction 4, number 4 119494 bytes read from file Found 'sensor=false' at 10484 Found 'sensor=false' at 21170 Found 'sensor=false' at 21478 Updated 3 strings 119515 bytes written to LOCATIONMAPVIEWpatchedandversioned.bin
After replacing that repatched LUA resource in the Location.lrmodule, and restarting LR, my Map re-appeared.
Happy patching!
Warning: I just did it, and didn't thoroughly test all other geo features.
Great job! I also did on the already patched location.lrmodule - worked like a charm! Thank you very much!
from lightroom-map-fix.
Hoot!
Thanks to all who provided this fix.
I'm thinking about transitioning from LR to DigiKam and wanted to get all my metadata cleaned up before jumping into that mix.
chris
from lightroom-map-fix.
Thanks again for the March update( patchluastr.exe LOCATIONMAPVIEW.LUA "3.12" "3.51" -o LOCATIONMAPVIEW.bin) which I applied and got the Map back and working. but a couple of days ago it stopped working. Is the 3.51 fix still working for others?
from lightroom-map-fix.
Just seen https://developers.google.com/maps/documentation/javascript/versions which indicates that the oldest version supported in Nov 2023 is 3.52 and that will be gone by Feb 2024 :-(
from lightroom-map-fix.
Thanks again for the March update( patchluastr.exe LOCATIONMAPVIEW.LUA "3.12" "3.51" -o LOCATIONMAPVIEW.bin) which I applied and got the Map back and working. but a couple of days ago it stopped working. Is the 3.51 fix still working for others?
My map stopped working a few days ago as well. :(
from lightroom-map-fix.
Great work!
As the patching procedure is getting more complex, I guess it's time to update
patchluastr
to do all the necessary steps in one go with just a patch file and the Google API key as command line parameters.
Would love this option for users like myself that are relative novices when it comes to coding!
from lightroom-map-fix.
One thing that's curious is, that the map module displays the night view with a spinning wheel and the message "Map is Offline". I think that's different from previous symptoms (blank page) and may point to a failure before locationmapview gets loaded.
from lightroom-map-fix.
There is a checkMapServerAvailability
Lua function that seems to fail.
Output in LocationViewController.log
:
11/21/2023 23:20:21 TRACE updatePhotoMarkers: called from selectedImages 0
11/21/2023 23:20:21 TRACE updateAddressPanelFromSelectionChange()
11/21/2023 23:20:21 TRACE updatePhotoMarkers: called from availableImages 0
11/21/2023 23:20:22 DEBUG checkMapServerAvailability
11/21/2023 23:20:24 DEBUG Checking online status...
11/21/2023 23:20:24 DEBUG Map is going OFFLINE
11/21/2023 23:20:24 DEBUG checkMapServerAvailability
11/21/2023 23:20:25 DEBUG Checking online status...
11/21/2023 23:20:25 DEBUG Still offline, continue checking...
11/21/2023 23:20:25 DEBUG checkMapServerAvailability
11/21/2023 23:20:26 DEBUG Checking online status...
11/21/2023 23:20:26 DEBUG Still offline, continue checking...
11/21/2023 23:20:26 DEBUG checkMapServerAvailability
11/21/2023 23:20:27 DEBUG stopCheckMapServerAvailability
11/21/2023 23:20:27 TRACE updatePhotoMarkers: called from selectedImages 0
11/21/2023 23:20:27 TRACE updateAddressPanelFromSelectionChange()
11/21/2023 23:20:27 TRACE updatePhotoMarkers: called from availableImages 0
11/21/2023 23:20:32 TRACE updatePhotoMarkers: called from selectedImages 0
11/21/2023 23:20:32 TRACE updateAddressPanelFromSelectionChange()
11/21/2023 23:20:32 TRACE updatePhotoMarkers: called from availableImages 0
The same log in March:
03/20/2023 14:48:38 TRACE updatePhotoMarkers: called from selectedImages 0
03/20/2023 14:48:38 TRACE updateAddressPanelFromSelectionChange()
03/20/2023 14:48:38 TRACE updatePhotoMarkers: called from availableImages 0
03/20/2023 14:48:38 DEBUG checkMapServerAvailability
03/20/2023 14:48:39 TRACE updatePhotoMarkers: called from availableImages 0
03/20/2023 14:48:39 TRACE updatePhotoMarkers: called from selectedImages 0
03/20/2023 14:48:39 TRACE updateAddressPanelFromSelectionChange()
03/20/2023 14:48:39 DEBUG Checking online status...
03/20/2023 14:48:40 DEBUG Online, no need to continue checking
03/20/2023 14:48:40 DEBUG stopCheckMapServerAvailability
03/20/2023 14:48:40 TRACE updatePhotoMarkers: called from availableImages 0
03/20/2023 14:48:40 TRACE updatePhotoMarkers: called from selectedImages 0
03/20/2023 14:48:40 TRACE updateAddressPanelFromSelectionChange()
03/20/2023 14:48:44 DEBUG stopCheckMapServerAvailability
03/20/2023 14:48:44 TRACE updatePhotoMarkers: called from selectedImages 0
03/20/2023 14:48:44 TRACE updateAddressPanelFromSelectionChange()
03/20/2023 14:48:44 TRACE updatePhotoMarkers: called from availableImages 0
03/23/2023 11:46:47 TRACE updatePhotoMarkers: called from selectedImages 0
03/23/2023 11:46:47 TRACE updateAddressPanelFromSelectionChange()
03/23/2023 11:46:47 TRACE updatePhotoMarkers: called from availableImages 0
03/23/2023 11:46:48 DEBUG checkMapServerAvailability
03/23/2023 11:46:49 TRACE updatePhotoMarkers: called from availableImages 0
03/23/2023 11:46:49 TRACE updatePhotoMarkers: called from selectedImages 0
03/23/2023 11:46:49 TRACE updateAddressPanelFromSelectionChange()
03/23/2023 11:46:50 DEBUG Checking online status...
03/23/2023 11:46:50 DEBUG Online, no need to continue checking
03/23/2023 11:46:50 DEBUG stopCheckMapServerAvailability
03/23/2023 11:46:50 TRACE updatePhotoMarkers: called from availableImages 0
03/23/2023 11:46:50 TRACE updatePhotoMarkers: called from selectedImages 0
03/23/2023 11:46:50 TRACE updateAddressPanelFromSelectionChange()
03/23/2023 11:46:56 DEBUG performing reverse geocoding
03/23/2023 11:46:57 DEBUG checkMapServerAvailability
03/23/2023 11:46:57 DEBUG Map is going offline, because of reverse geocoding response status INVALID_REQUEST
03/23/2023 11:46:58 DEBUG Checking online status...
03/23/2023 11:46:58 DEBUG Map is coming ONLINE
03/23/2023 11:46:58 DEBUG stopCheckMapServerAvailability
03/23/2023 11:47:04 TRACE updatePhotoMarkers: called from selectedImages 0
03/23/2023 11:47:04 TRACE updateAddressPanelFromSelectionChange()
...
It's getting late for me, but for those who want to dig deeper, here's the decompiled LUA code that generates the Checking online status
log message:
LOCATIONVIEWCONTROLLER.LUA.txt
from lightroom-map-fix.
One thing that's curious is, that the map module displays the night view with a spinning wheel and the message "Map is Offline". I think that's different from previous symptoms (blank page) and may point to a failure before locationmapview gets loaded.
I think I'm getting the blank page and no spinning wheel. I'll try to remember to get a screenshot sometime this weekend.
from lightroom-map-fix.
I'm seeing a blank page with no wheel, same as last time this broke.
from lightroom-map-fix.
Ok, not sure what I broke. But rolling back to the state before yesterday night also gives me just a blank page.
from lightroom-map-fix.
For those into reverse-engineering, I started publishing my notes here:
https://github.com/astuder/lightroom-map-fix/blob/master/notes.md
Current status: I'm still trying to get better log output to find out where/why things break. So far, I managed to enable a verbose log and a debug console for the Chromium browser embedded in Lightroom. Unfortunately, without much useful to see.
from lightroom-map-fix.
Is it just me again, or did the map module now change from the blank page to displaying the offline screen?
from lightroom-map-fix.
I still get the blank page as before.
from lightroom-map-fix.
I support the observation that it still displays only the blank page. I would appreciate it very much, if we could get the Map module functional again as it is fantastic feature that I liked using in Lightroom a lot.
from lightroom-map-fix.
from lightroom-map-fix.
from lightroom-map-fix.
Hi all, I still can't have the map module working and google is still changing is API... is someone optimistic about the issue ? Thanks to @astuder we have been able to play several years with our old LR but maybe it's time to say goodbye ?
from lightroom-map-fix.
I agree, OpenStreetMap is often even better than Google Maps. This repository includes the OpenStreetMap hack (displays OSM when the "Light" map style is selected), but even that doesn't work for me anymore. Maybe the problem is that Lightroom tries to access other Google APIs too, at least the Geocoding API for converting place names to coordinates. I wonder if we could make the OpenStreetMap working by disabling all requests to Google APIs?
from lightroom-map-fix.
Good luck.
Wish knew enough to be of assistance.
from lightroom-map-fix.
Scratch that. The whole thing is heavily tied to the Google Maps JavaScript API. The Google API is used for interacting with the map and OpenStreetMaps is used just for rendering the map tiles. I don't think there's other way except to get the Google API working.
from lightroom-map-fix.
I tried something desperate, hoping to catch some kind of error - I tried to enclose every function in a try..catch block. Basically replacing every Lua block like this (find_top_level_braces()
finds the first { and last } of a function):
new_code = ""
previous_end = 0
pattern = re.compile("function([^)]*)")
for match in pattern.finditer(code):
start_index = match.end()
indices = find_top_level_braces(code, start_index)
if indices is not None:
first, last = indices
new_code += code[previous_end:first + 1]
new_code += " try {"
new_code += code[first + 1:last]
new_code += "} catch (e) { alert( e.message ); } "
previous_end = last
new_code += code[previous_end:]
Still nothing happened in Lightroom.
from lightroom-map-fix.
I apologize for my inactivity on this project. Other projects keep me very busy these days. :-/
I suspect that the failure doesn't happen when rendering the HTML page, but in JavaScript code directly invoked from Lua, and/or the interface between the two. For example a change in a Google Maps data structure causing an error in the LUA code processing it.
from lightroom-map-fix.
I just wanted to add that in my google-account I can see that LR6 is communicating with google and that the "error rate"(?) is 0%.
Just to let you know. Maybe the answer is misinterpreted from LR6. (but I have absolutely no programming-skills).
from lightroom-map-fix.
Related Issues (20)
- Map loads quickly, then errors out HOT 4
- MAP Error: Too many requests HOT 6
- Errors on patchluastr.py HOT 2
- Instructions for Google cloud need update HOT 1
- Billing - Free Trial Ending? HOT 5
- Map Is Offline HOT 2
- Switch Map Renderung to OSM? HOT 7
- Moar map hacks HOT 15
- AGREVERSEGEOCODESERVICE.LUA error "This is not a Lua file." HOT 3
- Documentation of .patch files HOT 1
- QUESTION: 4000+ Geocoding API calls for a single "Lightroom usage session"? HOT 7
- Thank you! HOT 2
- How to see Javascript console? HOT 2
- Many Errors during loading Map
- Syntax error - invalid character HOT 2
- small README suggestions HOT 2
- Works but with "For Development Purposes Only" overlay on darkened map HOT 2
- Replace function only replaces first occurence of string HOT 2
- client=gme-adobesystems not found HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightroom-map-fix.