Touch bar widget (config from bash script) : icon not maintained over time

Describe the bug

Context: A touch bar widget that gets its configuration from a bash script (text, icon_path, background_color) that runs every 2 seconds.

Problem: After a while, the icon is not showing anymore ( i have made sure that the icon path is always present in the response and checked that by running the script and seeing the response from btt ui)

Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):

Touch Bar

Device information:

  • Type of Mac: MacBook Pro
  • macOS version: macOS mojave 10.14.5
  • BetterTouchTool version: 2.864

Additional information (e.g. StackTraces, related issues, screenshots, workarounds, etc.):

A workaround is to restart btt then the icon appear again.