Skip to main content
korinVR
Honored Contributor
May 4, 2024

False OVRPlugin change detection from Meta XR Core SDK v63

From Meta XR Core SDK v63, the "Changes to OVRPlugin detected" dialog appears even without any plugin changes.
 
I discovered that OculusProjectConfig.asset contains hashes of the plugin's FULL PATH from v63. This means that simply moving the project or sharing it among team members triggers a false "Restart Unity" dialog.

From OVRPluginInfoOpenXR.cs:

 

string md5Win64Actual = GetFileChecksum(Path.GetFullPath(PluginRelPathWin64));
string md5AndroidActual = GetFileChecksum(Path.GetFullPath(PluginRelPathAndroid));​

 

v62:

 

private static string GetFileChecksum(string filePath)
{
    using var md5 = new MD5CryptoServiceProvider();
    byte[] buffer = md5.ComputeHash(File.ReadAllBytes(filePath));
    return string.Join(null, buffer.Select(b => b.ToString("x2")));
}

 

v63:

 

private static string GetFileChecksum(string filePath)
{
    using var md5 = new MD5CryptoServiceProvider();
    byte[] buffer = md5.ComputeHash(File.ReadAllBytes(filePath));
    byte[] pathBuffer = md5.ComputeHash(Encoding.UTF8.GetBytes(filePath));
    return string.Join(null, buffer.Select(b => b.ToString("x2"))) + string.Join(null, pathBuffer.Select(b => b.ToString("x2")));
}

 

I encountered the issue when I updated my project to v64 and just commited the change to GitHub. My CI automated build started crashing due to the incorrect plugin change detection and I struggled to find the cause for hours...

 

I believe this behaviour is unexpected, and the change should be reverted.

8 replies

New Participant
May 29, 2024

The pathBuffer should be at least using the relative path to the Unity project / package. People working on different workspace root folders will always get a different hash because of this change.

New Participant
May 29, 2024

Still a problem in v65. I really really hope they change this in v66.

New Participant
July 1, 2024

Has anything been done about this?  Everyone on our team has their project in a different location so we're all having to deal with this change frequently.  How are others dealing with it?  Is there any way to escalate the issue?

New Participant
July 2, 2024

We are dealing with by always pressing "Not now" when the dialog prompts us to restart the Unity Engine.

New Participant
August 29, 2024

Still bugged in v68.

I can imagine this bug is affecting most teams with more than one dev machine.

What is even the rationale behind putting a full path into those hashes?

 

Also, is this the proper place to report bugs? I couldn't find any formal way to report this. Is this a joke?

 

----

 

Just in case any dev actually reads this thread and tries to fix this:

If you decide to put relative paths instead of full paths into the hashes, please also handle the different path separators for different OSs.

 

New Participant
September 19, 2024

This is obviously broken.  Can anything be done about it?  Does anyone from Meta read these posts?

Participant
October 3, 2024

I wonder how is it possible that this isn't causing issues internally at Meta? Maybe all devs at Meta are mandated to keep the same folder structure for their projects or something, but I'd imagine it would still come up when someone makes another copy of the project.
Please fix this issue, it's insane it hasn't been fixed for so long.

New Participant
October 14, 2024

Same in v69, I can't image how Meta team can endure this issue and restart their editor once and once again for so long.