Bug: Intermittent Add-AppxPackage : Deployment failed with HRESULT: 0x80073D23, The deployment operation was blocked because Special profile deployment is
Status: RESOLVED
Priority: P5
Resolution: INCOMPLETE
Created: 2023-04-07 13:06:17+00:00
Resolved: 2024-07-08 12:04:45+00:00

**Filed by:** nbeleuzu [at] mozilla.com
**Parsed log:** https://treeherder.mozilla.org/logviewer?job_id=411690298&repo=autoland
**Full log:** https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/JEUkavsGQaGtdY-Tw5dkaA/runs/0/artifacts/public/logs/live_backing.log

---
```
[task 2023-04-07T12:23:02.940Z] 12:23:02     INFO - Copy/paste: Z:\task_168086558555483\build\venv\Scripts\mozinstall Z:\task_168086558555483\build\installer.msix --destination Z:\task_168086558555483\build\application
[task 2023-04-07T12:23:11.475Z] 12:23:11    ERROR - Errors received:
[task 2023-04-07T12:23:11.475Z] 12:23:11     INFO - Reading from file tmpfile_stderr
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -  Add-AppxPackage : Deployment failed with HRESULT: 0x80073D23, The deployment operation was blocked because Special profile deployment is 
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -  not allowed. Please try logging into an account that is not a Special profile. You can try logging out and logging back into the current 
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -  account, or try logging into a different account.
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -  The package deployment operation is blocked by the "Allow deployment operations in special profiles" policy.
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -  NOTE: For additional information, look for [ActivityId] b8ff6d9d-0fdd-0007-c218-665e4a69d901 in the Event Log or use the command line 
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -  Get-AppPackageLog -ActivityID b8ff6d9d-0fdd-0007-c218-665e4a69d901
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -  At line:1 char:1
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -  + Add-AppxPackage -Path Z:\task_168086558555483\build\installer.msix
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -      + CategoryInfo          : NotSpecified: (Z:\task_1680865...\installer.msix:String) [Add-AppxPackage], Exception
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -      + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -  Traceback (most recent call last):
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -    File "Z:\task_168086558555483\build\venv\lib\site-packages\mozinstall\mozinstall.py", line 136, in install
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -      install_dir = _install_msix(src)
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -    File "Z:\task_168086558555483\build\venv\lib\site-packages\mozinstall\mozinstall.py", line 398, in _install_msix
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -      subprocess.check_call(cmd)
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -    File "c:\mozilla-build\python3\lib\subprocess.py", line 373, in check_call
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -      raise CalledProcessError(retcode, cmd)
[task 2023-04-07T12:23:11.477Z] 12:23:11    ERROR -  subprocess.CalledProcessError: Command 'powershell.exe "Add-AppxPackage" "-Path" "Z:\task_168086558555483\build\installer.msix"' returned non-zero exit status 1.
[task 2023-04-07T12:23:11.478Z] 12:23:11    ERROR -  During handling of the above exception, another exception occurred:
[task 2023-04-07T12:23:11.478Z] 12:23:11    ERROR -  Traceback (most recent call last):
[task 2023-04-07T12:23:11.478Z] 12:23:11    ERROR -    File "Z:\task_168086558555483\build\venv\Scripts\mozinstall-script.py", line 33, in <module>
[task 2023-04-07T12:23:11.478Z] 12:23:11    ERROR -      sys.exit(load_entry_point('mozInstall==2.0.1', 'console_scripts', 'mozinstall')())
[task 2023-04-07T12:23:11.478Z] 12:23:11    ERROR -    File "Z:\task_168086558555483\build\venv\lib\site-packages\mozinstall\mozinstall.py", line 429, in install_cli
[task 2023-04-07T12:23:11.478Z] 12:23:11    ERROR -      install_path = install(src, options.dest)
[task 2023-04-07T12:23:11.478Z] 12:23:11    ERROR -    File "Z:\task_168086558555483\build\venv\lib\site-packages\mozinstall\mozinstall.py", line 157, in install
[task 2023-04-07T12:23:11.478Z] 12:23:11    ERROR -      reraise(InstallError, error, trbk)
[task 2023-04-07T12:23:11.478Z] 12:23:11    ERROR -    File "Z:\task_168086558555483\build\venv\lib\site-packages\six.py", line 695, in reraise
[task 2023-04-07T12:23:11.478Z] 12:23:11    ERROR -      raise value.with_traceback(tb)
[task 2023-04-07T12:23:11.478Z] 12:23:11    ERROR -    File "Z:\task_168086558555483\build\venv\lib\site-packages\mozinstall\mozinstall.py", line 136, in install
[task 2023-04-07T12:23:11.478Z] 12:23:11    ERROR -      install_dir = _install_msix(src)
[task 2023-04-07T12:23:11.478Z] 12:23:11    ERROR -    File "Z:\task_168086558555483\build\venv\lib\site-packages\mozinstall\mozinstall.py", line 398, in _install_msix
[task 2023-04-07T12:23:11.478Z] 12:23:11    ERROR -      subprocess.check_call(cmd)
[task 2023-04-07T12:23:11.478Z] 12:23:11    ERROR -    File "c:\mozilla-build\python3\lib\subprocess.py", line 373, in check_call
[task 2023-04-07T12:23:11.478Z] 12:23:11    ERROR -      raise CalledProcessError(retcode, cmd)
[task 2023-04-07T12:23:11.478Z] 12:23:11    ERROR -  mozinstall.mozinstall.InstallError: Failed to install "Z:\task_168086558555483\build\installer.msix (Command 'powershell.exe "Add-AppxPackage" "-Path" "Z:\task_168086558555483\build\installer.msix"' returned non-zero exit status 1.)"
[task 2023-04-07T12:23:11.478Z] 12:23:11     INFO - Using _rmtree_windows ...
[task 2023-04-07T12:23:11.479Z] 12:23:11     INFO - Running command: del /F /Q "Z:\task_168086558555483\tmpfile_stderr"
[task 2023-04-07T12:23:11.488Z] 12:23:11     INFO - Return code: 0
[task 2023-04-07T12:23:11.488Z] 12:23:11     INFO - Using _rmtree_windows ...
[task 2023-04-07T12:23:11.488Z] 12:23:11     INFO - Running command: del /F /Q "Z:\task_168086558555483\tmpfile_stdout"
[task 2023-04-07T12:23:11.497Z] 12:23:11     INFO - Return code: 0
[task 2023-04-07T12:23:11.497Z] 12:23:11     INFO - Return code: 1
[task 2023-04-07T12:23:11.497Z] 12:23:11  WARNING - setting return code to 3
[task 2023-04-07T12:23:11.497Z] 12:23:11    FATAL - Halting on failure while running ['Z:\\task_168086558555483\\build\\venv\\Scripts\\mozinstall', 'Z:\\task_168086558555483\\build\\installer.msix', '--destination', 'Z:\\task_168086558555483\\build\\application']
[task 2023-04-07T12:23:11.497Z] 12:23:11    FATAL - Running post_fatal callback...
[task 2023-04-07T12:23:11.497Z] 12:23:11    FATAL - Exiting 3
```