BusKill / buskill-app

BusKill's main CLI/GUI app for arming/disarming/configuring the BusKill laptop kill cord
https://www.buskill.in
GNU General Public License v3.0
157 stars 24 forks source link

Release v0.7.0 #73

Closed maltfield closed 1 year ago

maltfield commented 1 year ago

This issue will track the effort to release BusKill App v0.7.0

maltfield commented 1 year ago

I created a new branch for v0.7.0 and updated the CHANGELOG. Next-up:

  1. @goldfishlaser needs to help me test this build on MacOS
  2. I need to update the documentation on how to change the trigger from lock-screen to soft-shutdown
maltfield commented 1 year ago

Besides some bug fixes, the biggest changes in this release are these two ginormous features:

maltfield commented 1 year ago

@goldfishlaser can you please test this build on MacOS?

Testing process:

  1. First, make sure you save all your work and close all your open apps, as this test will suddenly shutdown your computer!
  2. Open the BusKill app.
  3. Insert some USB device into the machine
  4. Click the "Arm" button
  5. Verify that it says that it's armed with the lock-screen trigger
  6. Remove the USB device
  7. Confirm that it locks your screen
  8. Unlock the screen
  9. Insert the USB device again
  10. Open the Navigation Drawer (click the hamburger menu on the top-left of the app)
  11. Click Settings
  12. Click Trigger
  13. Click soft-shutdown
  14. Confirm the change
  15. Click the back button
  16. Click the back button
  17. Confirm that it prompts you for your password
  18. Click the Disarm & Re-Arm Now Button
  19. Remove the USB device
  20. Confirm that the machine shuts-down

Please let me know if there were any anomalies in this process. Thank you!

maltfield commented 1 year ago

In trying to figure out how to take screenshots of the app (for the documentation) that are consistent with the previously-taken screenshots in the documentation, I finally figured out it's Ubuntu.

