Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(build): rename MacOS Helpers #955

Closed
wants to merge 37 commits into from
Closed

Conversation

ayushmanchhabra
Copy link
Collaborator

@ayushmanchhabra ayushmanchhabra commented Oct 2, 2023

Fixes: #966

Description

  • Rename MacOS Helper apps
  • Update relevant Info.plist values
  • Update Helper apps and relevant Info.plist values
  • Do not rely on symlinks
  • Add tests

Note: MacOS CI fails since #932 has not landed. Helper apps will also not be renamed correctly since symlinks are not preserved.

Testing steps

  • Clone repo
  • Checkout macos-helpers branch
  • npm install node modules
  • npm run demo to download and build demo app
  • Go to /test/fixture/out/Demo.app and execute application
  • Verify that app does not crash with error message The display compositor is frequently crashing
  • Verify that Helper apps are renamed by checking in Activity Monitor

@ayushmanchhabra ayushmanchhabra marked this pull request as ready for review October 2, 2023 05:52
@ayushmanchhabra ayushmanchhabra changed the title feat: rename MacOS Helpers feat(build): rename MacOS Helpers Oct 2, 2023
@sysrage
Copy link
Contributor

sysrage commented Oct 2, 2023

The demo app crashes on launch:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               nwjs [2714]
Path:                  /Users/USER/Documents/*/Demo.app/Contents/MacOS/nwjs
Identifier:            io.nwutils.demo
Version:               0.0.0 (0.0.0)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2023-10-02 11:59:52.4692 -0400
OS Version:            macOS 14.0 (23A344)
Report Version:        12
Anonymous UUID:        3F8516F2-8742-FCDA-C255-256DE23A8B41

Sleep/Wake UUID:       273D4FF7-C111-4B6A-A65B-2A3D779DA1D4

Time Awake Since Boot: 9400 seconds
Time Since Wake:       8461 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process:   nwjs [2714]

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x1825e711c __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x18261ecc0 pthread_kill + 288
2   libsystem_c.dylib             	       0x18252ea50 abort + 180
3   libsystem_c.dylib             	       0x18252eb5c abort_report_np + 84
4   nwjs                          	       0x100cc89b0 0x100cc8000 + 2480
5   nwjs                          	       0x100cc8904 main + 236
6   dyld                          	       0x1822a5058 start + 2224


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x0000000000000073   x5: 0x000000000000002e   x6: 0x000000000000002e   x7: 0x0000000000000000
    x8: 0x420520ecc3e82101   x9: 0x420520ed1a667201  x10: 0x0000000000000002  x11: 0x00000000fffffffd
   x12: 0x0000010000000000  x13: 0x0000000000000000  x14: 0x0000000000000000  x15: 0x0000000000000000
   x16: 0x0000000000000148  x17: 0x00000001e2b14db8  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x00000001d98e5300  x21: 0x0000000000000103  x22: 0x00000001d98e53e0  x23: 0x00000000000000a1
   x24: 0x000000016f1379a0  x25: 0x0000000182323b1b  x26: 0x0000000000000000  x27: 0x0000000000000000
   x28: 0x0000000000000000   fp: 0x000000016f1367b0   lr: 0x000000018261ecc0
    sp: 0x000000016f136790   pc: 0x00000001825e711c cpsr: 0x40001000
   far: 0x0000000100cfc000  esr: 0x56000080  Address size fault

Binary Images:
       0x100cc8000 -        0x100ceffff io.nwutils.demo (0.0.0) <4c4c44d8-5555-3144-a1fe-b2a060ce1ad9> /Users/USER/Documents/*/Demo.app/Contents/MacOS/nwjs
       0x1825dd000 -        0x182617fef libsystem_kernel.dylib (*) <a7d3c07d-0a1e-3c4c-8fba-66905e16bf99> /usr/lib/system/libsystem_kernel.dylib
       0x182618000 -        0x182624ff3 libsystem_pthread.dylib (*) <e4debb6e-421d-33d0-9e17-77ae0e0fe4dc> /usr/lib/system/libsystem_pthread.dylib
       0x1824b8000 -        0x182536ff3 libsystem_c.dylib (*) <1b84a7e4-8958-330c-98b8-27d491dff69e> /usr/lib/system/libsystem_c.dylib
       0x18229f000 -        0x182332873 dyld (*) <ffd8ab66-c9ab-31df-ab80-3a3dff367ddd> /usr/lib/dyld
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=891.9M resident=0K(0%) swapped_out_or_unallocated=891.9M(100%)
Writable regions: Total=19.5M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=19.5M(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Kernel Alloc Once                   32K        1 
MALLOC                            11.2M       10 
MALLOC guard page                   96K        6 
STACK GUARD                       56.0M        1 
Stack                             8176K        1 
VM_ALLOCATE                         16K        1 
__AUTH                              46K       12 
__AUTH_CONST                        79K       39 
__DATA                             193K       37 
__DATA_CONST                       203K       41 
__DATA_DIRTY                        79K       22 
__LINKEDIT                       886.5M        2 
__OBJC_RO                         70.6M        1 
__OBJC_RW                         2153K        1 
__TEXT                            5608K       43 
dyld private memory                272K        2 
shared memory                       16K        1 
===========                     =======  ======= 
TOTAL                              1.0G      221 



-----------
Full Report
-----------

{"app_name":"nwjs","timestamp":"2023-10-02 11:59:52.00 -0400","app_version":"0.0.0","slice_uuid":"4c4c44d8-5555-3144-a1fe-b2a060ce1ad9","build_version":"0.0.0","platform":1,"bundleID":"io.nwutils.demo","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 14.0 (23A344)","roots_installed":0,"name":"nwjs","incident_id":"9823F412-7D6F-4F16-AFBD-F1D94CC913F3"}
{
  "uptime" : 9400,
  "procRole" : "Background",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "Mac13,2",
  "coalitionID" : 2392,
  "osVersion" : {
    "train" : "macOS 14.0",
    "build" : "23A344",
    "releaseType" : "User"
  },
  "captureTime" : "2023-10-02 11:59:52.4692 -0400",
  "codeSigningMonitor" : 1,
  "incident" : "9823F412-7D6F-4F16-AFBD-F1D94CC913F3",
  "pid" : 2714,
  "translated" : false,
  "cpuType" : "ARM-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2023-10-02 11:59:51.3077 -0400",
  "procStartAbsTime" : 227139460523,
  "procExitAbsTime" : 227167330425,
  "procName" : "nwjs",
  "procPath" : "\/Users\/USER\/Documents\/*\/Demo.app\/Contents\/MacOS\/nwjs",
  "bundleInfo" : {"CFBundleShortVersionString":"0.0.0","CFBundleVersion":"0.0.0","CFBundleIdentifier":"io.nwutils.demo"},
  "storeInfo" : {"deviceIdentifierForVendor":"F8B5E058-6F1B-53F7-BB26-B168F25A4DE1","thirdParty":true},
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "io.nwutils.demo",
  "crashReporterKey" : "3F8516F2-8742-FCDA-C255-256DE23A8B41",
  "codeSigningID" : "nwjs",
  "codeSigningTeamID" : "",
  "codeSigningFlags" : 570556929,
  "codeSigningValidationCategory" : 10,
  "codeSigningTrustLevel" : 4294967295,
  "instructionByteStream" : {"beforePC":"fyMD1f17v6n9AwCRXOD\/l78DAJH9e8Go\/w9f1sADX9YQKYDSARAA1A==","atPC":"AwEAVH8jA9X9e7+p\/QMAkVHg\/5e\/AwCR\/XvBqP8PX9bAA1\/WcAqA0g=="},
  "wakeTime" : 8461,
  "sleepWakeUUID" : "273D4FF7-C111-4B6A-A65B-2A3D779DA1D4",
  "sip" : "enabled",
  "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"},
  "termination" : {"flags":0,"code":6,"namespace":"SIGNAL","indicator":"Abort trap: 6","byProc":"nwjs","byPid":2714},
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":368067,"threadState":{"x":[{"value":0},{"value":0},{"value":0},{"value":0},{"value":115},{"value":46},{"value":46},{"value":0},{"value":4757244782657937665},{"value":4757244784109056513},{"value":2},{"value":4294967293},{"value":1099511627776},{"value":0},{"value":0},{"value":0},{"value":328},{"value":8098237880},{"value":0},{"value":6},{"value":7944950528,"symbolLocation":0,"symbol":"_main_thread"},{"value":259},{"value":7944950752,"symbolLocation":224,"symbol":"_main_thread"},{"value":161},{"value":6158514592},{"value":6479297307},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6482422976},"cpsr":{"value":1073745920},"fp":{"value":6158510000},"sp":{"value":6158509968},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6482194716,"matchesCrashFrame":1},"far":{"value":4308582400}},"queue":"com.apple.main-thread","frames":[{"imageOffset":41244,"symbol":"__pthread_kill","symbolLocation":8,"imageIndex":1},{"imageOffset":27840,"symbol":"pthread_kill","symbolLocation":288,"imageIndex":2},{"imageOffset":485968,"symbol":"abort","symbolLocation":180,"imageIndex":3},{"imageOffset":486236,"symbol":"abort_report_np","symbolLocation":84,"imageIndex":3},{"imageOffset":2480,"imageIndex":0},{"imageOffset":2308,"symbol":"main","symbolLocation":236,"imageIndex":0},{"imageOffset":24664,"symbol":"start","symbolLocation":2224,"imageIndex":4}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4308369408,
    "CFBundleShortVersionString" : "0.0.0",
    "CFBundleIdentifier" : "io.nwutils.demo",
    "size" : 163840,
    "uuid" : "4c4c44d8-5555-3144-a1fe-b2a060ce1ad9",
    "path" : "\/Users\/USER\/Documents\/*\/Demo.app\/Contents\/MacOS\/nwjs",
    "name" : "nwjs",
    "CFBundleVersion" : "0.0.0"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6482153472,
    "size" : 241648,
    "uuid" : "a7d3c07d-0a1e-3c4c-8fba-66905e16bf99",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6482395136,
    "size" : 53236,
    "uuid" : "e4debb6e-421d-33d0-9e17-77ae0e0fe4dc",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6480953344,
    "size" : 520180,
    "uuid" : "1b84a7e4-8958-330c-98b8-27d491dff69e",
    "path" : "\/usr\/lib\/system\/libsystem_c.dylib",
    "name" : "libsystem_c.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6478753792,
    "size" : 604276,
    "uuid" : "ffd8ab66-c9ab-31df-ab80-3a3dff367ddd",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  }
],
  "sharedCache" : {
  "base" : 6478004224,
  "size" : 4012523520,
  "uuid" : "7906534c-5d2b-3ba8-b9c6-93a5cf1b7b50"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=891.9M resident=0K(0%) swapped_out_or_unallocated=891.9M(100%)\nWritable regions: Total=19.5M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=19.5M(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nKernel Alloc Once                   32K        1 \nMALLOC                            11.2M       10 \nMALLOC guard page                   96K        6 \nSTACK GUARD                       56.0M        1 \nStack                             8176K        1 \nVM_ALLOCATE                         16K        1 \n__AUTH                              46K       12 \n__AUTH_CONST                        79K       39 \n__DATA                             193K       37 \n__DATA_CONST                       203K       41 \n__DATA_DIRTY                        79K       22 \n__LINKEDIT                       886.5M        2 \n__OBJC_RO                         70.6M        1 \n__OBJC_RW                         2153K        1 \n__TEXT                            5608K       43 \ndyld private memory                272K        2 \nshared memory                       16K        1 \n===========                     =======  ======= \nTOTAL                              1.0G      221 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "logWritingSignature" : "c62c865183c54c965ee34c451dc7994c9a4e5e5a",
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "6434420a89ec2e0a7a38bf5a",
      "factorPackIds" : {

      },
      "deploymentId" : 240000011
    },
    {
      "rolloutId" : "6297d96be2c9387df974efa4",
      "factorPackIds" : {

      },
      "deploymentId" : 240000014
    }
  ],
  "experiments" : [
    {
      "treatmentId" : "6dd670af-0633-45e4-ae5f-122ae4df02be",
      "experimentId" : "64406ba83deb637ac8a04419",
      "deploymentId" : 900000017
    }
  ]
}
}

