BabylonJS / BabylonReactNative

Build React Native applications with the power of Babylon Native
MIT License
372 stars 59 forks source link

Error on Building Package: The path cannot be traversed because it contains an untrusted mount point. #347

Closed PolygonalSun closed 1 year ago

PolygonalSun commented 2 years ago

Describe the bug When the package is being built to be deployed locally for debugging purposes, the following message comes up in the console:

Deploying C:\git-repos\BabylonReactNative\Apps\Playground\Playground\windows\x64\Debug\Playground\Playground.b...- Failed to deploy: ERROR: DEP0700: Registration of the app failed. [0x80073CF0] error 0x800701C0: Opening file from location: AppxManifest.xml failed with error: The path cannot be traversed because it contains an untrusted mount point.

This happens when trying to build/deploy the UWP version of the Playground app. It should be noted that this build does work on Windows 10 PCs but I haven't seen a version that works on a Windows 11 PC.

To Reproduce Steps to reproduce the behavior:

  1. Update to latest BabylonReactNative commit
  2. Follow steps to build against UWP, as described in README.md
  3. Either run the npm run windows or open the .sln and build/deploy in Visual Studio (tested with 2019)

I suspect that there may be some trust or permissions issue that's preventing the UWP Playground app from building and deploying the package on Windows 11.

bghgary commented 2 years ago

I suspect this may be related to the Playground directory junction we are doing for the version select.

CedricGuillemet commented 2 years ago

Yes, @bghgary , you are right. UWP is a bit touchy on the symlink. I tried to change the output directory in the .vcxproj : https://github.com/BabylonJS/BabylonReactNative/pull/357 It worked with 0.65 but not with 0.64. It looks like a dead end. But, I 've found an easy workaround: Run the npm run select command as administrator and everything works fine. There is also the way I used when developing the react native switch: run the build commands directly in 0.64 or 0.65 folders and force an autolink. As I constantly switch between both versions for testing, it was handy but it's a bad solution for someone who wants to simply run the PG. Running as admin is easy and can be documented. I'll do the PR for the readme if you think it's the 'good' solution for now. @bghgary @ryantrem

CedricGuillemet commented 1 year ago

PR https://github.com/BabylonJS/BabylonReactNative/pull/359

CedricGuillemet commented 1 year ago

Doc updated. Closing until another solution is found.