Note to self for the future: the screenshots were taken in Xubuntu 22.04 LTS with xfce4-screenshooter and the default options (Active Window, Capture Mouse Pointer, Capture Window Bar, 3-second Delay

For the red borders, I use GIMP and a grow of 10 pixels followed by a border of 4 pixels

goldfishlaser commented 1 year ago

Please let me know if there were any anomalies in this process. Thank you!

Everything worked exactly as you described except that unfortunately the ejection event did not trigger the soft-shutdown.

Here's the debug log:

18:55:06,192 root INFO ===============================================================================
18:55:06,192 root INFO INFO: Writing to log file '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/buskill.log'
18:55:06,192 root DEBUG BUSKILL_VERSION|{'VERSION': 'v0.7.0', 'GITHUB_REF': 'refs/heads/v0.7.0', 'GITHUB_SHA': 'b90839f3467aca7c8190b39d5ae4d3c62fcb2c0e', 'SOURCE_DATE_EPOCH': '1686772522'}|
18:55:06,192 root DEBUG os.environ|environ({'USER': 'mallen', 'COMMAND_MODE': 'unix2003', '__CFBundleIdentifier': 'buskill-v0.7.0', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LOGNAME': 'mallen', 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.qWDXpPlUlX/Listeners', 'HOME': '/Users/mallen', 'SHELL': '/bin/bash', 'TMPDIR': '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/', '__CF_USER_TEXT_ENCODING': '0x381820B3:0x0:0x0', 'XPC_SERVICE_NAME': 'application.buskill-v0.7.0.16.71', 'XPC_FLAGS': '0x0', 'KIVY_DATA_DIR': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/kivy_install/data', 'KIVY_MODULES_DIR': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/kivy_install/modules', 'GST_REGISTRY_FORK': 'no', 'GST_PLUGIN_PATH': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/gst-plugins', 'GST_REGISTRY': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/registry.bin', 'GST_PLUGIN_SYSTEM_PATH': ''})|
18:55:06,192 root DEBUG sys.argv|['/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill']|
18:55:06,192 root DEBUG sys.builtin_modules_names|('_abc', '_ast', '_codecs', '_collections', '_functools', '_imp', '_io', '_locale', '_operator', '_signal', '_sre', '_stat', '_string', '_symtable', '_thread', '_tracemalloc', '_warnings', '_weakref', 'atexit', 'builtins', 'errno', 'faulthandler', 'gc', 'itertools', 'marshal', 'posix', 'pwd', 'sys', 'time', 'xxsubtype', 'zipimport')|
18:55:06,192 root DEBUG sys.executable|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill|
18:55:06,192 root DEBUG sys.path|['/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/base_library.zip', '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/lib-dynload', '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS']|
18:55:06,192 root DEBUG sys.prefix|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS|
18:55:06,192 root DEBUG sys.version|3.7.8 (default, Jul  4 2020, 10:17:17) 
[Clang 11.0.3 (clang-1103.0.32.62)]|
18:55:06,192 root DEBUG sys.api_version|1013|
18:55:06,192 root DEBUG sys.version_info|sys.version_info(major=3, minor=7, micro=8, releaselevel='final', serial=0)|
18:55:06,193 root DEBUG __name__|__main__|
18:55:06,193 root DEBUG sys.platform|darwin|
18:55:06,248 root DEBUG platform.platform()|Darwin-22.3.0-x86_64-i386-64bit|
18:55:06,248 root DEBUG platform.system()|Darwin|
18:55:06,248 root DEBUG platform.release()|22.3.0|
18:55:06,248 root DEBUG platform.version()|Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64|
18:55:06,248 root DEBUG platform.machine()|x86_64|
18:55:06,248 root DEBUG platform.uname()|uname_result(system='Darwin', node='MAllen-MAC-L.attlocal.net', release='22.3.0', version='Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64', machine='x86_64', processor='i386')|
18:55:06,251 root DEBUG platform.mac_ver()|('10.16', ('', '', ''), 'x86_64')|
18:55:06,251 root INFO buskill version {'VERSION': 'v0.7.0', 'GITHUB_REF': 'refs/heads/v0.7.0', 'GITHUB_SHA': 'b90839f3467aca7c8190b39d5ae4d3c62fcb2c0e', 'SOURCE_DATE_EPOCH': '1686772522'}
18:55:06,252 packages.buskill DEBUG DEBUG: EXECUTED_AS_SCRIPT:|False|
DEBUG: EXE_PATH:|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill|
DEBUG: EXE_DIR:|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS|
DEBUG: EXE_FILE:|buskill|
DEBUG: APP_DIR:|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app|
DEBUG: APPS_DIR:|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d|
DEBUG: SRC_DIR:|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS|
DEBUG: os.environ['PATH']:|/usr/bin:/bin:/usr/sbin:/sbin:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app|

18:55:06,252 packages.buskill DEBUG DEBUG: Unable to write to '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d'; skipping.
    [Errno 30] Read-only file system: '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/tmpymtfza2s'

18:55:06,252 packages.buskill DEBUG DEBUG: Unable to write to '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app'; skipping.
    [Errno 30] Read-only file system: '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/tmpsqnzaxv5'

18:55:06,255 packages.buskill INFO INFO: using DATA_DIR:|/Users/mallen/.buskill|
18:55:06,260 packages.buskill DEBUG DEBUG: CONF_FILE:|/Users/mallen/.buskill/config.ini|

18:55:06,263 packages.buskill DEBUG DEBUG: Attempting to set 'trigger' set to 'lock-screen'
18:55:06,263 packages.buskill INFO INFO: BusKill 'trigger' set to 'lock-screen'
18:55:06,323 kivy WARNING [Config      ] Older configuration version detected (0 instead of 21)
18:55:06,324 kivy WARNING [Config      ] Upgrading configuration in progress.
18:55:06,324 kivy DEBUG [Config      ] Upgrading from 0 to 1
18:55:06,330 kivy INFO [Logger      ] Record log in /Users/mallen/.buskill/logs/kivy_23-06-14_0.txt
18:55:06,328 kivy INFO [Kivy        ] v1.11.1
18:55:06,330 kivy INFO [Kivy        ] Installed at "/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/kivy/__init__.pyc"
18:55:06,330 kivy INFO [Python      ] v3.7.8 (default, Jul  4 2020, 10:17:17) 
[Clang 11.0.3 (clang-1103.0.32.62)]
18:55:06,330 kivy INFO [Python      ] Interpreter at "/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill"
18:55:06,424 kivy INFO [Factory     ] 184 symbols loaded
18:55:06,766 kivy INFO [Image       ] Providers: img_tex, img_imageio, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
18:55:07,118 kivy INFO [Window      ] Provider: sdl2
18:55:07,557 kivy INFO [GL          ] Using the "OpenGL ES 2" graphics system
18:55:07,558 kivy INFO [GL          ] Backend used <sdl2>
18:55:07,558 kivy INFO [GL          ] OpenGL version <b'2.1 INTEL-20.2.50'>
18:55:07,558 kivy INFO [GL          ] OpenGL vendor <b'Intel Inc.'>
18:55:07,558 kivy INFO [GL          ] OpenGL renderer <b'Intel(R) Iris(TM) Plus Graphics 655'>
18:55:07,559 kivy INFO [GL          ] OpenGL parsed version: 2, 1
18:55:07,559 kivy INFO [GL          ] Shading version <b'1.20'>
18:55:07,559 kivy INFO [GL          ] Texture max size <16384>
18:55:07,559 kivy INFO [GL          ] Texture max units <16>
18:55:07,590 kivy INFO [Window      ] auto add sdl2 input provider
18:55:07,666 kivy INFO [Window      ] virtual keyboard not allowed, single mode, not docked
18:55:07,716 kivy INFO [Text        ] Provider: sdl2
18:55:07,737 kivy INFO [Clipboard   ] Provider: sdl2(['clipboard_nspaste'] ignored)
18:55:07,873 kivy INFO [GL          ] NPOT texture support is available
18:55:07,965 buskill_gui DEBUG DEBUG: adding screen:|<Screen name='main'>|
18:55:07,965 buskill_gui DEBUG DEBUG: User switched to 'MainWindow' screen
18:55:07,965 buskill_gui DEBUG DEBUG: adding screen:|<Screen name='debug_log'>|
18:55:07,966 buskill_gui DEBUG DEBUG: adding screen:|<Screen name='settings'>|
18:55:08,7 kivy INFO [Base        ] Start application main loop
18:55:20,33 packages.buskill DEBUG DEBUG: attempting to arm BusKill via <bound method BusKill.armNix of <packages.buskill.BusKill object at 0x101634810>>() with the 'lock-screen' trigger
18:55:20,59 packages.buskill DEBUG DEBUG:__getstate__() pre:dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'root_child', 'is_armed', 'usb_handler', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
18:55:20,60 packages.buskill DEBUG DEBUG:__getstate__() post:|dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'is_armed', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
18:55:20,68 packages.buskill INFO INFO: BusKill is armed. Listening for removal event.
INFO: To disarm the CLI, exit with ^C or close this terminal
18:55:20,713 root INFO ===============================================================================
18:55:20,713 root INFO INFO: Writing to log file '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/buskill.log'
18:55:20,713 root DEBUG BUSKILL_VERSION|{'VERSION': 'v0.7.0', 'GITHUB_REF': 'refs/heads/v0.7.0', 'GITHUB_SHA': 'b90839f3467aca7c8190b39d5ae4d3c62fcb2c0e', 'SOURCE_DATE_EPOCH': '1686772522'}|
18:55:20,713 root DEBUG os.environ|environ({'USER': 'mallen', 'COMMAND_MODE': 'unix2003', '__CFBundleIdentifier': 'buskill-v0.7.0', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app', 'LOGNAME': 'mallen', 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.qWDXpPlUlX/Listeners', 'HOME': '/Users/mallen', 'SHELL': '/bin/bash', 'TMPDIR': '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/', '__CF_USER_TEXT_ENCODING': '0x381820B3:0x0:0x0', 'XPC_SERVICE_NAME': '0', 'XPC_FLAGS': '0x0', 'KIVY_DATA_DIR': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/kivy_install/data', 'KIVY_MODULES_DIR': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/kivy_install/modules', 'GST_REGISTRY_FORK': 'no', 'GST_PLUGIN_PATH': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/gst-plugins', 'GST_REGISTRY': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/registry.bin', 'GST_PLUGIN_SYSTEM_PATH': '', 'DYLD_FALLBACK_LIBRARY_PATH': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS', 'KIVY_HOME': '/Users/mallen/.buskill'})|
18:55:20,713 root DEBUG sys.argv|['/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill', '-B', '-S', '-E', '-s', '-c', 'from multiprocessing.semaphore_tracker import main;main(14)']|
18:55:20,713 root DEBUG sys.builtin_modules_names|('_abc', '_ast', '_codecs', '_collections', '_functools', '_imp', '_io', '_locale', '_operator', '_signal', '_sre', '_stat', '_string', '_symtable', '_thread', '_tracemalloc', '_warnings', '_weakref', 'atexit', 'builtins', 'errno', 'faulthandler', 'gc', 'itertools', 'marshal', 'posix', 'pwd', 'sys', 'time', 'xxsubtype', 'zipimport')|
18:55:20,713 root DEBUG sys.executable|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill|
18:55:20,713 root DEBUG sys.path|['/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/base_library.zip', '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/lib-dynload', '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS']|
18:55:20,714 root DEBUG sys.prefix|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS|
18:55:20,714 root DEBUG sys.version|3.7.8 (default, Jul  4 2020, 10:17:17) 
[Clang 11.0.3 (clang-1103.0.32.62)]|
18:55:20,714 root DEBUG sys.api_version|1013|
18:55:20,714 root DEBUG sys.version_info|sys.version_info(major=3, minor=7, micro=8, releaselevel='final', serial=0)|
18:55:20,714 root DEBUG __name__|__main__|
18:55:20,714 root DEBUG sys.platform|darwin|
18:55:20,721 root INFO ===============================================================================
18:55:20,722 root INFO INFO: Writing to log file '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/buskill.log'
18:55:20,722 root DEBUG BUSKILL_VERSION|{'VERSION': 'v0.7.0', 'GITHUB_REF': 'refs/heads/v0.7.0', 'GITHUB_SHA': 'b90839f3467aca7c8190b39d5ae4d3c62fcb2c0e', 'SOURCE_DATE_EPOCH': '1686772522'}|
18:55:20,722 root DEBUG os.environ|environ({'USER': 'mallen', 'COMMAND_MODE': 'unix2003', '__CFBundleIdentifier': 'buskill-v0.7.0', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app', 'LOGNAME': 'mallen', 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.qWDXpPlUlX/Listeners', 'HOME': '/Users/mallen', 'SHELL': '/bin/bash', 'TMPDIR': '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/', '__CF_USER_TEXT_ENCODING': '0x381820B3:0x0:0x0', 'XPC_SERVICE_NAME': '0', 'XPC_FLAGS': '0x0', 'KIVY_DATA_DIR': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/kivy_install/data', 'KIVY_MODULES_DIR': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/kivy_install/modules', 'GST_REGISTRY_FORK': 'no', 'GST_PLUGIN_PATH': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/gst-plugins', 'GST_REGISTRY': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/registry.bin', 'GST_PLUGIN_SYSTEM_PATH': '', 'DYLD_FALLBACK_LIBRARY_PATH': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS', 'KIVY_HOME': '/Users/mallen/.buskill'})|
18:55:20,722 root DEBUG sys.argv|['/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill', '--multiprocessing-fork', 'tracker_fd=15', 'pipe_handle=17']|
18:55:20,722 root DEBUG sys.builtin_modules_names|('_abc', '_ast', '_codecs', '_collections', '_functools', '_imp', '_io', '_locale', '_operator', '_signal', '_sre', '_stat', '_string', '_symtable', '_thread', '_tracemalloc', '_warnings', '_weakref', 'atexit', 'builtins', 'errno', 'faulthandler', 'gc', 'itertools', 'marshal', 'posix', 'pwd', 'sys', 'time', 'xxsubtype', 'zipimport')|
18:55:20,722 root DEBUG sys.executable|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill|
18:55:20,722 root DEBUG sys.path|['/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/base_library.zip', '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/lib-dynload', '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS']|
18:55:20,722 root DEBUG sys.prefix|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS|
18:55:20,722 root DEBUG sys.version|3.7.8 (default, Jul  4 2020, 10:17:17) 
[Clang 11.0.3 (clang-1103.0.32.62)]|
18:55:20,723 root DEBUG sys.api_version|1013|
18:55:20,723 root DEBUG sys.version_info|sys.version_info(major=3, minor=7, micro=8, releaselevel='final', serial=0)|
18:55:20,723 root DEBUG __name__|__main__|
18:55:20,723 root DEBUG sys.platform|darwin|
18:55:20,728 root DEBUG platform.platform()|Darwin-22.3.0-x86_64-i386-64bit|
18:55:20,728 root DEBUG platform.system()|Darwin|
18:55:20,728 root DEBUG platform.release()|22.3.0|
18:55:20,728 root DEBUG platform.version()|Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64|
18:55:20,728 root DEBUG platform.machine()|x86_64|
18:55:20,728 root DEBUG platform.uname()|uname_result(system='Darwin', node='MAllen-MAC-L.attlocal.net', release='22.3.0', version='Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64', machine='x86_64', processor='i386')|
18:55:20,731 root DEBUG platform.mac_ver()|('10.16', ('', '', ''), 'x86_64')|
18:55:20,736 root DEBUG platform.platform()|Darwin-22.3.0-x86_64-i386-64bit|
18:55:20,737 root DEBUG platform.system()|Darwin|
18:55:20,737 root DEBUG platform.release()|22.3.0|
18:55:20,737 root DEBUG platform.version()|Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64|
18:55:20,737 root DEBUG platform.machine()|x86_64|
18:55:20,737 root DEBUG platform.uname()|uname_result(system='Darwin', node='MAllen-MAC-L.attlocal.net', release='22.3.0', version='Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64', machine='x86_64', processor='i386')|
18:55:20,740 root DEBUG platform.mac_ver()|('10.16', ('', '', ''), 'x86_64')|
18:55:20,807 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:55:20,807 packages.buskill DEBUG context:|<usb1.USBContext object at 0x10595e210>|
18:55:20,808 packages.buskill DEBUG device:|Bus 001 Device 002: ID 058f:8468|
18:55:20,808 packages.buskill DEBUG event:|1|
18:55:20,808 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:55:20,808 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:55:20,808 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:55:20,808 packages.buskill DEBUG context:|<usb1.USBContext object at 0x10595e210>|
18:55:20,808 packages.buskill DEBUG device:|Bus 020 Device 001: ID 2109:2817|
18:55:20,808 packages.buskill DEBUG event:|1|
18:55:20,808 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:55:20,808 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:55:20,808 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:55:20,808 packages.buskill DEBUG context:|<usb1.USBContext object at 0x10595e210>|
18:55:20,808 packages.buskill DEBUG device:|Bus 001 Device 001: ID 2109:0817|
18:55:20,808 packages.buskill DEBUG event:|1|
18:55:20,808 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:55:20,808 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:55:48,481 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:55:48,482 packages.buskill DEBUG context:|<usb1.USBContext object at 0x10595e210>|
18:55:48,482 packages.buskill DEBUG device:|Bus 020 Device 003: ID 058f:6387|
18:55:48,482 packages.buskill DEBUG event:|1|
18:55:48,482 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:55:48,482 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:55:56,29 packages.buskill DEBUG DEBUG: attempting to disarm BusKill
18:55:56,32 packages.buskill INFO INFO: BusKill is disarmed.
18:55:56,873 packages.buskill DEBUG DEBUG: attempting to arm BusKill via <bound method BusKill.armNix of <packages.buskill.BusKill object at 0x101634810>>() with the 'lock-screen' trigger
18:55:56,875 packages.buskill DEBUG DEBUG:__getstate__() pre:dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'root_child', 'is_armed', 'usb_handler', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
18:55:56,875 packages.buskill DEBUG DEBUG:__getstate__() post:|dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'is_armed', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
18:55:56,883 packages.buskill INFO INFO: BusKill is armed. Listening for removal event.
INFO: To disarm the CLI, exit with ^C or close this terminal
18:55:57,470 root INFO ===============================================================================
18:55:57,471 root INFO INFO: Writing to log file '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/buskill.log'
18:55:57,471 root DEBUG BUSKILL_VERSION|{'VERSION': 'v0.7.0', 'GITHUB_REF': 'refs/heads/v0.7.0', 'GITHUB_SHA': 'b90839f3467aca7c8190b39d5ae4d3c62fcb2c0e', 'SOURCE_DATE_EPOCH': '1686772522'}|
18:55:57,471 root DEBUG os.environ|environ({'USER': 'mallen', 'COMMAND_MODE': 'unix2003', '__CFBundleIdentifier': 'buskill-v0.7.0', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app', 'LOGNAME': 'mallen', 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.qWDXpPlUlX/Listeners', 'HOME': '/Users/mallen', 'SHELL': '/bin/bash', 'TMPDIR': '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/', '__CF_USER_TEXT_ENCODING': '0x381820B3:0x0:0x0', 'XPC_SERVICE_NAME': '0', 'XPC_FLAGS': '0x0', 'KIVY_DATA_DIR': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/kivy_install/data', 'KIVY_MODULES_DIR': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/kivy_install/modules', 'GST_REGISTRY_FORK': 'no', 'GST_PLUGIN_PATH': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/gst-plugins', 'GST_REGISTRY': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/registry.bin', 'GST_PLUGIN_SYSTEM_PATH': '', 'DYLD_FALLBACK_LIBRARY_PATH': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS', 'KIVY_HOME': '/Users/mallen/.buskill'})|
18:55:57,471 root DEBUG sys.argv|['/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill', '--multiprocessing-fork', 'tracker_fd=15', 'pipe_handle=20']|
18:55:57,471 root DEBUG sys.builtin_modules_names|('_abc', '_ast', '_codecs', '_collections', '_functools', '_imp', '_io', '_locale', '_operator', '_signal', '_sre', '_stat', '_string', '_symtable', '_thread', '_tracemalloc', '_warnings', '_weakref', 'atexit', 'builtins', 'errno', 'faulthandler', 'gc', 'itertools', 'marshal', 'posix', 'pwd', 'sys', 'time', 'xxsubtype', 'zipimport')|
18:55:57,471 root DEBUG sys.executable|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill|
18:55:57,471 root DEBUG sys.path|['/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/base_library.zip', '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/lib-dynload', '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS']|
18:55:57,471 root DEBUG sys.prefix|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS|
18:55:57,471 root DEBUG sys.version|3.7.8 (default, Jul  4 2020, 10:17:17) 
[Clang 11.0.3 (clang-1103.0.32.62)]|
18:55:57,471 root DEBUG sys.api_version|1013|
18:55:57,471 root DEBUG sys.version_info|sys.version_info(major=3, minor=7, micro=8, releaselevel='final', serial=0)|
18:55:57,471 root DEBUG __name__|__main__|
18:55:57,471 root DEBUG sys.platform|darwin|
18:55:57,484 root DEBUG platform.platform()|Darwin-22.3.0-x86_64-i386-64bit|
18:55:57,484 root DEBUG platform.system()|Darwin|
18:55:57,484 root DEBUG platform.release()|22.3.0|
18:55:57,484 root DEBUG platform.version()|Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64|
18:55:57,484 root DEBUG platform.machine()|x86_64|
18:55:57,484 root DEBUG platform.uname()|uname_result(system='Darwin', node='MAllen-MAC-L.attlocal.net', release='22.3.0', version='Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64', machine='x86_64', processor='i386')|
18:55:57,487 root DEBUG platform.mac_ver()|('10.16', ('', '', ''), 'x86_64')|
18:55:57,540 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:55:57,540 packages.buskill DEBUG context:|<usb1.USBContext object at 0x10173d0d0>|
18:55:57,540 packages.buskill DEBUG device:|Bus 020 Device 003: ID 058f:6387|
18:55:57,540 packages.buskill DEBUG event:|1|
18:55:57,540 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:55:57,540 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:55:57,540 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:55:57,540 packages.buskill DEBUG context:|<usb1.USBContext object at 0x10173d0d0>|
18:55:57,540 packages.buskill DEBUG device:|Bus 001 Device 002: ID 058f:8468|
18:55:57,540 packages.buskill DEBUG event:|1|
18:55:57,541 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:55:57,541 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:55:57,541 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:55:57,541 packages.buskill DEBUG context:|<usb1.USBContext object at 0x10173d0d0>|
18:55:57,541 packages.buskill DEBUG device:|Bus 020 Device 001: ID 2109:2817|
18:55:57,541 packages.buskill DEBUG event:|1|
18:55:57,541 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:55:57,541 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:55:57,541 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:55:57,541 packages.buskill DEBUG context:|<usb1.USBContext object at 0x10173d0d0>|
18:55:57,541 packages.buskill DEBUG device:|Bus 001 Device 001: ID 2109:0817|
18:55:57,541 packages.buskill DEBUG event:|1|
18:55:57,541 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:55:57,541 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:55:58,253 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:55:58,253 packages.buskill DEBUG context:|<usb1.USBContext object at 0x10173d0d0>|
18:55:58,254 packages.buskill DEBUG device:|Bus 020 Device 003: ID 058f:6387|
18:55:58,254 packages.buskill DEBUG event:|2|
18:55:58,254 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:55:58,254 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:55:58,254 packages.buskill INFO INFO: Detected USB removal event
18:55:58,254 packages.buskill DEBUG calling <bound method BusKill.triggerMac of <packages.buskill.BusKill object at 0x1019b8150>>
18:55:58,254 packages.buskill INFO DEBUG: BusKill lockscreen trigger executing now
18:55:58,254 packages.buskill DEBUG INFO: Attempting to execute `CGSession -suspend`
18:55:58,259 packages.buskill WARNING WARNING: Failed to execute `CGSession -suspend`! [Errno 2] No such file or directory: '/System/Library/CoreServices/Menu Extras/user.menu/Contents/Resources/CGSession': '/System/Library/CoreServices/Menu Extras/user.menu/Contents/Resources/CGSession'
18:55:58,260 packages.buskill DEBUG INFO: Attempting to call `SACLockScreenImmediate()`
18:55:58,266 packages.buskill DEBUG DEBUG: login.SACLockScreenImmediate() returncode|0|
18:56:04,360 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:56:04,360 packages.buskill DEBUG context:|<usb1.USBContext object at 0x10173d0d0>|
18:56:04,360 packages.buskill DEBUG device:|Bus 020 Device 004: ID 058f:6387|
18:56:04,360 packages.buskill DEBUG event:|1|
18:56:04,360 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:56:04,361 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:56:22,646 buskill_gui DEBUG DEBUG: User switched to 'Settings' screen
18:56:23,814 buskill_gui DEBUG DEBUG: User switched to 'setting_trigger' screen
18:56:27,511 buskill_gui DEBUG DEBUG: User changed config of 'trigger' to 'soft-shutdown'
18:56:31,79 buskill_gui DEBUG DEBUG: User switched to 'Settings' screen
18:56:35,439 buskill_gui DEBUG DEBUG: User switched to 'MainWindow' screen
18:56:35,440 packages.buskill DEBUG DEBUG: Attempting to set 'trigger' set to 'soft-shutdown'
18:56:35,440 packages.buskill DEBUG DEBUG: Called spawn_root_child()
18:56:35,440 packages.buskill DEBUG DEBUG: No root_child detected. Attempting to spawn one.
18:56:35,440 packages.buskill INFO INFO: You have requested BusKill to do something that requires elevated privliges on your platform. If you'd like to proceed, please authorize BusKill to preform actions as Administrator. Your system may prompt you for your password to proceed.
18:56:35,440 packages.buskill DEBUG DEBUG: root_child_path:|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/root_child_mac|
18:56:35,460 packages.buskill DEBUG DEBUG: Attempting to spawn root child (['/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/root_child_mac', '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/buskill.log'])
18:56:43,165 packages.buskill DEBUG DEBUG: AuthorizationExecuteWithPrivileges.err:|0|
18:56:43,165 packages.buskill DEBUG DEBUG: Root child spawned successfully!
18:56:43,166 packages.buskill INFO INFO: BusKill 'trigger' set to 'soft-shutdown'
18:56:43,166 buskill_gui DEBUG DEBUG: Re-arm from 'lock-screen' to 'soft-shutdown' trigger?
18:56:43,346 root_child INFO ===============================================================================
18:56:43,346 root_child INFO root_child_mac is writing to log file '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/buskill.log'
18:56:43,346 root_child INFO Waiting for command
18:56:46,821 packages.buskill DEBUG DEBUG: attempting to disarm BusKill
18:56:46,826 packages.buskill INFO INFO: BusKill is disarmed.
18:56:46,827 packages.buskill DEBUG DEBUG: attempting to arm BusKill via <bound method BusKill.armNix of <packages.buskill.BusKill object at 0x101634810>>() with the 'soft-shutdown' trigger
18:56:46,828 packages.buskill DEBUG DEBUG:__getstate__() pre:dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'root_child', 'is_armed', 'usb_handler', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
18:56:46,828 packages.buskill DEBUG DEBUG:__getstate__() post:|dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'is_armed', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
18:56:46,835 packages.buskill INFO INFO: BusKill is armed. Listening for removal event.
INFO: To disarm the CLI, exit with ^C or close this terminal
18:56:47,414 root INFO ===============================================================================
18:56:47,414 root INFO INFO: Writing to log file '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/buskill.log'
18:56:47,414 root DEBUG BUSKILL_VERSION|{'VERSION': 'v0.7.0', 'GITHUB_REF': 'refs/heads/v0.7.0', 'GITHUB_SHA': 'b90839f3467aca7c8190b39d5ae4d3c62fcb2c0e', 'SOURCE_DATE_EPOCH': '1686772522'}|
18:56:47,414 root DEBUG os.environ|environ({'USER': 'mallen', 'COMMAND_MODE': 'unix2003', '__CFBundleIdentifier': 'buskill-v0.7.0', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app', 'LOGNAME': 'mallen', 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.qWDXpPlUlX/Listeners', 'HOME': '/Users/mallen', 'SHELL': '/bin/bash', 'TMPDIR': '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/', '__CF_USER_TEXT_ENCODING': '0x381820B3:0x0:0x0', 'XPC_SERVICE_NAME': '0', 'XPC_FLAGS': '0x0', 'KIVY_DATA_DIR': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/kivy_install/data', 'KIVY_MODULES_DIR': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/kivy_install/modules', 'GST_REGISTRY_FORK': 'no', 'GST_PLUGIN_PATH': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/gst-plugins', 'GST_REGISTRY': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/registry.bin', 'GST_PLUGIN_SYSTEM_PATH': '', 'DYLD_FALLBACK_LIBRARY_PATH': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS', 'KIVY_HOME': '/Users/mallen/.buskill'})|
18:56:47,414 root DEBUG sys.argv|['/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill', '--multiprocessing-fork', 'tracker_fd=15', 'pipe_handle=24']|
18:56:47,414 root DEBUG sys.builtin_modules_names|('_abc', '_ast', '_codecs', '_collections', '_functools', '_imp', '_io', '_locale', '_operator', '_signal', '_sre', '_stat', '_string', '_symtable', '_thread', '_tracemalloc', '_warnings', '_weakref', 'atexit', 'builtins', 'errno', 'faulthandler', 'gc', 'itertools', 'marshal', 'posix', 'pwd', 'sys', 'time', 'xxsubtype', 'zipimport')|
18:56:47,414 root DEBUG sys.executable|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill|
18:56:47,414 root DEBUG sys.path|['/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/base_library.zip', '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/lib-dynload', '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS']|
18:56:47,414 root DEBUG sys.prefix|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS|
18:56:47,414 root DEBUG sys.version|3.7.8 (default, Jul  4 2020, 10:17:17) 
[Clang 11.0.3 (clang-1103.0.32.62)]|
18:56:47,414 root DEBUG sys.api_version|1013|
18:56:47,414 root DEBUG sys.version_info|sys.version_info(major=3, minor=7, micro=8, releaselevel='final', serial=0)|
18:56:47,414 root DEBUG __name__|__main__|
18:56:47,415 root DEBUG sys.platform|darwin|
18:56:47,426 root DEBUG platform.platform()|Darwin-22.3.0-x86_64-i386-64bit|
18:56:47,427 root DEBUG platform.system()|Darwin|
18:56:47,427 root DEBUG platform.release()|22.3.0|
18:56:47,427 root DEBUG platform.version()|Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64|
18:56:47,427 root DEBUG platform.machine()|x86_64|
18:56:47,427 root DEBUG platform.uname()|uname_result(system='Darwin', node='MAllen-MAC-L.attlocal.net', release='22.3.0', version='Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64', machine='x86_64', processor='i386')|
18:56:47,429 root DEBUG platform.mac_ver()|('10.16', ('', '', ''), 'x86_64')|
18:56:47,482 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:56:47,482 packages.buskill DEBUG context:|<usb1.USBContext object at 0x108e21290>|
18:56:47,482 packages.buskill DEBUG device:|Bus 020 Device 004: ID 058f:6387|
18:56:47,482 packages.buskill DEBUG event:|1|
18:56:47,482 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:56:47,482 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:56:47,482 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:56:47,482 packages.buskill DEBUG context:|<usb1.USBContext object at 0x108e21290>|
18:56:47,482 packages.buskill DEBUG device:|Bus 001 Device 002: ID 058f:8468|
18:56:47,482 packages.buskill DEBUG event:|1|
18:56:47,482 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:56:47,482 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:56:47,483 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:56:47,483 packages.buskill DEBUG context:|<usb1.USBContext object at 0x108e21290>|
18:56:47,483 packages.buskill DEBUG device:|Bus 020 Device 001: ID 2109:2817|
18:56:47,483 packages.buskill DEBUG event:|1|
18:56:47,483 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:56:47,483 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:56:47,483 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:56:47,483 packages.buskill DEBUG context:|<usb1.USBContext object at 0x108e21290>|
18:56:47,483 packages.buskill DEBUG device:|Bus 001 Device 001: ID 2109:0817|
18:56:47,483 packages.buskill DEBUG event:|1|
18:56:47,483 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:56:47,483 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:57:10,955 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:57:10,955 packages.buskill DEBUG context:|<usb1.USBContext object at 0x108e21290>|
18:57:10,955 packages.buskill DEBUG device:|Bus 020 Device 004: ID 058f:6387|
18:57:10,956 packages.buskill DEBUG event:|2|
18:57:10,956 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:57:10,956 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:57:10,956 packages.buskill INFO INFO: Detected USB removal event
18:57:10,956 packages.buskill DEBUG calling <bound method BusKill.triggerMac of <packages.buskill.BusKill object at 0x109042b10>>
18:57:10,956 packages.buskill DEBUG DEBUG: BusKill soft-shutdown trigger executing now
18:57:10,956 packages.buskill DEBUG DEBUG: Attempting to send 'soft-shutdown' command to root child
18:57:10,957 packages.buskill ERROR ERROR: Failed to send 'soft-shutdown' command to root child 
    'BusKill' object has no attribute 'root_child'
18:57:21,400 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:57:21,400 packages.buskill DEBUG context:|<usb1.USBContext object at 0x108e21290>|
18:57:21,401 packages.buskill DEBUG device:|Bus 020 Device 005: ID 058f:6387|
18:57:21,401 packages.buskill DEBUG event:|1|
18:57:21,401 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:57:21,401 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:57:33,654 packages.buskill DEBUG DEBUG: attempting to disarm BusKill
18:57:33,658 packages.buskill INFO INFO: BusKill is disarmed.
18:57:34,330 packages.buskill DEBUG DEBUG: attempting to arm BusKill via <bound method BusKill.armNix of <packages.buskill.BusKill object at 0x101634810>>() with the 'soft-shutdown' trigger
18:57:34,332 packages.buskill DEBUG DEBUG:__getstate__() pre:dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'root_child', 'is_armed', 'usb_handler', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
18:57:34,332 packages.buskill DEBUG DEBUG:__getstate__() post:|dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'is_armed', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
18:57:34,340 packages.buskill INFO INFO: BusKill is armed. Listening for removal event.
INFO: To disarm the CLI, exit with ^C or close this terminal
18:57:34,906 root INFO ===============================================================================
18:57:34,907 root INFO INFO: Writing to log file '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/buskill.log'
18:57:34,907 root DEBUG BUSKILL_VERSION|{'VERSION': 'v0.7.0', 'GITHUB_REF': 'refs/heads/v0.7.0', 'GITHUB_SHA': 'b90839f3467aca7c8190b39d5ae4d3c62fcb2c0e', 'SOURCE_DATE_EPOCH': '1686772522'}|
18:57:34,907 root DEBUG os.environ|environ({'USER': 'mallen', 'COMMAND_MODE': 'unix2003', '__CFBundleIdentifier': 'buskill-v0.7.0', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app', 'LOGNAME': 'mallen', 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.qWDXpPlUlX/Listeners', 'HOME': '/Users/mallen', 'SHELL': '/bin/bash', 'TMPDIR': '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/', '__CF_USER_TEXT_ENCODING': '0x381820B3:0x0:0x0', 'XPC_SERVICE_NAME': '0', 'XPC_FLAGS': '0x0', 'KIVY_DATA_DIR': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/kivy_install/data', 'KIVY_MODULES_DIR': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/kivy_install/modules', 'GST_REGISTRY_FORK': 'no', 'GST_PLUGIN_PATH': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/gst-plugins', 'GST_REGISTRY': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/registry.bin', 'GST_PLUGIN_SYSTEM_PATH': '', 'DYLD_FALLBACK_LIBRARY_PATH': '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS', 'KIVY_HOME': '/Users/mallen/.buskill'})|
18:57:34,907 root DEBUG sys.argv|['/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill', '--multiprocessing-fork', 'tracker_fd=15', 'pipe_handle=24']|
18:57:34,907 root DEBUG sys.builtin_modules_names|('_abc', '_ast', '_codecs', '_collections', '_functools', '_imp', '_io', '_locale', '_operator', '_signal', '_sre', '_stat', '_string', '_symtable', '_thread', '_tracemalloc', '_warnings', '_weakref', 'atexit', 'builtins', 'errno', 'faulthandler', 'gc', 'itertools', 'marshal', 'posix', 'pwd', 'sys', 'time', 'xxsubtype', 'zipimport')|
18:57:34,907 root DEBUG sys.executable|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill|
18:57:34,907 root DEBUG sys.path|['/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/base_library.zip', '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/lib-dynload', '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS']|
18:57:34,907 root DEBUG sys.prefix|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS|
18:57:34,907 root DEBUG sys.version|3.7.8 (default, Jul  4 2020, 10:17:17) 
[Clang 11.0.3 (clang-1103.0.32.62)]|
18:57:34,907 root DEBUG sys.api_version|1013|
18:57:34,907 root DEBUG sys.version_info|sys.version_info(major=3, minor=7, micro=8, releaselevel='final', serial=0)|
18:57:34,907 root DEBUG __name__|__main__|
18:57:34,908 root DEBUG sys.platform|darwin|
18:57:34,920 root DEBUG platform.platform()|Darwin-22.3.0-x86_64-i386-64bit|
18:57:34,920 root DEBUG platform.system()|Darwin|
18:57:34,920 root DEBUG platform.release()|22.3.0|
18:57:34,920 root DEBUG platform.version()|Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64|
18:57:34,920 root DEBUG platform.machine()|x86_64|
18:57:34,920 root DEBUG platform.uname()|uname_result(system='Darwin', node='MAllen-MAC-L.attlocal.net', release='22.3.0', version='Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64', machine='x86_64', processor='i386')|
18:57:34,923 root DEBUG platform.mac_ver()|('10.16', ('', '', ''), 'x86_64')|
18:57:34,973 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:57:34,973 packages.buskill DEBUG context:|<usb1.USBContext object at 0x10cabe1d0>|
18:57:34,973 packages.buskill DEBUG device:|Bus 020 Device 005: ID 058f:6387|
18:57:34,974 packages.buskill DEBUG event:|1|
18:57:34,974 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:57:34,974 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:57:34,974 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:57:34,974 packages.buskill DEBUG context:|<usb1.USBContext object at 0x10cabe1d0>|
18:57:34,974 packages.buskill DEBUG device:|Bus 001 Device 002: ID 058f:8468|
18:57:34,974 packages.buskill DEBUG event:|1|
18:57:34,974 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:57:34,974 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:57:34,974 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:57:34,974 packages.buskill DEBUG context:|<usb1.USBContext object at 0x10cabe1d0>|
18:57:34,974 packages.buskill DEBUG device:|Bus 020 Device 001: ID 2109:2817|
18:57:34,974 packages.buskill DEBUG event:|1|
18:57:34,974 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:57:34,974 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:57:34,975 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:57:34,975 packages.buskill DEBUG context:|<usb1.USBContext object at 0x10cabe1d0>|
18:57:34,975 packages.buskill DEBUG device:|Bus 001 Device 001: ID 2109:0817|
18:57:34,975 packages.buskill DEBUG event:|1|
18:57:34,975 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:57:34,975 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:57:40,138 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:57:40,139 packages.buskill DEBUG context:|<usb1.USBContext object at 0x10cabe1d0>|
18:57:40,139 packages.buskill DEBUG device:|Bus 020 Device 005: ID 058f:6387|
18:57:40,139 packages.buskill DEBUG event:|2|
18:57:40,139 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:57:40,139 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:57:40,139 packages.buskill INFO INFO: Detected USB removal event
18:57:40,139 packages.buskill DEBUG calling <bound method BusKill.triggerMac of <packages.buskill.BusKill object at 0x10cce5950>>
18:57:40,140 packages.buskill DEBUG DEBUG: BusKill soft-shutdown trigger executing now
18:57:40,140 packages.buskill DEBUG DEBUG: Attempting to send 'soft-shutdown' command to root child
18:57:40,140 packages.buskill ERROR ERROR: Failed to send 'soft-shutdown' command to root child 
    'BusKill' object has no attribute 'root_child'
18:57:49,57 packages.buskill DEBUG DEBUG: called hotplugCallbackNix()
18:57:49,57 packages.buskill DEBUG context:|<usb1.USBContext object at 0x10cabe1d0>|
18:57:49,57 packages.buskill DEBUG device:|Bus 020 Device 006: ID 058f:6387|
18:57:49,58 packages.buskill DEBUG event:|1|
18:57:49,58 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
18:57:49,58 packages.buskill DEBUG usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
18:59:37,324 buskill_gui DEBUG DEBUG: User switched to 'DebugLog' screen
maltfield commented 1 year ago

With the app still open, can you please run

sudo ps -ef | grep -i buskill
goldfishlaser commented 1 year ago

941105331 32001 1 0 6:54PM ?? 0:27.38 /private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill 941105331 32010 32001 0 6:55PM ?? 0:00.39 /private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill -B -S -E -s -c from multiprocessing.semaphore_tracker import main;main(14) 0 32058 32001 0 6:56PM ?? 0:00.12 /private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/root_child_mac /var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/buskill.log 941105331 32080 32001 0 6:57PM ?? 0:00.39 /private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill --multiprocessing-fork tracker_fd=15 pipe_handle=24 941105331 32197 32187 0 7:03PM ttys000 0:00.01 grep -i buskill

maltfield commented 1 year ago

Ok, so this tells me that it successfully launched the root_child_mac process as root, which is good

0 32058 32001 0 6:56PM ?? 0:00.12 /private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/root_child_mac /var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/buskill.log
maltfield commented 1 year ago

But this appears to be the issue

18:57:10,957 packages.buskill ERROR ERROR: Failed to send 'soft-shutdown' command to root child 
    'BusKill' object has no attribute 'root_child'

I'll look into this tonight and get back to you, thanks!

maltfield commented 1 year ago

Does it work if you try it from the CLI?

/path/to/buskill --arm --trigger soft-shutdown
goldfishlaser commented 1 year ago

Running /path/to/buskill --arm --trigger soft-shutdown in the Terminal and then ejecting the USB did not result in a shut down.

In terminal: -bash: /path/to/buskill: No such file or directory

[removed]

maltfield commented 1 year ago

ok, same error. That makes me more sane, at least. Thanks!

maltfield commented 1 year ago

What about this one

/path/to/buskill --trigger soft-shutdown --run-trigger

^ this is the best for testing; it'll tell it to immediately run the trigger (not wait for a USB event)

goldfishlaser commented 1 year ago

Sorry I derped out I wasn't paying attention. I was supposed to run:

/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill --arm --trigger soft-shutdown

Resulted in the same error

usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
DEBUG: called hotplugCallbackNix()
context:|<usb1.USBContext object at 0x10e31b990>|
device:|Bus 020 Device 007: ID 058f:6387|
event:|2|
usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
INFO: Detected USB removal event
calling <bound method BusKill.triggerMac of <packages.buskill.BusKill object at 0x10ec669d0>>
DEBUG: BusKill soft-shutdown trigger executing now
DEBUG: Attempting to send 'soft-shutdown' command to root child
ERROR: Failed to send 'soft-shutdown' command to root child 
    'BusKill' object has no attribute 'root_child'
maltfield commented 1 year ago

ah, ok, thanks. And --run-trigger?

/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill --trigger soft-shutdown --run-trigger
goldfishlaser commented 1 year ago
-:~ mallen$ /private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill --trigger soft-shutdown --run-trigger
usb1.__version__:|3.0.0|
===============================================================================
INFO: Writing to log file '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/buskill.log'
buskill version {'VERSION': 'v0.7.0', 'GITHUB_REF': 'refs/heads/v0.7.0', 'GITHUB_SHA': 'b90839f3467aca7c8190b39d5ae4d3c62fcb2c0e', 'SOURCE_DATE_EPOCH': '1686772522'}
DEBUG: EXECUTED_AS_SCRIPT:|False|
DEBUG: EXE_PATH:|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/buskill|
DEBUG: EXE_DIR:|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS|
DEBUG: EXE_FILE:|buskill|
DEBUG: APP_DIR:|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app|
DEBUG: APPS_DIR:|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d|
DEBUG: SRC_DIR:|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS|
DEBUG: os.environ['PATH']:|/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS:/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app|

DEBUG: Unable to write to '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d'; skipping.
    [Errno 30] Read-only file system: '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/tmpjosvc5os'

DEBUG: Unable to write to '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app'; skipping.
    [Errno 30] Read-only file system: '/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/tmpf6_iecuh'

INFO: using DATA_DIR:|/Users/mallen/.buskill|
DEBUG: CONF_FILE:|/Users/mallen/.buskill/config.ini|

DEBUG: Attempting to set 'trigger' set to 'soft-shutdown'
DEBUG: Called spawn_root_child()
DEBUG: No root_child detected. Attempting to spawn one.
INFO: You have requested BusKill to do something that requires elevated privliges on your platform. If you'd like to proceed, please authorize BusKill to preform actions as Administrator. Your system may prompt you for your password to proceed.
DEBUG: root_child_path:|/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/root_child_mac|
DEBUG: Attempting to spawn root child (['/private/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/AppTranslocation/E086D527-0C1A-4DBF-9BC9-99BA2D2740F6/d/buskill-v0.7.0.app/Contents/MacOS/root_child_mac', '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/buskill.log'])
DEBUG: AuthorizationExecuteWithPrivileges.err:|0|
DEBUG: Root child spawned successfully!
INFO: BusKill 'trigger' set to 'soft-shutdown'
DEBUG: Attempting to set 'trigger' set to 'soft-shutdown'
DEBUG: Called spawn_root_child()
INFO: BusKill 'trigger' set to 'soft-shutdown'
DEBUG: attempting to arm BusKill via <bound method BusKill.armNix of <packages.buskill.BusKill object at 0x110375510>>() with the 'soft-shutdown' trigger
DEBUG:__getstate__() pre:dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'root_child', 'is_armed', 'usb_handler', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
DEBUG:__getstate__() post:|dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'is_armed', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
INFO: BusKill is armed. Listening for removal event.
INFO: To disarm the CLI, exit with ^C or close this terminal
DEBUG: Attempting to set 'trigger' set to 'soft-shutdown'
DEBUG: Called spawn_root_child()
INFO: BusKill 'trigger' set to 'soft-shutdown'
Are you sure you want to execute the 'soft-shutdown' trigger RIGHT NOW? [Y/N] usb1.__version__:|3.0.0|
===============================================================================
INFO: Writing to log file '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/buskill.log'
usb1.__version__:|3.0.0|
===============================================================================
INFO: Writing to log file '/var/folders/70/c21cwkrj2xd4g9gn6xkmghfhw1h85l/T/buskill.log'
DEBUG: called hotplugCallbackNix()
context:|<usb1.USBContext object at 0x109894490>|
device:|Bus 001 Device 002: ID 058f:8468|
event:|1|
usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
DEBUG: called hotplugCallbackNix()
context:|<usb1.USBContext object at 0x109894490>|
device:|Bus 020 Device 001: ID 2109:2817|
event:|1|
usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
DEBUG: called hotplugCallbackNix()
context:|<usb1.USBContext object at 0x109894490>|
device:|Bus 001 Device 001: ID 2109:0817|
event:|1|
usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|

After I pressed 'y' it shutdown

maltfield commented 1 year ago

So one thing that's strange is all these lines indicating the start of BusKill running in the middle of your runtime

18:57:34,906 root INFO ===============================================================================

What's not strange is the sudden emission from the root_child being spawned (note that it says root_child INFO instead of root INFO)

18:56:43,346 root_child INFO ===============================================================================

A few questions:

  1. Why is this happening?
  2. Can this be avoided from happening?
  3. If it can't be avoided, is there some way that we can "find" the existing root_child process if it's been lost?
maltfield commented 1 year ago

ok, I confirmed that if I just hit the arm button in the BusKill app on Linux, then that line doesn't appear. But if all I do is hit the arm button on MacOS, then it spits out the ===== line like it's restarting. Interesting

TODO: for debugging, let's setup some sort of callback that just constantly prints root_child every second, and I'll see if I can reproduce this issue on my Mac Mini where it suddenly becomes unset

maltfield commented 1 year ago

In almost all the cases where the app re-starts mid-run, it's immediately preceded by DEBUG: attempting to arm BusKill

18:55:20,33 packages.buskill DEBUG DEBUG: attempting to arm BusKill via <bound method BusKill.armNix of <packages.buskill.BusKill object at 0x101634810>>() with the 'lock-screen' trigger
18:55:20,59 packages.buskill DEBUG DEBUG:__getstate__() pre:dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'root_child', 'is_armed', 'usb_handler', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
18:55:20,60 packages.buskill DEBUG DEBUG:__getstate__() post:|dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'is_armed', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
18:55:20,68 packages.buskill INFO INFO: BusKill is armed. Listening for removal event.
INFO: To disarm the CLI, exit with ^C or close this terminal
18:55:20,713 root INFO ===============================================================================

What is it about our MacOS implementation that causes this restart thing when arming?

maltfield commented 1 year ago

Interesting. When I run the latest build on Linux, I get bk.root_child:|None| over-and-over (this is expectedot because Linux doesn't use the root_child). But when I run the latest build on MacOS, I never see that line.

This may make sense considering the app seems to restart when it's armed, so there's never Clock callback to print it :/

maltfield commented 1 year ago

In attempt to iterate faster, I tried executing the latest version of the v0.7.0 branch's main.py script locally. Oddly, the behaviour was different when I executed it as a script vs from the .app executed in the .dmg built by GitHub. Note that this is exactly the same file as the build.

The GitHub build

usb1.__version__:|3.0.0|
===============================================================================
INFO: Writing to log file '/var/folders/kx/2fp3kfgj4dj7rx9s5mlb52640000gp/T/buskill.log'
buskill version {'VERSION': 'v0.7.0', 'GITHUB_REF': 'refs/heads/v0.7.0', 'GITHUB_SHA': '8ddfd1e6a5495d5c0b6a56e77c647fba8baa81fe', 'SOURCE_DATE_EPOCH': '1686792830'}
DEBUG: EXECUTED_AS_SCRIPT:|False|
DEBUG: EXE_PATH:|/Volumes/buskill-v0.7/buskill-v0.7.0.app/Contents/MacOS/buskill|
DEBUG: EXE_DIR:|/Volumes/buskill-v0.7/buskill-v0.7.0.app/Contents/MacOS|
DEBUG: EXE_FILE:|buskill|
DEBUG: APP_DIR:|/Volumes/buskill-v0.7/buskill-v0.7.0.app|
DEBUG: APPS_DIR:|/Volumes/buskill-v0.7|
DEBUG: SRC_DIR:|/Volumes/buskill-v0.7/buskill-v0.7.0.app/Contents/MacOS|
DEBUG: os.environ['PATH']:|/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Volumes/buskill-v0.7/buskill-v0.7.0.app/Contents/MacOS:/Volumes/buskill-v0.7/buskill-v0.7.0.app|

DEBUG: Unable to write to '/Volumes/buskill-v0.7'; skipping.
    [Errno 30] Read-only file system: '/Volumes/buskill-v0.7/tmpsz_ge4cr'

DEBUG: Unable to write to '/Volumes/buskill-v0.7/buskill-v0.7.0.app'; skipping.
    [Errno 30] Read-only file system: '/Volumes/buskill-v0.7/buskill-v0.7.0.app/tmp3ej4zdt2'

INFO: using DATA_DIR:|/Users/maltfield/.buskill|
DEBUG: CONF_FILE:|/Users/maltfield/.buskill/config.ini|

DEBUG: Attempting to set 'trigger' set to 'soft-shutdown'
DEBUG: Called spawn_root_child()
DEBUG: No root_child detected. Attempting to spawn one.
INFO: You have requested BusKill to do something that requires elevated privliges on your platform. If you'd like to proceed, please authorize BusKill to preform actions as Administrator. Your system may prompt you for your password to proceed.
DEBUG: root_child_path:|/Volumes/buskill-v0.7/buskill-v0.7.0.app/Contents/MacOS/root_child_mac|
DEBUG: Attempting to spawn root child (['/Volumes/buskill-v0.7/buskill-v0.7.0.app/Contents/MacOS/root_child_mac', '/var/folders/kx/2fp3kfgj4dj7rx9s5mlb52640000gp/T/buskill.log'])
DEBUG: AuthorizationExecuteWithPrivileges.err:|0|
DEBUG: Root child spawned successfully!
INFO: BusKill 'trigger' set to 'soft-shutdown'
No command-line arguments detected. Launching GUI
Hint: execute `buskill --help` for command-line usage
DEBUG: adding screen:|<Screen name='main'>|
DEBUG: User switched to 'MainWindow' screen
DEBUG: adding screen:|<Screen name='debug_log'>|
DEBUG: adding screen:|<Screen name='settings'>|
DEBUG: attempting to arm BusKill via <bound method BusKill.armNix of <packages.buskill.BusKill object at 0x10f46f250>>() with the 'soft-shutdown' trigger
usb1.__version__:|3.0.0|
===============================================================================
INFO: Writing to log file '/var/folders/kx/2fp3kfgj4dj7rx9s5mlb52640000gp/T/buskill.log'
DEBUG:__getstate__() pre:dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'root_child', 'is_armed', 'usb_handler', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
DEBUG:__getstate__() post:|dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'is_armed', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
INFO: BusKill is armed. Listening for removal event.
INFO: To disarm the CLI, exit with ^C or close this terminal
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
DEBUG: attempting to disarm BusKill
INFO: BusKill is disarmed.
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
DEBUG: attempting to arm BusKill via <bound method BusKill.armNix of <packages.buskill.BusKill object at 0x10f46f250>>() with the 'soft-shutdown' trigger
DEBUG:__getstate__() pre:dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'root_child', 'is_armed', 'usb_handler', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
DEBUG:__getstate__() post:|dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'is_armed', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
INFO: BusKill is armed. Listening for removal event.
INFO: To disarm the CLI, exit with ^C or close this terminal
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|

Local script

usb1.__version__:|1.8|
===============================================================================
INFO: Writing to log file '/var/folders/kx/2fp3kfgj4dj7rx9s5mlb52640000gp/T/buskill.log'
buskill version {'VERSION': 'v0.7.0', 'GITHUB_REF': 'refs/heads/a', 'GITHUB_SHA': '8ddfd1e6a5495d5c0b6a56e77c647fba8baa81fe', 'SOURCE_DATE_EPOCH': '1686792830'}
DEBUG: EXECUTED_AS_SCRIPT:|True|
DEBUG: EXE_PATH:|/Users/maltfield/sandbox/buskill-app/src/main.py|
DEBUG: EXE_DIR:|/Users/maltfield/sandbox/buskill-app/src|
DEBUG: EXE_FILE:|main.py|
DEBUG: APP_DIR:|/Users/maltfield|
DEBUG: APPS_DIR:|/Users|
DEBUG: SRC_DIR:|/Users/maltfield/sandbox/buskill-app/src|
DEBUG: os.environ['PATH']:|/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/maltfield/sandbox/buskill-app/src:/Users/maltfield|

DEBUG: Unable to write to '/Users'; skipping.
    [Errno 13] Permission denied: '/Users/tmpy7pn7q6r'

INFO: using DATA_DIR:|/Users/maltfield/.buskill|
DEBUG: CONF_FILE:|/Users/maltfield/.buskill/config.ini|

DEBUG: Attempting to set 'trigger' set to 'soft-shutdown'
DEBUG: Called spawn_root_child()
DEBUG: No root_child detected. Attempting to spawn one.
INFO: You have requested BusKill to do something that requires elevated privliges on your platform. If you'd like to proceed, please authorize BusKill to preform actions as Administrator. Your system may prompt you for your password to proceed.
DEBUG: root_child_path:|/Users/maltfield/sandbox/buskill-app/src/packages/buskill/root_child_mac.py|
DEBUG: Attempting to spawn root child (['/usr/local/opt/python/bin/python3.7', '/Users/maltfield/sandbox/buskill-app/src/packages/buskill/root_child_mac.py', '/var/folders/kx/2fp3kfgj4dj7rx9s5mlb52640000gp/T/buskill.log'])
DEBUG: AuthorizationExecuteWithPrivileges.err:|0|
DEBUG: Root child spawned successfully!
INFO: BusKill 'trigger' set to 'soft-shutdown'
No command-line arguments detected. Launching GUI
Hint: execute `buskill --help` for command-line usage
DEBUG: adding screen:|<Screen name='main'>|
DEBUG: User switched to 'MainWindow' screen
DEBUG: adding screen:|<Screen name='debug_log'>|
DEBUG: adding screen:|<Screen name='settings'>|
DEBUG: attempting to arm BusKill via <bound method BusKill.armNix of <packages.buskill.BusKill object at 0x101ce32d0>>() with the 'soft-shutdown' trigger
DEBUG:__getstate__() pre:dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'root_child', 'is_armed', 'usb_handler', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
DEBUG:__getstate__() post:|dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'is_armed', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
INFO: BusKill is armed. Listening for removal event.
INFO: To disarm the CLI, exit with ^C or close this terminal
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
DEBUG: attempting to disarm BusKill
INFO: BusKill is disarmed.
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
DEBUG: attempting to arm BusKill via <bound method BusKill.armNix of <packages.buskill.BusKill object at 0x101ce32d0>>() with the 'soft-shutdown' trigger
DEBUG:__getstate__() pre:dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'root_child', 'is_armed', 'usb_handler', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
DEBUG:__getstate__() post:|dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'is_armed', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
INFO: BusKill is armed. Listening for removal event.
INFO: To disarm the CLI, exit with ^C or close this terminal
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|
bk.root_child:|{'io': c_void_p(140735617997664)}|

Diff

One obvious difference is that the app does have logic to detect if it's executed as a script or not

DEBUG: EXECUTED_AS_SCRIPT:|False|

vs

DEBUG: EXECUTED_AS_SCRIPT:|True|

This directly translates to the actual root_child that's executed

DEBUG: root_child_path:|/Volumes/buskill-v0.7/buskill-v0.7.0.app/Contents/MacOS/root_child_mac|
DEBUG: Attempting to spawn root child (['/Volumes/buskill-v0.7/buskill-v0.7.0.app/Contents/MacOS/root_child_mac', '/var/folders/kx/2fp3kfgj4dj7rx9s5mlb52640000gp/T/buskill.log'])

vs

DEBUG: root_child_path:|/Users/maltfield/sandbox/buskill-app/src/packages/buskill/root_child_mac.py|
DEBUG: Attempting to spawn root child (['/usr/local/opt/python/bin/python3.7', '/Users/maltfield/sandbox/buskill-app/src/packages/buskill/root_child_mac.py', '/var/folders/kx/2fp3kfgj4dj7rx9s5mlb52640000gp/T/buskill.log'])

And, yeah, after arming the GitHub build appears to relaunch (note the line with all the ======) but the script does not

DEBUG: attempting to arm BusKill via <bound method BusKill.armNix of <packages.buskill.BusKill object at 0x10f46f250>>() with the 'soft-shutdown' trigger
usb1.__version__:|3.0.0|
===============================================================================
INFO: Writing to log file '/var/folders/kx/2fp3kfgj4dj7rx9s5mlb52640000gp/T/buskill.log'
DEBUG:__getstate__() pre:dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'root_child', 'is_armed', 'usb_handler', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
DEBUG:__getstate__() post:|dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'is_armed', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
INFO: BusKill is armed. Listening for removal event.

vs

DEBUG: attempting to arm BusKill via <bound method BusKill.armNix of <packages.buskill.BusKill object at 0x101ce32d0>>() with the 'soft-shutdown' trigger
DEBUG:__getstate__() pre:dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'root_child', 'is_armed', 'usb_handler', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
DEBUG:__getstate__() post:|dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'is_armed', 'upgrade_status_msg', 'upgrade_result', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui', 'config', 'trigger'])|
INFO: BusKill is armed. Listening for removal event.

Curiously, both are then able to list their io to the root_child.

And then when I disarm and re-arm, neither process seems to restart, and it can still print the root_child

Therefore, I see the weird "restart" of the process, but only in the build -- and only sometimes. And I can't reproduce the issue where the root_child disappears :(

maltfield commented 1 year ago

So the DEBUG:__getstate__() pre:dict_keys( and DEBUG:__getstate__() post:|dict_keys( got me thinking because root_child is present in the list of the first but absent in the list of the second. And, indeed, our code intentionally & explicitly removes it because it's not pickleable

https://github.com/BusKill/buskill-app/blob/8f89dc191c06fe51d753da095840e0588703cfb9/src/packages/buskill/__init__.py#L436-L462

And this would make sense why --run-trigger works but --arm does not -- because the arm action puts the ARM_FUNCTION in a background process with multiprocessing. So if root_child gets stripped, then I guess the child wouldn't be able to see it.

Looks like this was a big hurdle that I jumped-over last year:

TODO: see if this theory makes sense and, if so, see if we can have the child (which can't see root_child) communicate up to the main process to send the command to the root_child. For the purposes of this test, I should probably just modify armNix() to call self.TRIGGER_FUNCTION after a few seconds (as opposed to waiting to listening for USB removal events). In fact, I could improve --run-trigger by making it do this every time.

maltfield commented 1 year ago

I was successfully able to reproduce Melanie's issue

usb1.__version__:|1.8|
===============================================================================
INFO: Writing to log file '/var/folders/kx/2fp3kfgj4dj7rx9s5mlb52640000gp/T/buskill.log'
buskill version {'VERSION': 'v0.7.0', 'GITHUB_REF': 'refs/heads/a', 'GITHUB_SHA': '8ddfd1e6a5495d5c0b6a56e77c647fba8baa81fe', 'SOURCE_DATE_EPOCH': '1686792830'}
DEBUG: EXECUTED_AS_SCRIPT:|True|
DEBUG: EXE_PATH:|/Users/maltfield/sandbox/buskill-app/src/main.py|
DEBUG: EXE_DIR:|/Users/maltfield/sandbox/buskill-app/src|
DEBUG: EXE_FILE:|main.py|
DEBUG: APP_DIR:|/Users/maltfield|
DEBUG: APPS_DIR:|/Users|
DEBUG: SRC_DIR:|/Users/maltfield/sandbox/buskill-app/src|
DEBUG: os.environ['PATH']:|/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/maltfield/sandbox/buskill-app/src:/Users/maltfield|

DEBUG: Unable to write to '/Users'; skipping.
    [Errno 13] Permission denied: '/Users/tmp1ixh_0gn'

INFO: using DATA_DIR:|/Users/maltfield/.buskill|
DEBUG: CONF_FILE:|/Users/maltfield/.buskill/config.ini|

DEBUG: Attempting to set 'trigger' set to 'soft-shutdown'
DEBUG: Called spawn_root_child()
DEBUG: No root_child detected. Attempting to spawn one.
INFO: You have requested BusKill to do something that requires elevated privliges on your platform. If you'd like to proceed, please authorize BusKill to preform actions as Administrator. Your system may prompt you for your password to proceed.
DEBUG: root_child_path:|/Users/maltfield/sandbox/buskill-app/src/packages/buskill/root_child_mac.py|
DEBUG: Attempting to spawn root child (['/usr/local/opt/python/bin/python3.7', '/Users/maltfield/sandbox/buskill-app/src/packages/buskill/root_child_mac.py', '/var/folders/kx/2fp3kfgj4dj7rx9s5mlb52640000gp/T/buskill.log'])
DEBUG: AuthorizationExecuteWithPrivileges.err:|0|
DEBUG: Root child spawned successfully!
INFO: BusKill 'trigger' set to 'soft-shutdown'
Are you sure you want to execute the 'soft-shutdown' trigger RIGHT NOW? [Y/N] INFO: Arming & Simulating USB Removal Event
DEBUG: attempting to arm BusKill via <bound method BusKill.armNix of <packages.buskill.BusKill object at 0x10a35a1d0>>() with the 'soft-shutdown' trigger
DEBUG:__getstate__() pre:dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'SIMULATE_HOTPLUG_REMOVAL', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'root_child', 'is_armed', 'usb_handler', 'upgrade_status_msg', 'upgrade_result', 'trigger', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui'])|
DEBUG:__getstate__() post:|dict_keys(['CURRENT_PLATFORM', 'KERNEL_VERSION', 'IS_PLATFORM_SUPPORTED', 'OS_NAME_SHORT', 'ERR_PLATFORM_NOT_SUPPORTED', 'ARM_FUNCTION', 'DISARM_FUNCTION', 'TRIGGER_FUNCTION', 'SIMULATE_HOTPLUG_REMOVAL', 'EXECUTED_AS_SCRIPT', 'LOG_FILE_PATH', 'EXE_PATH', 'EXE_DIR', 'EXE_FILE', 'APP_DIR', 'APPS_DIR', 'SRC_DIR', 'DATA_DIR', 'CACHE_DIR', 'CONF_FILE', 'GNUPGHOME', 'UPGRADED_FROM', 'UPGRADED_TO', 'is_armed', 'upgrade_status_msg', 'upgrade_result', 'trigger', 'SUPPORTED_TRIGGERS', 'trigger_softshutdown_lin_shutdown_path', 'trigger_softshutdown_lin_poweroff_path', 'trigger_softshutdown_lin_systemctl_path', 'url_website', 'url_documentation', 'url_documentation_contribute', 'url_documentation_bug_report', 'url_documentation_gui'])|
INFO: BusKill is armed. Listening for removal event.
INFO: To disarm the CLI, exit with ^C or close this terminal
usb1.__version__:|1.8|
DEBUG: called hotplugCallbackNix()
context:|simulation|
device:|simulation|
event:|2|
usb1.HOTPLUG_EVENT_DEVICE_ARRIVED:|1|
usb1.HOTPLUG_EVENT_DEVICE_LEFT:|2|
INFO: Detected USB removal event
calling <bound method BusKill.triggerMac of <packages.buskill.BusKill object at 0x106351750>>
DEBUG: BusKill soft-shutdown trigger executing now
DEBUG: Attempting to send 'soft-shutdown' command to root child
ERROR: Failed to send 'soft-shutdown' command to root child 
    'BusKill' object has no attribute 'root_child'

In order to get this, I had to make some changes to the code in the way that the --run-trigger simulated usb removal event occurs. Now it's done inside the child usb_handler process rather than calling the trigger function directly from the parent process. This is a better simulation as it allows us to catch issues like the one Melanie uncovered: where the unpickleable root_child instance field on the parent BusKill object cannot be seen (and therefore its IO pointer to the root_child process cannot be seen) by the other non-root usb_handler child process

TODO: see if I can get the usb_handler child process to call a function in its parent process. If I can do that, then I can have the child tell the parent to talk to the root child.

maltfield commented 1 year ago

Okay, I got a Proof-of-Concept for a child to execute functions in its parent using a Queue:

I adapted this to our BusKill codebase in the following commit:

maltfield commented 1 year ago

I tested the latest release, and it looks like there's a new bug in the CLI when executing with --arm. It will trigger fine the first time, but not subsequent times. On subsequent times, the usb_handler is still running; you can see it output DEBUG info about the USB removal event -- it's just that the new check_usb_handler() function is apparently no longer running. We want this function to stop running when using --run-trigger, but we don't want it to stop when using --arm

Otherwise, I confirmed that both the lock-screen and soft-shutdown triggers appear to be working over the CLI (on the first time) and fully functional (across multiple triggers in the same arm and multiple arms) in the GUI

maltfield commented 1 year ago

Attempted to fix the above --arm bug in the latest commit:

maltfield commented 1 year ago

I just tested the latest build on windows; it doesn't lock the screen at all anymore :(

Windows is weird because I had to create these different functions and classes that live outside the BusKill class. I actually don't know if I can merge them, but I'd like to KISS, if possible.

I don't see any errors, but one thing I noticed was that I'm trying to call self.usb_handler_queue.put inside the Windows Notification class, when that object doesn't have a usb_handler_queue instance field. The Notification class is instantiated inside the BusKill class, where it's passed the buskill object

https://github.com/BusKill/buskill-app/blob/eaa2c01ff0a11a4c6fdc88960a0df48f14c824fc/src/packages/buskill/__init__.py#L1094

Previously I was calling self.bk, so that's what I should do for referencing the queue: use self.bk.usb_handler_queue.put()

https://github.com/BusKill/buskill-app/blob/eaa2c01ff0a11a4c6fdc88960a0df48f14c824fc/src/packages/buskill/__init__.py#L135-L178

TODO: test the next build on Windows. If it doesn't work, maybe it's because self.usb_handler_queue was None at the time that the Notification object was instantiated, and I should create the queue (instead of setting it to None) in BusKill's __init__() function

maltfield commented 1 year ago

The latest build still doesn't lock on windows, and the logs aren't very elucidating. I'm making some changes to make debug logs more useful to figure out what's going on..

maltfield commented 1 year ago

The latest build for Windows successfully locks the screen and shuts-down as expected. For some reason it took several seconds for the shutdown to occur, but it does work

Oh, probably the shutdown took several seconds because I reduced the frequency of the callback to check_usb_handler() from 0.1 seconds to every 4 seconds -- just to make reading the logs easier while I'm debugging. Should be fixed after I change that back.

I also realized that I had already overridden multiprocessing.Process() with a self.Process() function that included better handling of exceptions in child processes. But for some reason I wasn't using it here (though I was using it for the upgrade process). Switching back to self.Process() should also actually log those darn errors & tracebacks from the child process that I was blind-to in debugging today.

I also tested it from the CLI: both .\buskill --trigger lock-screen --arm | more and .\buskill --trigger soft-shutdown --arm | more worked as expected.

But I found that if I tried to use .\buskill --trigger lock-screen --run-trigger | more or .\buskill --trigger soft-shutdown --run-trigger | more, it gave me a strange Windows popup that said

Failed to execute script main

Fortunately Windows is the easiest platform to simulate hotplug removal events on (with VHD disks), so I'm not sure this is a blocker for the release

maltfield commented 1 year ago

I downloaded the latest build in MacOS

I was successfully able to lock the screen with --run-trigger. And I was successfully able to shutdown with --run-trigger.

So it looks like we fixed this, but I'll need Melanie to confirm.

But first I'm going to cleanup the debug TODOs, make another build, and test again.

maltfield commented 1 year ago

I tested the latest build in Linux

I was successfully able to lock & shutdown using --run-trigger, --arm, and in the GUI

maltfield commented 1 year ago

I tested the latest build in Windows

I was successfully able to lock & shutdown using --arm and in the GUI.

Also, this time the response of the trigger executing was almost immediate after the disk was ejected.

maltfield commented 1 year ago

I tested the latest build in MacOS

maltfield commented 1 year ago

@goldfishlaser can you please test the following build on MacOS?

Testing process:

  1. First, make sure you save all your work and close all your open apps, as this test will suddenly shutdown your computer!
  2. Open the BusKill app.
  3. Insert some USB device into the machine
  4. Click the "Arm" button
  5. Verify that it says that it's armed with the lock-screen trigger
  6. Remove the USB device
  7. Confirm that it locks your screen
  8. Unlock the screen
  9. Insert the USB device again
  10. Open the Navigation Drawer (click the hamburger menu on the top-left of the app)
  11. Click Settings
  12. Click Trigger
  13. Click soft-shutdown
  14. Confirm the change
  15. Click the back button
  16. Click the back button
  17. Confirm that it prompts you for your password
  18. Click the Disarm & Re-Arm Now Button
  19. Remove the USB device
  20. Confirm that the machine shuts-down

Please let me know if there were any anomalies in this process. Thank you!

goldfishlaser commented 1 year ago

When I had the lockscreen trigger on, there was a small delay and then my computer restarted.

maltfield commented 1 year ago

@goldfishlaser can you please try again and see if this is repeatable? We don't even have code to cause a restart...

goldfishlaser commented 1 year ago

My bad, it was the soft-shutdown trigger. I'm trying again.

goldfishlaser commented 1 year ago

This time it worked, it shut down and stayed off, but there was still the very small delay.

maltfield commented 1 year ago

Great! Does the lockscreen trigger work too?

goldfishlaser commented 1 year ago

Yes lockscreen worked great too.

Congrats on it working

maltfield commented 1 year ago

I finished updating the documentation for how to change the Trigger in the GUI, and I've merged it into the dev branch

Next I need to review this ticket and close it out if no further action is needed

maltfield commented 1 year ago

I updated the documentation with the steps to verify and sign the source tarball.

TODO: double-check that I finished merging the .kivy dir and close this ticket:

maltfield commented 1 year ago

I confirmed in #39 that the homedirs are finished; I think it's time to prepare the release!

maltfield commented 1 year ago

I've merged branch v0.7.0 into dev and dev into master

maltfield commented 1 year ago

I downloaded the latest master build on Linux and compared it to a local build

user@disp6165:~/buskill-lin--x86_64$ sudo su -
root@disp6165:~# git clone --single-branch --branch v0.7.0 https://github.com/BusKill/buskill-app.git
Cloning into 'buskill-app'...
remote: Enumerating objects: 6073, done.
remote: Counting objects: 100% (313/313), done.
remote: Compressing objects: 100% (116/116), done.
remote: Total 6073 (delta 207), reused 290 (delta 197), pack-reused 5760
Receiving objects: 100% (6073/6073), 195.63 MiB | 4.36 MiB/s, done.
Resolving deltas: 100% (3432/3432), done.
root@disp6165:~# cd buskill-app/
root@disp6165:~/buskill-app# build/linux/debianWrapper.sh 
...
root@disp6165:~/buskill-app#

root@disp6165:~/buskill-app# ls dist
buskill-lin-v0.7.0-x86_64
root@disp6165:~/buskill-app# ls dist/buskill-lin-v0.7.0-x86_64/
buskill-v0.7.0.AppImage  docs
root@disp6165:~/buskill-app# sha256sum dist/*/*.AppImage
53cdf90542326e7f3bae16aa498d11af40232c92cfa46ea78196620d1fdd9db8  dist/buskill-lin-v0.7.0-x86_64/buskill-v0.7.0.AppImage
root@disp6165:~/buskill-app#

root@disp6165:~/buskill-app# wget https://github.com/BusKill/buskill-app/releases/download/5299346088_linux/buskill-lin--x86_64.tbz
--2023-06-17 12:34:23--  https://github.com/BusKill/buskill-app/releases/download/5299346088_linux/buskill-lin--x86_64.tbz
Resolving github.com (github.com)... 20.207.73.82
Connecting to github.com (github.com)|20.207.73.82|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/274360069/24fd2131-57f5-414a-b02d-979556bde9f7?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230617%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230617T173427Z&X-Amz-Expires=300&X-Amz-Signature=ca10022c842e68eae2926218a40a1d6a7b9a6ce7003d8ad57637a60d529f2f38&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=274360069&response-content-disposition=attachment%3B%20filename%3Dbuskill-lin--x86_64.tbz&response-content-type=application%2Foctet-stream [following]
--2023-06-17 12:34:25--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/274360069/24fd2131-57f5-414a-b02d-979556bde9f7?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230617%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230617T173427Z&X-Amz-Expires=300&X-Amz-Signature=ca10022c842e68eae2926218a40a1d6a7b9a6ce7003d8ad57637a60d529f2f38&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=274360069&response-content-disposition=attachment%3B%20filename%3Dbuskill-lin--x86_64.tbz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110.133, 185.199.108.133, 185.199.109.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 34189423 (33M) [application/octet-stream]
Saving to: ‘buskill-lin--x86_64.tbz’

buskill-lin--x86_64 100%[===================>]  32.61M  3.66MB/s    in 29s     

2023-06-17 12:34:56 (1.12 MB/s) - ‘buskill-lin--x86_64.tbz’ saved [34189423/34189423]

root@disp6165:~/buskill-app#

root@disp6165:~/buskill-app# tar -xjf buskill-lin--x86_64.tbz 
root@disp6165:~/buskill-app# sha256sum */*.AppImage
510d22825843a874757667141207296c103b684b3fcf52db80179e5715a62faf  buskill-lin--x86_64/buskill-.AppImage
root@disp6165:~/buskill-app# 

Fuck, they differ. Maybe it's because of the filenames. Or another consequence of it failing to assign the build to the variable. I should fix that.

maltfield commented 1 year ago

Ugh, it also appears that all my sign jobs are failing

2023-06-17T17:39:26.2825177Z ##[group]Run actions/checkout@v2
2023-06-17T17:39:26.2826145Z with:
2023-06-17T17:39:26.2827037Z   repository: BusKill/buskill-app
2023-06-17T17:39:26.2828285Z   token: ***
2023-06-17T17:39:26.2829153Z   ssh-strict: true
2023-06-17T17:39:26.2830062Z   persist-credentials: true
2023-06-17T17:39:26.2830948Z   clean: true
2023-06-17T17:39:26.2831840Z   fetch-depth: 1
2023-06-17T17:39:26.2832693Z   lfs: false
2023-06-17T17:39:26.2833549Z   submodules: false
2023-06-17T17:39:26.2834708Z   set-safe-directory: true
2023-06-17T17:39:26.2835615Z ##[endgroup]
2023-06-17T17:39:26.3006713Z ##[command]/usr/bin/docker exec  613f0e65d361f9b423442ac75b2e10c2520eacdbe535d7de02ee59034d0d91d0 sh -c "cat /etc/*release | grep ^ID"
2023-06-17T17:39:28.5433847Z Syncing repository: BusKill/buskill-app
2023-06-17T17:39:28.5461597Z ##[group]Getting Git version info
2023-06-17T17:39:28.5462854Z Working directory is '/__w/buskill-app/buskill-app'
2023-06-17T17:39:28.5478639Z ##[endgroup]
2023-06-17T17:39:28.5488968Z Deleting the contents of '/__w/buskill-app/buskill-app'
2023-06-17T17:39:28.5490232Z The repository will be downloaded using the GitHub REST API
2023-06-17T17:39:28.5491559Z To create a local Git repository instead, add Git 2.18 or higher to the PATH
2023-06-17T17:39:28.5495897Z Downloading the archive
2023-06-17T17:39:30.6453085Z Writing archive to disk
2023-06-17T17:39:30.7602545Z Extracting the archive
2023-06-17T17:39:30.7628349Z [command]/bin/tar xz -C /__w/buskill-app/buskill-app/b8098ac1-ce0b-47d0-a330-03c3d6dd1efa -f /__w/buskill-app/buskill-app/b8098ac1-ce0b-47d0-a330-03c3d6dd1efa.tar.gz
2023-06-17T17:39:31.0614182Z Resolved version BusKill-buskill-app-d87f428
2023-06-17T17:39:31.1432315Z ##[group]Run build/signRelease.sh
2023-06-17T17:39:31.1433382Z build/signRelease.sh
2023-06-17T17:39:31.1440029Z shell: bash --noprofile --norc -e -o pipefail {0}
2023-06-17T17:39:31.1441065Z env:
2023-06-17T17:39:31.1442477Z   GITHUB_TOKEN: ***
2023-06-17T17:39:31.1483655Z   BUSKILL_PRERELEASE_PGP_KEY: ***
2023-06-17T17:39:31.1484631Z   RELEASE_ID: 108977026
2023-06-17T17:39:31.1485517Z ##[endgroup]
2023-06-17T17:39:31.2566061Z /__w/_temp/f697867c-08ad-4a12-8e62-64a9d88c7dee.sh: line 1: build/signRelease.sh: No such file or directory
2023-06-17T17:39:31.2631007Z ##[error]Process completed with exit code 127.
maltfield commented 1 year ago

So it looks like the variable that's failing to get set is VERSION but all these vars that get info from git are failing

2023-06-17T17:27:16.2923390Z ++ git log -1 --pretty=%ct
2023-06-17T17:27:16.2938172Z fatal: detected dubious ownership in repository at '/root/buskill-app'
2023-06-17T17:27:16.2940722Z To add an exception for this directory, call:
2023-06-17T17:27:16.2940978Z 
2023-06-17T17:27:16.2941416Z    git config --global --add safe.directory /root/buskill-app
2023-06-17T17:27:16.2947139Z + export SOURCE_DATE_EPOCH=
2023-06-17T17:27:16.2947439Z + SOURCE_DATE_EPOCH=
2023-06-17T17:27:16.2947796Z + '[' -z ']'
2023-06-17T17:27:16.2954166Z ++ git show-ref
2023-06-17T17:27:16.2957187Z ++ awk '{print $1}'
2023-06-17T17:27:16.2966715Z ++ head -n1
2023-06-17T17:27:16.2980229Z fatal: detected dubious ownership in repository at '/root/buskill-app'
2023-06-17T17:27:16.2981357Z To add an exception for this directory, call:
2023-06-17T17:27:16.2982700Z 
2023-06-17T17:27:16.2983013Z    git config --global --add safe.directory /root/buskill-app
2023-06-17T17:27:16.2990578Z + GITHUB_SHA=
2023-06-17T17:27:16.2990950Z + '[' -z ']'
2023-06-17T17:27:16.3002295Z ++ git show-ref
2023-06-17T17:27:16.3005681Z ++ awk '{print $2}'
2023-06-17T17:27:16.3015774Z ++ head -n1
2023-06-17T17:27:16.3027650Z fatal: detected dubious ownership in repository at '/root/buskill-app'
2023-06-17T17:27:16.3028218Z To add an exception for this directory, call:
2023-06-17T17:27:16.3028523Z 
2023-06-17T17:27:16.3029917Z    git config --global --add safe.directory /root/buskill-app
2023-06-17T17:27:16.3041018Z + GITHUB_REF=
2023-06-17T17:27:16.3051972Z ++ git symbolic-ref HEAD
2023-06-17T17:27:16.3055816Z ++ awk -F / '{print $NF}'
2023-06-17T17:27:16.3065932Z ++ head -n1
2023-06-17T17:27:16.3077729Z fatal: detected dubious ownership in repository at '/root/buskill-app'
2023-06-17T17:27:16.3082635Z To add an exception for this directory, call:
2023-06-17T17:27:16.3082875Z 
2023-06-17T17:27:16.3083181Z    git config --global --add safe.directory /root/buskill-app
2023-06-17T17:27:16.3093238Z + VERSION=
2023-06-17T17:27:16.3097599Z + [[ '' = \d\e\v ]]
2023-06-17T17:27:16.3101680Z + ARCHIVE_DIR=buskill-lin--x86_64
maltfield commented 1 year ago

ok, looks like git was refusing to give the information about the repo due to ownership of the files. Probably what's happening is that I'm running as root and the GitHub Actions step made it some other user. Anyway, on a single-user system running on an ephemeral CI process, I don't think it matters. I'm just setting

git config --global --add safe.directory /root/buskill-app

I also did the same for Mac & Windows builds

maltfield commented 1 year ago

ok, looks like the VERSION is fixed on the latest build of the v0.7.0 branch

maltfield commented 1 year ago

Ugh, I changed the workflow for the signing, but for some reason the GitHub Actions is still using the old workflow. Even after a second trivial commit. Maybe it only takes the workflow from the master branch, regardless of in which branch the commit that triggered it actually lived.

I'll try merging to master, but it sucks that I can't test it before merging.