Model: Mac13,2, BootROM 10151.1.1, proc 20:16:4 processors, 64 GB, SMC 
Graphics: Apple M1 Ultra, Apple M1 Ultra, Built-In
Display: ROG PG278QR, 2560 x 1440 (QHD/WQHD - Wide Quad High Definition), Main, MirrorOff, Online
Memory Module: LPDDR5, Hynix
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4387), wl0: Aug  8 2023 04:27:20 version 20.10.1062.3.8.7.162 FWID 01-c101870a
AirPort: 
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Ethernet, Ethernet, en0
Network Service: Wi-Fi, AirPort, en1
USB Device: USB31Bus
USB Device: USB31Bus
USB Device: USB31Bus
USB Device: USB31Bus
USB Device: USB31Bus
USB Device: USB31Bus
USB Device: USB31Bus
Thunderbolt Bus: Mac Studio, Apple Inc.
Thunderbolt Bus: Mac Studio, Apple Inc.
Thunderbolt Bus: Mac Studio, Apple Inc.
Thunderbolt Bus: Mac Studio, Apple Inc.
Thunderbolt Bus: Mac Studio, Apple Inc.
Thunderbolt Bus: Mac Studio, Apple Inc.

@ayushmanchhabra ayushmanchhabra marked this pull request as draft October 14, 2023 15:15
@ayushmanchhabra ayushmanchhabra deleted the macos-helpers branch November 27, 2023 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename MacOS Helpers
2 participants