.mxunit file missing issue

0
Hello All,I am facing the below issue when i have taken latest copy from sprintr, one of my teammember committed a code after that we facing this issue, anyone faced it already?System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\Ceer User Management-main\mprcontents\0d\6f\0d6fee45-db79-49a5-aa1e-f0c50560bdaa.mxunit'.at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)at System.IO.File.ReadAllBytes(String path)at Mendix.Modeler.Utility.FileSystem.ReadAllBytes(String filePath) in Mendix.Modeler.Utility\FileSystem.cs:line 46at Mendix.Modeler.Storage.Mpr.Storage.MprUnitRepositoryBase.ExecuteLoadCommand(IDbCommand command, Boolean loadContents, Action`1 handleUnitData) in Mendix.Modeler.Storage\Mpr\Storage\MprUnitRepositoryBase.cs:line 186at Mendix.Modeler.Storage.Mpr.Storage.MprUnitRepositoryBase.LoadUnitsBatched(IEnumerable`1 unitIDs, Boolean loadContents, Action`1 handleUnitData) in Mendix.Modeler.Storage\Mpr\Storage\MprUnitRepositoryBase.cs:line 180at Mendix.Modeler.Storage.Mpr.Storage.MprUnitRepositoryBase.LoadUnits(UnitQuery unitQuery, Boolean loadContents, Action`1 handleUnitData) in Mendix.Modeler.Storage\Mpr\Storage\MprUnitRepositoryBase.cs:line 130at Mendix.Modeler.Storage.Operations.UnitLoader.LoadUnits(IStorageUnit unit, IEnumerable`1 unitIDs) in Mendix.Modeler.Storage\Operations\UnitLoader.cs:line 163at Mendix.Modeler.Storage.Operations.UnitLoader.LoadChildUnits(IStorageUnit unit) in Mendix.Modeler.Storage\Operations\UnitLoader.cs:line 126at Mendix.Modeler.Storage.Operations.UnitLoader.LoadChildUnits(IStorageUnit unit) in Mendix.Modeler.Storage\Operations\UnitLoader.cs:line 156at Mendix.Modeler.Storage.Operations.UnitLoader.LoadChildUnits(IStorageUnit unit) in Mendix.Modeler.Storage\Operations\UnitLoader.cs:line 156at Mendix.Modeler.Storage.Operations.UnitLoader.LoadChildUnits(IStorageUnit unit) in Mendix.Modeler.Storage\Operations\UnitLoader.cs:line 156at Mendix.Modeler.Storage.Operations.UnitLoader.LoadChildUnits(IStorageUnit unit) in Mendix.Modeler.Storage\Operations\UnitLoader.cs:line 156at Mendix.Modeler.Storage.Operations.UnitLoader.LoadChildUnits(IStorageUnit unit) in Mendix.Modeler.Storage\Operations\UnitLoader.cs:line 156at Mendix.Modeler.Storage.Operations.UnitLoader.<>c__DisplayClass12_0`1.<Load>b__1() in Mendix.Modeler.Storage\Operations\UnitLoader.cs:line 45at Mendix.Modeler.Undo.GlobalTransactionManager.<>c__DisplayClass22_0.<JustDo>b__0() in Mendix.Modeler.Undo\GlobalTransactionManager.cs:line 150at Mendix.Modeler.Undo.GlobalTransactionManager.JustDo[T](Func`1 action) in Mendix.Modeler.Undo\GlobalTransactionManager.cs:line 169at Mendix.Modeler.Undo.GlobalTransactionManager.JustDo(Action action) in Mendix.Modeler.Undo\GlobalTransactionManager.cs:line 148at Mendix.Modeler.Storage.Operations.UnitLoader.Load[T](IProgressInfo info, Dictionary`2 _knownUnits) in Mendix.Modeler.Storage\Operations\UnitLoader.cs:line 42at Mendix.Modeler.Storage.Database.Load[T](IProgressInfo info, Dictionary`2 knownUnits, Boolean throwOnUnknownObjects) in Mendix.Modeler.Storage\Database.cs:line 50at Mendix.Modeler.Operations.ProjectFileLoader.<>c__DisplayClass3_0.<Load>b__0(IDatabase database) in Mendix.Modeler.Core\Operations\ProjectFileLoader.cs:line 32at Mendix.Modeler.Storage.DatabaseManager.<>c__DisplayClass12_0`1.<Do>b__0(IMprStorageService mprStorageService) in Mendix.Modeler.Storage\DatabaseManager.cs:line 70at Mendix.Modeler.Storage.Mpr.Storage.MprStorageManager.PerformAction[T](String mprFilePath, Func`2 action, IMprStorageService mprStorageService, IDbConnector connector, String loggingId) in Mendix.Modeler.Storage\Mpr\Storage\MprStorageManager.cs:line 166at Mendix.Modeler.Storage.Mpr.Storage.MprStorageManager.Do[T](String mprFilePath, Func`2 action, Boolean doCheckForV2) in Mendix.Modeler.Storage\Mpr\Storage\MprStorageManager.cs:line 148at Mendix.Modeler.Storage.Mpr.Storage.MprStorageManager.Do[T](String mprFilePath, Func`2 action) in Mendix.Modeler.Storage\Mpr\Storage\MprStorageManager.cs:line 85at Mendix.Modeler.Storage.DatabaseManager.Do[TResult](String filePath, Func`2 action) in Mendix.Modeler.Storage\DatabaseManager.cs:line 70at Mendix.Modeler.Operations.ProjectFileLoader.Load(IProgressInfo info, String filePath, Boolean debugLogEnabled) in Mendix.Modeler.Core\Operations\ProjectFileLoader.cs:line 26
asked
1 answers
0

I was able to resolve the issue, so I'm sharing the root cause and solution here in case it helps others facing a similar problem.


Issue:

The Mendix project on the main branch became inaccessible because App.mpr was referencing a missing .mxunit model file, resulting in a project consistency issue. As a result, Studio Pro failed to open the project.


Analysis:

To identify the root cause, we:

  • Verified that the Git repository itself was healthy.
  • Identified the last working revision and the first failing revision by checking out older commits.
  • Compared both revisions and confirmed that the inconsistency was introduced in the recent commits.


Resolution:

Instead of rewriting the Git history, we reverted the affected commit range, which restored the project to a consistent state while preserving the repository history. After pushing the revert commits, the main branch became accessible again, and the entire team was able to open the project successfully.


Git commands that helped during the investigation

git fsck

git diff --name-status 4c77341 28ac64f2

git checkout 4c77341

git checkout 28ac64f2

git revert --no-edit HEAD~8..HEAD

git push origin main


Lesson Learned: If you encounter a similar .mxunit or project consistency issue in Mendix, first identify the last known working revision and the first failing revision. Comparing those revisions can help isolate the problematic changes and determine the safest recovery approach.

answered