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

Auto light/dark mode not working #247

Open
mangoconcoco opened this issue Dec 21, 2024 · 5 comments
Open

Auto light/dark mode not working #247

mangoconcoco opened this issue Dec 21, 2024 · 5 comments

Comments

@mangoconcoco
Copy link

I've patched the binary as instructed in the readme and get this:

sed: RE error: illegal byte sequence
The patch is complete. You may now restart Spotify.

@JulienMaille
Copy link
Owner

What's your Operating System? You won't get any help without more details

@cbrst
Copy link

cbrst commented Dec 27, 2024

I think the issue here is probably macOS' sed not being able to deal with the binary.

Trying to use gsed instead

curl -fsSL "https://raw.githubusercontent.com/JulienMaille/dribbblish-dynamic-theme/master/patch-dark-mode.sh" | sed -e 's/sed/gsed/' | sh

does seem to do something. It doesn't throw an error. However, unsurprisingly, Spotify will not launch afterwards, since the binary has been modified:

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

Process:               Spotify [50175]
Path:                  /Applications/Spotify.app/Contents/MacOS/Spotify
Identifier:            com.spotify.client
Version:               1.2.53.438 (1.2.53.438)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2024-12-27 14:53:54.1482 +0100
OS Version:            macOS 15.1.1 (24B91)
Report Version:        12
Anonymous UUID:        EA058BA3-131E-83E6-6C87-883AB036C4B9

Sleep/Wake UUID:       05AF8CA1-7064-4B14-85DE-46A93B966B82

Time Awake Since Boot: 990000 seconds
Time Since Wake:       8845 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid))
Exception Codes:       UNKNOWN_0x32 at 0x000000010441ed95
Exception Codes:       0x0000000000000032, 0x000000010441ed95

Termination Reason:    Namespace CODESIGNING, Code 2 Invalid Page

VM Region Info: 0x10441ed95 is in 0x102a1c000-0x104544000;  bytes after start: 27274645  bytes before end: 1200746
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  __TEXT                      102a1c000-104544000    [ 27.2M] r-x/r-x SM=COW  /Applications/Spotify.app/Contents/MacOS/Spotify
      __DATA_CONST                104544000-104698000    [ 1360K] r--/rw- SM=COW  /Applications/Spotify.app/Contents/MacOS/Spotify

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   Spotify                       	       0x102a62cac 0x102a1c000 + 289964
1   dyld                          	       0x1853f7e90 invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 592
2   dyld                          	       0x18543629c invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 172
3   dyld                          	       0x185429c38 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 496
4   dyld                          	       0x1853dc2dc dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 300
5   dyld                          	       0x185428bcc dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 192
6   dyld                          	       0x18542b5a0 dyld3::MachOFile::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, bool&) block_pointer) const + 160
7   dyld                          	       0x185435f90 dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 432
8   dyld                          	       0x1853f7bb4 dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 176
9   dyld                          	       0x1853ff190 dyld4::JustInTimeLoader::runInitializers(dyld4::RuntimeState&) const + 36
10  dyld                          	       0x1853f8270 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const + 312
11  dyld                          	       0x1853fc560 dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator()() const + 180
12  dyld                          	       0x1853f8460 dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 412
13  dyld                          	       0x185417a0c dyld4::APIs::runAllInitializersForMain() + 424
14  dyld                          	       0x1853e18c8 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3268
15  dyld                          	       0x1853e0bc0 dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const + 544
16  dyld                          	       0x1853e005c start + 2304


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000001   x1: 0x00000001046e5208   x2: 0x000000016d3e3b20   x3: 0x000000016d3e3b98
    x4: 0x00000001ea5e0010   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000000
    x8: 0x000000010441ed95   x9: 0x0000000000000103  x10: 0x00000001853f7c40  x11: 0x0000000102ac3470
   x12: 0x0000000000000000  x13: 0x0000000000000000  x14: 0x0000000000152bb0  x15: 0x000000008181effb
   x16: 0x0000000185795344  x17: 0x00000001f2ad6578  x18: 0x0000000000000000  x19: 0x00000001ea5e0050
   x20: 0x0000000fffffc10c  x21: 0x0000000102a62c94  x22: 0x00000001ea5e04a0  x23: 0x0000000102a1c8c8
   x24: 0x0000000102a1c5f8  x25: 0x0000000102a1d9b0  x26: 0x000000016d3cdec0  x27: 0x0000000102a1c8c8
   x28: 0x000000016d3d3060   fp: 0x000000016d3cdd10   lr: 0x00000001853f7e90
    sp: 0x000000016d3cdc50   pc: 0x0000000102a62cac cpsr: 0x60001000
   far: 0x000000010441ed95  esr: 0x92000007 (Data Abort) byte read Translation fault

