cancel
Showing results for 
Search instead for 
Did you mean: 

False OVRPlugin change detection from Meta XR Core SDK v63

korinVR
Expert Protege
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 8

earlgeorg
Honored Guest

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.

SufferinPup
Honored Guest

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

Steve_Cox
Honored Guest

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?

earlgeorg
Honored Guest

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

LionZuck
Explorer

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.

 

Steve_Cox
Honored Guest

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

ninjuArchero
Protege

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.

leozheng.2023
Explorer

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.