• Welcome to the Lightroom Queen Forums! We're a friendly bunch, so please feel free to register and join in the conversation. If you're not familiar with forums, you'll find step by step instructions on how to post your first thread under Help at the bottom of the page. You're also welcome to download our free Lightroom Quick Start eBooks and explore our other FAQ resources.
  • Stop struggling with Lightroom! There's no need to spend hours hunting for the answers to your Lightroom Classic questions. All the information you need is in Adobe Lightroom Classic - The Missing FAQ!

    To help you get started, there's a series of easy tutorials to guide you through a simple workflow. As you grow in confidence, the book switches to a conversational FAQ format, so you can quickly find answers to advanced questions. And better still, the eBooks are updated for every release, so it's always up to date.

LRC cache causing crash - metrics.json (but why?)

Status
Not open for further replies.

Ed

Member
Premium Classic Member
Joined
Jun 23, 2020
Messages
41
Lightroom Version Number
12.2.1
Operating System
  1. macOS 13 Ventura
I've been fighting with Lightroom Classic on my wife's mac for 2 weeks now. Basically, the program will not open. It hangs on the splash screen right after "Reading preferences" appears. Adobe support has been completely unhelpful. I have been on text chat and phone calls. I could bore you with the details but I won't. Also, the "normal" fixes like deleting the preferences files do not work. The issue is deeper. Fortunately or unfortunately, I was in software development for a couple of decades so I can think like a tester and developer.

A bit of context might help here. Over the last couple of weeks, I have managed to get LRC working again a few times - but it eventually returns to the same problem. The first time I got it going again was when I rebuilt my wife's mac from the ground up (format the drive, reinstall macOS, reinstall apps, restore LRC catalog). But a few days later, the same crash came back. The next time it started working again was when I did a manual delete of LRC. I did my research and found every folder that had anything to do with LRC and killed them all. Then reinstalled. It worked. Until this morning.

LRC was working fine when we went to bed last night. But this morning, once again, LRC would not start. So I started stepping through the various "hidden" folders, sequentially making a copy of each, deleting it and then trying to start LRC. If it didn't fix the crash, I'd restore that folder and move on to the next.

My tests succeeded when I nuked /Users/(name of my wife's computer)/Library/Caches/Adobe/Lightroom. So then my test process went into file by file mode (delete 1 of the files, reboot, restart LRC) and I found the culprit to be metrics.json. If I delete that file, LRC works (a new metrics,json is created when LRC starts). If I restore the old copy of it, LRC crashes. I've replicated it multiple times - metrics.json is what is causing the crash.

When I compare the bad/old version and the new version, the file size is wildly different. The new version is 16KB. The old/bad version is 6.67GB.

I guess the good news is that I now know how to resurrect LRC when this happens. The bad news is that after having this happen multiple times in the last 2 weeks, I know it will come back.

Does anyone have any thoughts on why metrics.json would become corrupt and/or so large that it's causing the startup crash?
 
Solution
Interesting. I just checked by main Mac system (also running Ventura and which is logged into my main Adobe account) and I don't have a "metrics.json" file in the location you specified. But on my old Mac system (Big Sur), which is logged into my test Adobe account, then I do have such a file (but it's only 8KB). I have no idea why the two systems differ, but.....thinking that "metrics" might be a clue, I checked my Adobe account settings under the "Privacy and personal data" tab and I discovered that for my test account I have the "Share information on how I use Adobe desktop apps" option enabled, but on my main account I have that option disabled. That setting may be nothing whatsoever to do with...
Interesting. I just checked by main Mac system (also running Ventura and which is logged into my main Adobe account) and I don't have a "metrics.json" file in the location you specified. But on my old Mac system (Big Sur), which is logged into my test Adobe account, then I do have such a file (but it's only 8KB). I have no idea why the two systems differ, but.....thinking that "metrics" might be a clue, I checked my Adobe account settings under the "Privacy and personal data" tab and I discovered that for my test account I have the "Share information on how I use Adobe desktop apps" option enabled, but on my main account I have that option disabled. That setting may be nothing whatsoever to do with that "metrics.json" file, but it would be interesting to know if that option is enabled or disabled on your wife's Mac.
 
  • Like
Reactions: Ed
Solution
It strikes me that this might be linked to the "LrC won't open" thread.

Have you had a look at the contents of the file? Normally .json files are human-readable.

I can't find a metrics.json on my Windows 11 system, but maybe I am not looking in the right place. @Jim Wilde may well be onto something - I tend to disable usage information.
 
