DEV Community

iamtito
iamtito

Posted on

Ansible Error – “NSPlaceholderDate”

If you are working in ansible and you try to run a playbook and you come across the error below 👇

TASK [Obtain secrets and deploy] ***********************************************************************************************************************************************************************************************
objc[6763]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called.
objc[6763]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.

As mentioned in issue:https://github.com/ansible/ansible/issues/31869
This is an issue with macOS 10.13 where Apple changed the way fork() works on the OS which is incompatible with Python fork().

Solution:

export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

To avoid doing it manually you can simply append it to your bash_profile

echo "export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES" >> ~/.bash_profile
source ~/.bash_profile

Top comments (0)