tobias-richter / ansible-tasmota

Ansible Role for managing tasmota devices with tasmota commands
Apache License 2.0
31 stars 12 forks source link

Ansible-tasmota crashing on macOS 12.2.1 (21D62) #27

Closed user34756361233 closed 2 years ago

user34756361233 commented 2 years ago

When running:

ansible-playbook playbooks/adjust_reporting_tasmotas.yaml

with the following playbook

- hosts: tasmotas
  gather_facts: no
  tasks:
    - name: Ensure device reports status
      include_role:
        name: tobias_richter.tasmota  
      vars:
        tasmota_commands:
          - command: Teleperiod
            value: 200

I get the following error:

han@MBP2018-2 Ansible % ansible-playbook playbooks/upgrade_tasmotas.yaml

PLAY [tasmotas] ***********************************************************************************************************************************************************

TASK [Ensure device reports status] ***************************************************************************************************************************************

TASK [tobias_richter.tasmota : Configure tasmota.] ************************************************************************************************************************
objc[75669]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[75669]: +[__NSCFConstantString 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.

This is related to:

https://github.com/ansible/ansible/issues/32499 : OSX crash complaining of operation in progress in another thread when fork() was called #32499

Ist there anything I can do to prevent the error so this playbook is run?

tobias-richter commented 2 years ago

@daballiemo unfortunately I am not able to assist here since I can not reproduce the issue due to a missing test device. I suggest do go around this problem and use another machine like a VirtualBox+Vagrant setup with an ansible controlhost running in this VM.

user34756361233 commented 2 years ago

I will try to do that, this of course does not solve the original issue. As I do not intend to send you test equipment 😋 I will close the issue.

izevaka commented 1 year ago

Had the same issue, found a workaround here.

OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES ansilbe-playbook playbook.yml