Binary Images:
       0x102a1c000 -        0x104543fff com.spotify.client (1.2.53.438) <35cb87d0-2812-3e2a-b240-a8ad077defca> /Applications/Spotify.app/Contents/MacOS/Spotify
       0x1853da000 -        0x18545c7b3 dyld (*) <6beafde4-b011-3e47-8aae-4d7b6e4bb7e8> /usr/lib/dyld
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
       0x185794000 -        0x18579bfe3 libsystem_platform.dylib (*) <7d01a5f7-2dbb-36b1-b44d-04d289d8f4b0> /usr/lib/system/libsystem_platform.dylib

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=1.0G resident=0K(0%) swapped_out_or_unallocated=1.0G(100%)
Writable regions: Total=538.6M written=273K(0%) resident=273K(0%) swapped_out=0K(0%) unallocated=538.3M(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Kernel Alloc Once                   32K        1 
MALLOC                           530.2M       13 
MALLOC guard page                   96K        6 
STACK GUARD                       56.0M        1 
Stack                             8176K        1 
__AUTH                            1608K      293 
__AUTH_CONST                      30.1M      472 
__CTF                               824        1 
__DATA                            6105K      452 
__DATA_CONST                      16.5M      477 
__DATA_DIRTY                      1198K      149 
__FONT_DATA                        2352        1 
__LINKEDIT                       585.1M        2 
__OBJC_RW                         2354K        1 
__TEXT                           473.0M      490 
__TPRO_CONST                       272K        2 
page table in kernel               273K        1 
shared memory                       32K        1 
===========                     =======  ======= 
TOTAL                              1.7G     2364 



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

{"app_name":"Spotify","timestamp":"2024-12-27 14:53:54.00 +0100","app_version":"1.2.53.438","slice_uuid":"35cb87d0-2812-3e2a-b240-a8ad077defca","build_version":"1.2.53.438","platform":1,"bundleID":"com.spotify.client","share_with_app_devs":1,"is_first_party":0,"bug_type":"309","os_version":"macOS 15.1.1 (24B91)","roots_installed":0,"name":"Spotify","incident_id":"792BA8E3-BC5C-411A-8055-D3BBC501A4CC"}
{
  "uptime" : 990000,
  "procRole" : "Background",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "Mac15,13",
  "coalitionID" : 186724,
  "osVersion" : {
    "train" : "macOS 15.1.1",
    "build" : "24B91",
    "releaseType" : "User"
  },
  "captureTime" : "2024-12-27 14:53:54.1482 +0100",
  "codeSigningMonitor" : 1,
  "incident" : "792BA8E3-BC5C-411A-8055-D3BBC501A4CC",
  "pid" : 50175,
  "translated" : false,
  "cpuType" : "ARM-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2024-12-27 14:53:53.8533 +0100",
  "procStartAbsTime" : 23961409302794,
  "procExitAbsTime" : 23961416369841,
  "procName" : "Spotify",
  "procPath" : "\/Applications\/Spotify.app\/Contents\/MacOS\/Spotify",
  "bundleInfo" : {"CFBundleShortVersionString":"1.2.53.438","CFBundleVersion":"1.2.53.438","CFBundleIdentifier":"com.spotify.client"},
  "storeInfo" : {"deviceIdentifierForVendor":"32329BDE-6721-5D0D-BD99-49F881C786D6","thirdParty":true},
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "com.spotify.client",
  "crashReporterKey" : "EA058BA3-131E-83E6-6C87-883AB036C4B9",
  "codeSigningID" : "com.spotify.client",
  "codeSigningTeamID" : "2FNC3A47ZF",
  "codeSigningFlags" : 587268608,
  "codeSigningValidationCategory" : 0,
  "codeSigningTrustLevel" : 4294967295,
  "instructionByteStream" : {"beforePC":"l1pclOADE6p2WFyU5VsBlAHkAPAhIAiRCAKAUihcADnozQCQCFU2kQ==","atPC":"AAHAPSAAgD0A1wDQALxC+T9AADkCmtwQHyAD1ZtaXBT9e7+p\/QMAkQ=="},
  "bootSessionUUID" : "DDF89FE8-7BBE-40CC-970D-8460BAF761EA",
  "wakeTime" : 8845,
  "sleepWakeUUID" : "05AF8CA1-7064-4B14-85DE-46A93B966B82",
  "sip" : "enabled",
  "vmRegionInfo" : "0x10441ed95 is in 0x102a1c000-0x104544000;  bytes after start: 27274645  bytes before end: 1200746\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      UNUSED SPACE AT START\n--->  __TEXT                      102a1c000-104544000    [ 27.2M] r-x\/r-x SM=COW  \/Applications\/Spotify.app\/Contents\/MacOS\/Spotify\n      __DATA_CONST                104544000-104698000    [ 1360K] r--\/rw- SM=COW  \/Applications\/Spotify.app\/Contents\/MacOS\/Spotify",
  "exception" : {"codes":"0x0000000000000032, 0x000000010441ed95","rawCodes":[50,4366396821],"type":"EXC_BAD_ACCESS","signal":"SIGKILL (Code Signature Invalid)","subtype":"UNKNOWN_0x32 at 0x000000010441ed95"},
  "termination" : {"flags":0,"code":2,"namespace":"CODESIGNING","indicator":"Invalid Page"},
  "vmregioninfo" : "0x10441ed95 is in 0x102a1c000-0x104544000;  bytes after start: 27274645  bytes before end: 1200746\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      UNUSED SPACE AT START\n--->  __TEXT                      102a1c000-104544000    [ 27.2M] r-x\/r-x SM=COW  \/Applications\/Spotify.app\/Contents\/MacOS\/Spotify\n      __DATA_CONST                104544000-104698000    [ 1360K] r--\/rw- SM=COW  \/Applications\/Spotify.app\/Contents\/MacOS\/Spotify",
  "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":25677766,"threadState":{"x":[{"value":1},{"value":4369306120},{"value":6127762208},{"value":6127762328},{"value":8226996240,"symbolLocation":16,"symbol":"dyld4::gDyld"},{"value":0},{"value":0},{"value":0},{"value":4366396821},{"value":259},{"value":6530497600,"symbolLocation":0,"symbol":"invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const"},{"value":4339807344,"symbolLocation":0,"symbol":"boost::detail::core_typeid_lib_id()"},{"value":0},{"value":0},{"value":1387440},{"value":2172776443},{"value":6534288196,"symbolLocation":0,"symbol":"os_unfair_lock_unlock"},{"value":8366417272},{"value":0},{"value":8226996304,"symbolLocation":0,"symbol":"dyld4::preallocator"},{"value":68719460620},{"value":4339412116},{"value":8226997408,"symbolLocation":1104,"symbol":"dyld4::preallocator"},{"value":4339124424},{"value":4339123704},{"value":4339128752},{"value":6127673024},{"value":4339124424},{"value":6127693920}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6530498192},"cpsr":{"value":1610616832},"fp":{"value":6127672592},"sp":{"value":6127672400},"esr":{"value":2449473543,"description":"(Data Abort) byte read Translation fault"},"pc":{"value":4339412140,"matchesCrashFrame":1},"far":{"value":4366396821}},"queue":"com.apple.main-thread","frames":[{"imageOffset":289964,"imageIndex":0},{"imageOffset":122512,"symbol":"invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const","symbolLocation":592,"imageIndex":1},{"imageOffset":377500,"symbol":"invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const","symbolLocation":172,"imageIndex":1},{"imageOffset":326712,"symbol":"invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const","symbolLocation":496,"imageIndex":1},{"imageOffset":8924,"symbol":"dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const","symbolLocation":300,"imageIndex":1},{"imageOffset":322508,"symbol":"dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const","symbolLocation":192,"imageIndex":1},{"imageOffset":333216,"symbol":"dyld3::MachOFile::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, bool&) block_pointer) const","symbolLocation":160,"imageIndex":1},{"imageOffset":376720,"symbol":"dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const","symbolLocation":432,"imageIndex":1},{"imageOffset":121780,"symbol":"dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const","symbolLocation":176,"imageIndex":1},{"imageOffset":151952,"symbol":"dyld4::JustInTimeLoader::runInitializers(dyld4::RuntimeState&) const","symbolLocation":36,"imageIndex":1},{"imageOffset":123504,"symbol":"dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const","symbolLocation":312,"imageIndex":1},{"imageOffset":140640,"symbol":"dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator()() const","symbolLocation":180,"imageIndex":1},{"imageOffset":124000,"symbol":"dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const","symbolLocation":412,"imageIndex":1},{"imageOffset":252428,"symbol":"dyld4::APIs::runAllInitializersForMain()","symbolLocation":424,"imageIndex":1},{"imageOffset":30920,"symbol":"dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)","symbolLocation":3268,"imageIndex":1},{"imageOffset":27584,"symbol":"dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const","symbolLocation":544,"imageIndex":1},{"imageOffset":24668,"symbol":"start","symbolLocation":2304,"imageIndex":1}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4339122176,
    "CFBundleShortVersionString" : "1.2.53.438",
    "CFBundleIdentifier" : "com.spotify.client",
    "size" : 28475392,
    "uuid" : "35cb87d0-2812-3e2a-b240-a8ad077defca",
    "path" : "\/Applications\/Spotify.app\/Contents\/MacOS\/Spotify",
    "name" : "Spotify",
    "CFBundleVersion" : "1.2.53.438"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6530375680,
    "size" : 534452,
    "uuid" : "6beafde4-b011-3e47-8aae-4d7b6e4bb7e8",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6534283264,
    "size" : 32740,
    "uuid" : "7d01a5f7-2dbb-36b1-b44d-04d289d8f4b0",
    "path" : "\/usr\/lib\/system\/libsystem_platform.dylib",
    "name" : "libsystem_platform.dylib"
  }
],
  "sharedCache" : {
  "base" : 6529564672,
  "size" : 4753735680,
  "uuid" : "f66bac4e-1e78-38af-b867-c1cf5daa0302"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=1.0G resident=0K(0%) swapped_out_or_unallocated=1.0G(100%)\nWritable regions: Total=538.6M written=273K(0%) resident=273K(0%) swapped_out=0K(0%) unallocated=538.3M(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nKernel Alloc Once                   32K        1 \nMALLOC                           530.2M       13 \nMALLOC guard page                   96K        6 \nSTACK GUARD                       56.0M        1 \nStack                             8176K        1 \n__AUTH                            1608K      293 \n__AUTH_CONST                      30.1M      472 \n__CTF                               824        1 \n__DATA                            6105K      452 \n__DATA_CONST                      16.5M      477 \n__DATA_DIRTY                      1198K      149 \n__FONT_DATA                        2352        1 \n__LINKEDIT                       585.1M        2 \n__OBJC_RW                         2354K        1 \n__TEXT                           473.0M      490 \n__TPRO_CONST                       272K        2 \npage table in kernel               273K        1 \nshared memory                       32K        1 \n===========                     =======  ======= \nTOTAL                              1.7G     2364 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "logWritingSignature" : "ea1f12966e368148accb4d8a7e5d7f5102e030a6",
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "64628732bf2f5257dedc8988",
      "factorPackIds" : {

      },
      "deploymentId" : 240000001
    },
    {
      "rolloutId" : "64b21a7351cbb02ce3442e4e",
      "factorPackIds" : {
        "REMINDERS_GROCERY" : "6647f0f7b6a75d3dc32993e7"
      },
      "deploymentId" : 240000042
    }
  ],
  "experiments" : [

  ]
}
}