Interesting. I just checked by main Mac system (also running Ventura and which is logged into my main Adobe account) and I don't have a "metrics.json" file in the location you specified. But on my old Mac system (Big Sur), which is logged into my test Adobe account, then I do have such a file (but it's only 8KB). I have no idea why the two systems differ, but.....thinking that "metrics" might be a clue, I checked my Adobe account settings under the "Privacy and personal data" tab and I discovered that for my test account I have the "Share information on how I use Adobe desktop apps" option enabled, but on my main account I have that option disabled. That setting may be nothing whatsoever to do with that "metrics.json" file, but it would be interesting to know if that option is enabled or disabled on your wife's Mac.
Thanks, Jim. Very interesting angle. Yes, I did have both options turned on on that page (see screen shot). I turned them both off, rebooted, deleted metrics.json, restarted LRC and it did not recreate metrics.json.
 

Attachments

  • Screenshot 2023-03-24 at 9.10.48 AM.png
    Screenshot 2023-03-24 at 9.10.48 AM.png
    197.3 KB · Views: 117
It strikes me that this might be linked to the "LrC won't open" thread.

Have you had a look at the contents of the file? Normally .json files are human-readable.

I can't find a metrics.json on my Windows 11 system, but maybe I am not looking in the right place. @Jim Wilde may well be onto something - I tend to disable usage information.
Hi David. Thanks. That thread seems to refer to issues with preferences and deleting them. I had tried that over the last couple of weeks and it didn't fix the problem. But, Jim Wilde did come up with an interesting angle about settings in my wife's Adobe account related to data collection. If I turn those off and delete metrics.json, it does not get recreated when I start LRC.
 
Well, that sounds promising. I wonder if that's the cause of other "can't start" issues recently (though the thread that @David_W links to seems mostly Windows-related). I'll try to flag it to Adobe, just in case.
 
Well, that sounds promising. I wonder if that's the cause of other "can't start" issues recently (though the thread that @David_W links to seems mostly Windows-related). I'll try to flag it to Adobe, just in case.
Promising indeed!!! I will check back in with status over the next couple of days or if the crash somehow returns. But hopefully this can help others. You're a genius, Jim!!! ;-)
 
Not really.....but identifying that it was that file that caused the problem was very smart detective work on your part. Chapeau!
 
My LR 12.2.1 / Mac OS 13.2.1 has a "metrics.json" file that's 45 MB. It does indeed appear to contain usage statistics being reported back to Adobe. The Lightroom SDK for plugins has long revealed that LR has a well-developed infrastructure for collecting and reporting detailed usage information.

