resetToDefaultDependencies

Greetings!
Something happened when i was waiting my Build to IOS to finish building…
then assets folder, project and user settings folder disappeared, as well as all files from project parent folder.
Can anyone say why this reset happened? And Is there a way to find my missing files?
Unity 2022(personal) MacOs

Log says:

Packages were changed.
Update Mode: resetToDefaultDependencies
The following packages were added:
com.unity.modules.ai@1.0.0
com.unity.modules.androidjni@1.0.0
com.unity.modules.animation@1.0.0
com.unity.modules.assetbundle@1.0.0
com.unity.modules.audio@1.0.0
com.unity.modules.cloth@1.0.0
com.unity.modules.director@1.0.0
com.unity.modules.imageconversion@1.0.0
com.unity.modules.imgui@1.0.0
com.unity.modules.jsonserialize@1.0.0
com.unity.modules.particlesystem@1.0.0
com.unity.modules.physics@1.0.0
com.unity.modules.physics2d@1.0.0
com.unity.modules.screencapture@1.0.0
com.unity.modules.terrain@1.0.0
com.unity.modules.terrainphysics@1.0.0
com.unity.modules.tilemap@1.0.0
com.unity.modules.ui@1.0.0
com.unity.modules.uielements@1.0.0
com.unity.modules.umbra@1.0.0
com.unity.modules.unityanalytics@1.0.0
com.unity.modules.unitywebrequest@1.0.0
com.unity.modules.unitywebrequestassetbundle@1.0.0
com.unity.modules.unitywebrequestaudio@1.0.0
com.unity.modules.unitywebrequesttexture@1.0.0
com.unity.modules.unitywebrequestwww@1.0.0
com.unity.modules.vehicles@1.0.0
com.unity.modules.video@1.0.0
com.unity.modules.vr@1.0.0
com.unity.modules.wind@1.0.0
com.unity.modules.xr@1.0.0

Hi @whatsupword ,

I definitely can’t explain how your projet files can go missing as a result of building the iOS player. The Editor.log file might give you a hint of what happened. (See the Unity Manual to find the location of that file.) Did you perform any action before this happened? For instance, did you try to remove a package using the Package Manager window?

Note: the resetToDefaultDependencies functionality is something that is normally only runnable manually (via an Editor menu), but all it does is reset the project manifest’s “dependencies” section to the built-in modules. It’s not going to be of much use in your case.

I did not removed anything or perfomed any actions except build process, as far as i can say.
Also there was a problem with my UnityHub logged out somehow, i’m not sure if it was before or right right after project files disappearance.
Could UnityHub be an issue? or can resetToDefaultDependencies function delete my files?
Anyway, Is there a chance to restore them if unity functionality erased them?

Hi @whatsupword ,

resetToDefaultDependencies cannot delete your project files, no, it can only modify the Packages/manifest.json file. Based on the message it logged, the manifest file was empty at the time it ran, because it just added entries in it.

Is your project using Unity Version Control or some other version control system (VCS)? It might be involved in this. Did you sign out or in from Unity Hub?

Unfortunately i wasn’t using Version Control at the moment.
I belive i didn’t ever signed out from UnityHub myself, but i got the massage that i need to log in around that moment when everything disappeared — then i logged in . And today It happened again — i just found out that im not logged in.

here is a part of Hub’s log around time project delete happened:

{“timestamp”:“2023-09-17T10:03:24.010Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘Successfully checked for entitlements request.’ ]”}
{“timestamp”:“2023-09-17T10:03:24.019Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘Get all entitlement groups’ ]”}
{“timestamp”:“2023-09-17T10:03:24.025Z”,“level”:“error”,“moduleName”:“LocalProjectService”,“message”:“[\n 'Error while opening a local new project: ',\n ProjectError\n at ProjectValidatorService. (/Applications/Unity Hub.app/Contents/Resources/app.asar/build/main/services/projectService/ProjectValidatorService.js:30:23)\n at Generator.next ()\n at fulfilled (/Applications/Unity Hub.app/Contents/Resources/app.asar/build/main/services/projectService/ProjectValidatorService.js:5:58) {\n errorCode: ‘NOT_A_VALID_PROJECT’,\n projectName: undefined,\n projectVersion: undefined,\n projectArchitecture: undefined,\n projectPath: undefined\n }\n]”}
{“timestamp”:“2023-09-17T10:03:24.026Z”,“level”:“error”,“moduleName”:“LocalProjectService”,“message”:“[ ‘Error while opening project: {"code":400,"error":{"errorCode":"NOT_A_VALID_PROJECT","projectName":"GAME 1","projectVersion":"2022.3.7f1","projectArchitecture":"arm64","projectPath":"/Users/jj/Documents/_GAME/0/GAME 1"}}’ ]”}
{“timestamp”:“2023-09-17T10:03:24.055Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘Successfully received all entitlement groups details’ ]”}
{“timestamp”:“2023-09-17T10:03:24.055Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘Received 1 entitlement groups’ ]”}
{“timestamp”:“2023-09-17T10:03:24.056Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘Get all entitlement groups’ ]”}
{“timestamp”:“2023-09-17T10:03:24.073Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘Successfully received all entitlement groups details’ ]”}
{“timestamp”:“2023-09-17T10:03:24.073Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘Received 1 entitlement groups’ ]”}
{“timestamp”:“2023-09-17T10:03:25.196Z”,“level”:“info”,“moduleName”:“Authentification Service”,“message”:“[ ‘Access token is expired, attempting to get a new one with refresh token’ ]”}
{“timestamp”:“2023-09-17T10:03:25.199Z”,“level”:“info”,“moduleName”:“Authentification Service”,“message”:“[ ‘logging in with the refresh token’ ]”}
{“timestamp”:“2023-09-17T10:03:25.199Z”,“level”:“info”,“moduleName”:“Authentification Service”,“message”:“[ ‘refreshing the tokens with refresh token’ ]”}
{“timestamp”:“2023-09-17T10:03:25.218Z”,“level”:“error”,“moduleName”:“Authentification Service”,“message”:“[ ‘Error fetching new access token from Refresh Token: Error: getaddrinfo ENOTFOUND core.hub-proxy.unity3d.com’ ]”}
{“timestamp”:“2023-09-17T10:03:29.446Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘checkEntitlements: checking entitlements for: com.unity.editor.ui’ ]”}
{“timestamp”:“2023-09-17T10:03:29.474Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘Successfully checked for entitlements request.’ ]”}
{“timestamp”:“2023-09-17T10:03:29.487Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘Get all entitlement groups’ ]”}
{“timestamp”:“2023-09-17T10:03:29.491Z”,“level”:“error”,“moduleName”:“LocalProjectService”,“message”:“[\n 'Error while opening a local new project: ',\n ProjectError\n at ProjectValidatorService. (/Applications/Unity Hub.app/Contents/Resources/app.asar/build/main/services/projectService/ProjectValidatorService.js:30:23)\n at Generator.next ()\n at fulfilled (/Applications/Unity Hub.app/Contents/Resources/app.asar/build/main/services/projectService/ProjectValidatorService.js:5:58) {\n errorCode: ‘NOT_A_VALID_PROJECT’,\n projectName: undefined,\n projectVersion: undefined,\n projectArchitecture: undefined,\n projectPath: undefined\n }\n]”}
{“timestamp”:“2023-09-17T10:03:29.491Z”,“level”:“error”,“moduleName”:“LocalProjectService”,“message”:“[ ‘Error while opening project: {"code":400,"error":{"errorCode":"NOT_A_VALID_PROJECT","projectName":"GAME1","projectVersion":"2022.3.7f1","projectArchitecture":"arm64","projectPath":"/Users/jj/Documents/_GAME/0/GAME 1"}}’ ]”}
{“timestamp”:“2023-09-17T10:03:29.508Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘Successfully received all entitlement groups details’ ]”}
{“timestamp”:“2023-09-17T10:03:29.508Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘Received 1 entitlement groups’ ]”}
{“timestamp”:“2023-09-17T10:03:29.509Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘Get all entitlement groups’ ]”}
{“timestamp”:“2023-09-17T10:03:29.524Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘Successfully received all entitlement groups details’ ]”}
{“timestamp”:“2023-09-17T10:03:29.524Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘Received 1 entitlement groups’ ]”}
{“timestamp”:“2023-09-17T10:03:30.224Z”,“level”:“info”,“moduleName”:“Authentification Service”,“message”:“[ ‘Access token is expired, attempting to get a new one with refresh token’ ]”}
{“timestamp”:“2023-09-17T10:03:30.224Z”,“level”:“info”,“moduleName”:“Authentification Service”,“message”:“[ ‘logging in with the refresh token’ ]”}
{“timestamp”:“2023-09-17T10:03:30.224Z”,“level”:“info”,“moduleName”:“Authentification Service”,“message”:“[ ‘refreshing the tokens with refresh token’ ]”}
{“timestamp”:“2023-09-17T10:03:30.229Z”,“level”:“error”,“moduleName”:“Authentification Service”,“message”:“[ ‘Error fetching new access token from Refresh Token: Error: getaddrinfo ENOTFOUND core.hub-proxy.unity3d.com’ ]”}
{“timestamp”:“2023-09-17T10:03:32.896Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘Get all entitlement groups’ ]”}
{“timestamp”:“2023-09-17T10:03:32.922Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘Successfully received all entitlement groups details’ ]”}
{“timestamp”:“2023-09-17T10:03:32.922Z”,“level”:“info”,“moduleName”:“LicensingSdkService”,“message”:“[ ‘Received 1 entitlement groups’ ]”}
{“timestamp”:“2023-09-17T10:03:32.933Z”,“level”:“info”,“moduleName”:“CloudAnalytics”,“message”:“[\n AxiosError: getaddrinfo ENOTFOUND prd-lender.cdp.internal.unity3d.com\n at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26) {\n hostname: ‘prd-lender.cdp.internal.unity3d.com’,\n syscall: ‘getaddrinfo’,\n code: ‘ENOTFOUND’,\n errno: -3008,\n config: { transitional: [Object], adapter: [Function: httpAdapter], transformRequest: [Array], transformResponse: [Array], timeout: 0, xsrfCookieName: ‘XSRF-TOKEN’, xsrfHeaderName: ‘X-XSRF-TOKEN’, maxContentLength: -1, maxBodyLength: -1, env: [Object], validateStatus: [Function: validateStatus], headers: [Object], proxy: false, responseType: ‘json’, method: ‘post’, url: ‘https://prd-lender.cdp.internal.unity3d.com/v1/events’, data: ‘{"common":{"appid":"hub","hub_version":"3.5.2g","machineid":"9sBO6bwPy0KlThtYhM2kUy1Twx4=","platform":"kOSX","platformid":0,"session_guid":"dc5a8875-07e4-48e6-94e4-ee34a0e7f7e8","cloud_user_id":"18967489548879","license_hash":"4bea0c45d1c540541ad9a16220aa53a18d854b2f"}}\n{"type":"hub.projectOpen.v1","msg":{"editor_version":"2022.3.7f1","editor_architecture":"arm64","target_platform":"","cloudprojectid":null,"organizationid":"","localprojectid":"d91546f741def4d7aa418e5c48372034","status":"Error","source":"","ts":1694945004019}}\n{"type":"hub.projectOpen.v1","msg":{"editor_version":"2022.3.7f1","editor_architecture":"arm64","target_platform":"","cloudprojectid":null,"organizationid":"","localprojectid":"d91546f741def4d7aa418e5c48372034","status":"Error","source":"","ts":1694945009489}}\n’ },\n request: Writable { _writableState: [WritableState], _events: [Object: null prototype], _eventsCount: 3, _maxListeners: undefined, _options: [Object], _ended: false, _ending: true, _redirectCount: 0, _redirects: [ ], _requestBodyLength: 794, _requestBodyBuffers: [Array], _onNativeResponse: [Function (anonymous)], _currentRequest: [ClientRequest], _currentUrl: ‘https://prd-lender.cdp.internal.unity3d.com/v1/events’, [Symbol(kCapture)]: false }\n }\n]”}
{“timestamp”:“2023-09-17T10:03:35.232Z”,“level”:“info”,“moduleName”:“Authentification Service”,“message”:“[ ‘Access token is expired, attempting to get a new one with refresh token’ ]”}
{“timestamp”:“2023-09-17T10:03:35.232Z”,“level”:“info”,“moduleName”:“Authentification Service”,“message”:“[ ‘logging in with the refresh token’ ]”}

I really can’t say what happened to your files, unfortunately. None of what you describe seems to be related - signing out (or failing to sign in) should not delete files, nor should building your game.

The logs do show a login error (“Error: getaddrinfo ENOTFOUND core.hub-proxy.unity3d.com”), but I’m not sure this is related to your problem. That error indicates that the Hub is unable to connect to the authentication service due to a network problem, which could happen if you are behind a firewall or proxy server.

What Unity version were you using, very specifically? And when the issue occurred, were you using the Package Manager and attempting to remove a package? There was a severe bug that was fixed in all supported Unity versions earlier this year where, under specific circumstances, clicking the Remove button on a package that was added via a “file:” dependency could lead to deleting the whole project, which seems like what occurred to you.

No i was not using Package Manager at that moment.
Unity 2022.3.7f1
Hub 3.5.2
Now its just for statistic. I was wondering if there is a special place Unity deleting files to. But anyway now i’ve already unpacked my backup file and returned to work.