Model: Mac15,13, BootROM 11881.41.5, proc 8:4:4 processors, 16 GB, SMC 
Graphics: Apple M3, Apple M3, Built-In
Display: Color LCD, spdisplays_2880x1864Retina, Main, MirrorOff, Online
Memory Module: LPDDR5, Hynix
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4388), wl0: Sep 23 2024 18:39:44 version 23.900.1.1.41.51.169 FWID 01-191033a2
IO80211_driverkit-1315.7 "IO80211_driverkit-1315.7" Sep 28 2024 16:04:40
AirPort: 
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB31Bus
USB Device: USB31Bus
Thunderbolt Bus: MacBook Air, Apple Inc.
Thunderbolt Bus: MacBook Air, Apple Inc.

@JulienMaille
Copy link
Owner

Can you try what was suggested here?
JulienMaille/spicetify-dynamic-theme#102 (comment)

@dallenbaldwin
Copy link

I suspect a new version of Spotify broke the auto light/mode in Windows. Have you tested whether the binary patcher script will work on this new version?

Spotify for Windows (64 bit): 1.2.55.235.g5eaa0904
Spicetify v2.38.7

@JulienMaille
Copy link
Owner

I suspect a new version of Spotify broke the auto light/mode in Windows. Have you tested whether the binary patcher script will work on this new version?

Spotify for Windows (64 bit): 1.2.55.235.g5eaa0904 Spicetify v2.38.7

Yes it works on windows

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

No branches or pull requests

4 participants