"metrics.json" is encoded with Base64 (or Adobe's variant of Base64). You can see much of its contents with this command line:

(base64 -d < metrics.json) | LC_ALL=C sed 's/\\n/\n/g' | strings -15 > decoded.txt

Here's a random smattering of lines decoded from metrics.json:

Code:
{"sessions":{"1915":{"event.device_guid":"85faeacff84c8bf70a86f6a3fd9a503162418
00918897a384f3fdde9acc92884","event.category":"DESKTOP","event.user_guid":"60F
03B1B3EC7E22C99201549@AdobeID","event.session_guid":"FD9E879E-8D69-415E-B3A3-35
864E077F55","source.version":"12.2.1","user.service_code":"SUBSCRIPTION",
"user.service_level":"subscriber","source.name":"Lightroom
{"Classic","source.platform":"Mac:64","source.client_id":"lr-cls-mac-service",
"source.os_version":"13.2.1","env.com.version":"202303011008-5bfbce17",
"event.build":"prod","event.language":"en_US"}},"metrics":[{"sessionId":"1915",
"time":"2023-03-23T16:36:27.591-0700","data":{"event.subtype":
"psehelp-menu-visible","env.com.version":"202303011008-5bfbce17",
"event.subcategory":"PSEimportVisible","event.workflow":"PSEImport"}},
{"sessionId":"1915","time":"2023-03-23T16:36:41.372-0700",
"data":{"event.subtype":"false","env.com.version":"202303011008-5bfbce17","event.subcategory":"StorePresetsWithCatalog",
"event.workflow":"LightroomPreferences"}},{"sessionId

panoLog.txt     1679613073  0     0     100644  12066     `
{panoLog|Version:200}
/var/mobile/Library/Caches/com.apple.camera/PanoLogs
{Pano|sliceOffsetToZero:1344}
ACT_FigSampleBufferProcessorStartPanoramaCapture started 124848.14
{SwingEstimator|direction:2}
{Pano|FramesBeforeCaptureActive:6}
ghosting Speed 62.25 scale lowLight 6.40 scale brightLight 3.50 integrationTime lowLight 200.00 integrationTime brightLight 1000.00 maxOffset 32.00 previewScaleX 0.066109 previewScaleY 0.065476 minGoodOverlap 0.50 minRequiredOverlap 0.33
{BlendingVersion:1}

UserStopped triggered with buffer 0x159b3bf90, 124848.44, at 124848.54 storage->previewAssemblyPositionMaxX 14656.508 storage->previewAssemblyPositionX 15137.606
{Registration6|EndTS:124848.536}
{NoiseReduction6|inRect:0,202,1373,3745} {NoiseReduction6|BeginTS:124848.536}
DoMultiBandNoiseReductionComplete (NRFV1)
{NoiseReduction6|outRect:0,202,1373,3745} {NoiseReduction6|took:0.000} {NoiseReduction6|EndTS:124848.536}
{Preview6|exposureBlendingTook:0.000002}{Preview6|BufferReleaseTS:124848.537}
{Preview6|M2MStage1took:3.803}
{Preview6|M2MStage2took:0.665}
{Preview6|previewMotionSpeedScale:12.423221} {Preview6|xDeviationCondition:-5} {Preview6|exposureTime:0.006901} {Preview6|deltaPTS:0.033336} {Preview6|currentGhostingSpeedScale:6.400000}
{Preview6|BeginTS:124848.537}
{Preview6|took:0.449} {Preview6|EndTS:124848.538}

metadataAccumulationLog.plist<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
<plist version=\"1.0\">
\t\t<key>CaptureTimeInSeconds</key>
\t\t<real>124848.236562416</real>
\t\t<key>ID</key>
\t\t<integer>0</integer>
\t\t<key>MetadataDictionary</key>
\t\t\t<key>AELimitCurrentToBaseExposureRatio</key>
\t\t\t<integer>255</integer>
\t\t\t<key>AELocked</key>
\t\t\t<key>AFLocked</key>
\t\t\t<key>AGC</key>
\t\t\t<integer>2048</integer>
\t\t\t<key>AWBBGain</key>
\t\t\t<integer>8986</integer>
\t\t\t<key>AWBComputedBGain</key>
\t\t\t<integer>8986</integer>
\t\t\t<key>AWBComputedGGain</key>
\t\t\t<integer>4096</integer>
\t\t\t<key>AWBComputedRGain</key>
\t\t\t<integer>8014</integer>
\t\t\t<key>AWBGGain</key>
\t\t\t<integer>4096</integer>

registrationData.csvtime (2nd), warmup, status, qualityMain, method, prediction, fallback, txPrediction, tyPrediction, predictionReliable, txMain, tyMain, tx, ty, txMotionFilter, tyMotionFilter, xAlpha, xBeta, nXRingBufferElements, tXBegin, tXEnd, yAlpha, yBeta, nYRingBufferElements, tYBegin, tYEnd, slice1FirstBytes, slice2FirstBytes
124848.273438, 0, 0, 0.026, 2, 1, 1, 25.371, -1.958, 0, 55.000, -13.894, 25.371, -1.958, 25.371, -1.958, 0.000000, 1.000000, 0, 0.000000, 0.000000, 0.000000, 1.000000, 0, 0.000000, 0.000000,   3|  2|  1|  0,   2|  0|  0|  2
124848.304688, 0, 0, 0.044, 2, 1, 1, 177.836, 299.819, 0, 48.000, 7.850, 177.836, 299.819, 177.836, 299.819, 0.000000, 1.000000, 0, 0.000000,

","event.appWorkflow":"SYNC","event.error_code":"302","event.url":
"https://oz-prod-masters.s3.us-west-2.amazonaws.com/b716174ab60840daa6f719d1d4b94636/9d785efc80ee825653ce0b711bd59060/
master?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3PR2V2HL7C6K
IPN2%2F20230323%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230323T233646Z&X
-Amz-Expires=3600&X-Amz-Security-Token=***&X-Amz-Signature=
7a2472af8c65f5f73621fcce3a5d2057be720d40007a1d1876c412df8edaf74e",
"env.com.version":"202303011008-5bfbce17","event.subcategory":
"binary_download_data","event.type":"error"}},{"sessionId":"1915",
"time":"2023-03-23T16:37:13.228-0700","data":{"event.subtype":"error",
"event.type_":"error","event.error_type":"error","event.workflow":
"Logger","env.com.version":"202303011008-5bfbce17","event.subcategory":
"MotionPreviewRequest","event.error_desc":
"<AgErrorID>dng_error_file_not_found</AgErrorID>"}},
{"sessionId":"1915","time":"2023-03-23T16:37:13.229-0700",
"data":{"event.subtype":"error","event.type_":"error","event.error_type":"er
 
Well, that sounds promising. I wonder if that's the cause of other "can't start" issues recently (though the thread that @David_W links to seems mostly Windows-related). I'll try to flag it to Adobe, just in case.
I am on win11 & have had the 'Desktop app usage' switched 'on'. I do not find this file, 'metrics.json' at the location indicated. I checked my Synology backups and that file existed in 1/31/23 & 2/25/23, but was no longer there on 2/28/23 or since. It was definitely not there when my system had problems (3/22/23).
 
I am on win11 & have had the 'Desktop app usage' switched 'on'. I do not find this file, 'metrics.json' at the location indicated. I checked my Synology backups and that file existed in 1/31/23 & 2/25/23, but was no longer there on 2/28/23 or since. It was definitely not there when my system had problems (3/22/23).
very strange…..just to be sure, I just searched all of ‘appdata’ for ‘metrics.json’….and it showed under ‘caches’….and continues to show there. I know it was not there a few mi ago (no changes otherwise….except 20 minutes ago I had unchecked the ‘app usage’).

I just opened LRC….the metrics file disappeared!! Strange! Closed it…reappeared. Before it was 9KB, now is 14KB. I do have ‘app usage’ unchecked
 
Last edited:
very strange…..just to be sure, I just searched all of ‘appdata’ for ‘metrics.json’….and it showed under ‘caches’….and continues to show there. I know it was not there a few mi ago (no changes otherwise….except 20 minutes ago I had unchecked the ‘app usage’).

I just opened LRC….the metrics file disappeared!! Strange! Closed it…reappeared. Before it was 9KB, now is 14KB. I do have ‘app usage’ unchecked
I tried to check ‘desktop app data’ but it is unable to load info. Adobe must be doing something with it.
 
On my Mac OS 13 and Windows 10 machines, there is no "metrics.json" while LR is running, only when it's not running.
 
On my Mac OS 13 and Windows 10 machines, there is no "metrics.json" while LR is running, only when it's not running.
Same here.....but only if the "Desktop App Usage" is enabled in the account's "Privacy and personal data" settings, which it is for a test account that I have. For my main account, that setting is disabled and I don't see a "metrics.json" file no matter if LrC is running or not.
 
From my post in this thread

I'm on Windows and Mac and only this week I have experienced this problem on my main PC. I've been trying lots of stuff....

I'll post elsewhere too, but I am surprised to say that deleting metrics.json has just allowed me to open LrC.

One interesting detail is that the deleted metrics.json file is dated 2 days ago, when I was last able to open LrC using my main Windows user account. Each time it fails to open, LrC shows other signs of life such as the creation of lock and wal files, and Task Manager activity, but fails before or upon updating metrics.json.
 
Update... 24 hours later, LRC is running fine. I have not seen metrics.json reappear (whether LRC is running or closed) since I unchecked the data collection boxes and deleted it.

I reported my findings to Adobe support (and gave Jim Wilde a big shout out). Screen shot of their reply is attached. They are saying that they are aware of the issue and it is being addressed. It would have been really nice if any of the reps that looked at my case brought this up in the last 2 weeks.

Their suggestion of reverting to V11 seems odd, though. First, I didn't think a catalog that was updated to V12 (released October 2022) could go back to V11 - not that I would want to. But more important, if simply unchecking the data collection boxes and deleting a corrupted metric.json file stops the problem for recurring, why wouldn't that at least lead Adobe's suggestions while they fix the underlying bug?

Reading through the other comments above in this thread, I think a key point is that the issue I reported (and the fix) seems to be Mac only (not Windows). Adobe's reply also says it is a Mac issue.

If anything goes wrong again, I will report back in. But even when a new version of LRC is released that supposedly fixes the issue, there's no chance in hell that I will ever turn their data collection check boxes back on! :)
 

Attachments

  • Screenshot 2023-03-25 at 7.39.57 AM.png
    Screenshot 2023-03-25 at 7.39.57 AM.png
    194 KB · Views: 105
Same here.....but only if the "Desktop App Usage" is enabled in the account's "Privacy and personal data" settings, which it is for a test account that I have. For my main account, that setting is disabled and I don't see a "metrics.json" file no matter if LrC is running or not.
I had unchecked the ‘DAU’ (before Adobe apparently locked access up). I still get metrics.json showing up…..maybe it didn’t ’flow through’ before they shut it down…or whatever they are doing??
 
even when a new version of LRC is released that supposedly fixes the issue
There is a chance that the metrics.json problem can be fully fixed server-side, though even if the problem is something misbehaving on the server-side, the client-side is insufficiently robust against server errors.
 
Update 3/26. It's back! [But the fix still works.]

Woke up this morning and LRC would not launch again. Looked at the cache folder and sure enough, metrics.json was back! 2.6GB. I did nothing to turn it back on and I hadn't seen the little (actually big) bastard since Friday. Deleted it. LRC started up again just fine.

Went into my Adobe account. Like others, since some time Friday, the "Privacy and personal data" section of my Adobe account hadn't been accessible (it was fine in the AM when I figured out my fix but stoped working for everyone later on Friday). This morning, "Desktop app usage" was check back on. I did not do that. I had no way of doing it since that option had been broken on the Adobe side since Friday.

I'll give Adobe the benefit of the doubt and assume that when they fixed whatever they did on their site to get the "Desktop app usage" and "Content analysis" working again that they just innocently turned that checkbox back on vs the state I had left it in (checked off) Friday AM.

But if I was a "black helicopter" type of guy, the coincidences of those options suddenly breaking for everyone after they were identified publicly as an issue on Friday AM, Adobe then admitting in email that they knew metrics.json was a problem, Adobe not even suggesting the obvious fix to turn data collection off to fix the problem (instead suggesting that I go back to V11), and data collection being turned back on (at least for me) after Adobe fixed their coincidental inability to access those options on their site later on Friday?... Wow. Crazy coincidences, huh?

Adobe has a nasty little habit of over-riding simple user preferences from time to time. But over-riding this one is NOT small and it's NOT innocent. This is a very big privacy issue. If and when a user tells them to not collect data, it's illegal for them to over-ride that and turn it back on. But again, I'll give them the benefit of the doubt and assume it was just a silly bug that will NEVER HAPPEN AGAIN.

It would be interesting for others to check on the status of their data collection settings today and see if they are different from the state that they had them set as of Friday.
 
It would be interesting for others to check on the status of their data collection settings today and see if they are different from the state that they had them set as of Friday.
No changes to my accounts have been made, but worrying nonetheless.
 
  • Like
Reactions: Ed
Woke up this morning and LRC would not launch again. Looked at the cache folder and sure enough, metrics.json was back! 2.6GB. I did nothing to turn it back on and I hadn't seen the little (actually big) bastard since Friday. Deleted it. LRC started up again just fine.
Watching the cache folder, it looks like metrics.json is created when LrC closes. On some occasions, it's a 3.5-5gb file and restarting LrC fails to open fully. Delete this big metrics.json and LrC will start. Mostly though, metrics.json is in the 12-30kb range and LrC then opens normally.

Went into my Adobe account. Like others, since some time Friday, the "Privacy and personal data" section of my Adobe account hadn't been accessible (it was fine in the AM when I figured out my fix but stoped working for everyone later on Friday). This morning, "Desktop app usage" was check back on. I did not do that. I had no way of doing it since that option had been broken on the Adobe side since Friday.
I'm not sure I have posted it in another thread here, but I am one whose "privacy and personal data" section has been inaccessible over the last few days. I haven't changed the setting for a long while and don't know if it was enabled or not. But the section is now available.
 
@Ed, Adobe tech support is completely untrustworthy for anything but the most routine issues. Many reports on the forums over the years of them saying anything to close out a call.

I think it's likely that until your finding got back to them via Jim, John, and posts on the Adobe forum, they were completely unaware of the cause of this issue. Three days ago, March 23, Adobe employee Rikk Florh (who is very competent and completely trustworth) posted on the Adobe forum that he was gathering all the reports on the forums about LR failing to start:
https://community.adobe.com/t5/ligh...ails-to-start-on-windows/m-p/13674042#M315688

If Adobe had known of a workaround then, he would have published it.

I strongly recommend that no one waste their time with Adobe tech support for any but routine issues such as billing. Use this forum and the Adobe forums.
 
I had turned off the account option Data App Usage yesterday and it was back on just now. I turned it off again. Let's hope Adobe is scrambling to fix this on the server side.
 
Status
Not open for further replies.
Back
Top