matryer / xbar

Put the output from any script or program into your macOS Menu Bar (the BitBar reboot)
https://xbarapp.com
MIT License
17.45k stars 641 forks source link

Crash on load (Sonoma) #899

Closed 3aa49ec6bfc910647fa1c5a013e48eef closed 11 months ago

3aa49ec6bfc910647fa1c5a013e48eef commented 11 months ago

Hello,

I'm not sure if this is related to Sonoma or is another issue, I wasn't able to diagnose from logs.

App crashes immediately on load (v2.1.7-beta).

I tried to build myself to diagnose, however I wasn’t able to build successfully either.

Thanks

Console log:

default 19:05:00.784991+0800    xbar    [0x6000007b0000] activating connection: mach=true listener=false peer=false name=com.apple.cfprefsd.daemon
default 19:05:00.785100+0800    xbar    [0x6000007b4000] activating connection: mach=true listener=false peer=false name=com.apple.cfprefsd.agent
default 19:05:00.787617+0800    xbar    [0x6000007ac000] activating connection: mach=true listener=false peer=false name=com.apple.distributed_notifications@Uv3
default 19:05:00.789768+0800    xbar    [0x6000007b40f0] activating connection: mach=true listener=false peer=false name=com.apple.tccd.system
default 19:05:00.800353+0800    xbar    [0x6000007b40f0] invalidated after the last release of the connection object
default 19:05:00.800537+0800    xbar    server port 0x00003207, session port 0x00003207
default 19:05:00.813921+0800    xbar    [0x6000007b8000] activating connection: mach=true listener=false peer=false name=com.apple.coreservices.launchservicesd
default 19:05:00.814518+0800    xbar    [0x600000784000] activating connection: mach=true listener=false peer=false name=com.apple.analyticsd
default 19:05:00.815799+0800    xbar    New connection 0x87233 main
default 19:05:00.818479+0800    xbar    CHECKIN: pid=5371
default 19:05:00.821136+0800    xbar    Received configuration update from daemon (initial)
default 19:05:00.824148+0800    xbar    CHECKEDIN: pid=5371 asn=0x0-0xeb0eb foreground=1
default 19:05:00.824503+0800    xbar    [0x14f304f40] activating connection: mach=true listener=false peer=false name=com.apple.lsd.modifydb
default 19:05:00.824815+0800    xbar    [0x14f504380] activating connection: mach=false listener=true peer=false name=(anonymous)
default 19:05:00.825077+0800    xbar    [0x13de047f0] activating connection: mach=false listener=false peer=true name=com.apple.xpc.anonymous.0x14f504380.peer.0x13de047f0
default 19:05:00.826802+0800    xbar    FRONTLOGGING: version 1
default 19:05:00.826891+0800    xbar    Registered, pid=5371 ASN=0x0,0xeb0eb
default 19:05:00.827353+0800    xbar    [0x14f5045b0] activating connection: mach=true listener=false peer=false name=com.apple.lsd.mapdb
default 19:05:00.828315+0800    xbar    BringForward: pid=5371 asn=0x0-0xeb0eb bringForward=0 foreground=1 uiElement=0 launchedByLS=0 modifiersCount=0 allDisabled=0
default 19:05:00.828804+0800    xbar    Current system appearance, (HLTB: 1), (SLS: 0)
default 19:05:00.829715+0800    xbar    No persisted cache on this platform.
default 19:05:00.830648+0800    xbar    Current system appearance, (HLTB: 1), (SLS: 0)
default 19:05:00.831069+0800    xbar    Post-registration system appearance: (HLTB: 1)
default 19:05:00.851816+0800    xbar    [0x600000480500] activating connection: mach=true listener=false peer=false name=com.apple.fonts
default 19:05:00.853724+0800    xbar    NSApp cache appearance:
-NSRequiresAquaSystemAppearance: 0
-appearance: (null)
-effectiveAppearance: <NSCompositeAppearance: 0x6000016bc980
 (
    "<NSAquaAppearance: 0x6000016bca00>",
    "<NSSystemAppearance: 0x6000016b8200>"
)>
default 19:05:00.862495+0800    xbar    [0x13de12b60] activating connection: mach=true listener=false peer=false name=com.apple.windowmanager.server
error   19:05:00.866826+0800    xbar    assertion failure: "place == NSWindowBelow || place == NSWindowAbove" -> 0
default 19:05:00.867486+0800    xbar    [0x6000007841e0] activating connection: mach=true listener=false peer=false name=com.apple.dock.fullscreen
default 19:05:00.869518+0800    xbar    Entering exit handler.
default 19:05:00.869534+0800    xbar    Queueing exit procedure onto XPC queue. Any further messages sent will be discarded. activeSendTransactions=0
default 19:05:00.869570+0800    xbar    Cancelling XPC connection. Any further reply handler invocations will not retry messages
default 19:05:00.869579+0800    xbar    [0x600000784000] invalidated on xpc_connection_cancel()
default 19:05:00.869596+0800    xbar    Exiting exit handler.
default 19:05:00.869605+0800    xbar    XPC connection invalidated (daemon unloaded/disabled)
error   19:05:00.869615+0800    xbar    No error handler for XPC error: <private>

Output from system_profiler SPSoftwareDataType:

Software:

    System Software Overview:

      System Version: macOS 14.0 (23A5312d)
      Kernel Version: Darwin 23.0.0
      Boot Volume: Sonoma
      Boot Mode: Normal
      Computer Name: My MacBook Pro
      User Name: Me (me)
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled
      Time since boot: 31 minutes, 3 seconds

Edit:

Output from wails dev (I realise this is running with a later version of the cli than stated in README.md however I could not get the earlier cli version to run once installed):

Wails CLI v2.5.1

Updating go.mod to use Wails 'v2.5.1'
Executing: go mod tidy
go: finding module for package github.com/rogpeppe/go-internal/fmtsort
go: finding module for package github.com/wailsapp/wails/v2/pkg/options/dialog
go: github.com/matryer/xbar/app imports
    github.com/wailsapp/wails/v2/pkg/options/dialog: cannot find module providing package github.com/wailsapp/wails/v2/pkg/options/dialog: module lookup disabled by GOPROXY=off
go: github.com/matryer/xbar/app imports
    github.com/matryer/xbar/pkg/update imports
    github.com/mholt/archiver imports
    github.com/pierrec/lz4 imports
    github.com/pierrec/lz4/internal/xxh32 tested by
    github.com/pierrec/lz4/internal/xxh32.test imports
    github.com/frankban/quicktest imports
    github.com/kr/pretty imports
    github.com/rogpeppe/go-internal/fmtsort: cannot find module providing package github.com/rogpeppe/go-internal/fmtsort: module lookup disabled by GOPROXY=off

exit status 1

  ERROR   exit status 1

Output from ./build.sh (prior to running wails dev):

Wails CLI v2.5.1

# Build Options

Platform(s)        | darwin/arm64                            
Compiler           | /usr/local/go/bin/go                    
Skip Bindings      | false                                   
Build Mode         | production                              
Frontend Directory | /Users/blake/Developer/xbar/app/frontend
Obfuscated         | false                                   
Skip Frontend      | false                                   
Compress           | false                                   
Package            | true                                    
Clean Bin Dir      | false                                   
LDFlags            |                                         
Tags               | []                                      
Race Detector      | false                                   
Output File        | xbar                                    
Warning: go.mod is using Wails '2.0.0-alpha.72' but the CLI is 'v2.5.1'. Consider updating your project's `go.mod` file.

# Building target: darwin/arm64

  • Generating bindings: 
  ERROR   
          xbar 
          2023/08/13 03:09:33 open at login: app needs to be running as package.app file to start at login
          FATAL: This application was built using "go build". This is unsupported. Please compile using "wails build".

          exit status 1

  ERROR   
          xbar 
          2023/08/13 03:09:33 open at login: app needs to be running as package.app file to start at login
          FATAL: This application was built using "go build". This is unsupported. Please compile using "wails build".

          exit status 1

Output from ./build.sh (after running wails dev):

Wails CLI v2.5.1

# Build Options

Platform(s)        | darwin/arm64                            
Compiler           | /usr/local/go/bin/go                    
Skip Bindings      | false                                   
Build Mode         | production                              
Frontend Directory | /Users/blake/Developer/xbar/app/frontend
Obfuscated         | false                                   
Skip Frontend      | false                                   
Compress           | false                                   
Package            | true                                    
Clean Bin Dir      | false                                   
LDFlags            |                                         
Tags               | []                                      
Race Detector      | false                                   
Output File        | xbar                                    

# Building target: darwin/arm64

  • Generating bindings: 
  ERROR   
          go: finding module for package github.com/rogpeppe/go-internal/fmtsort
          go: finding module for package github.com/wailsapp/wails/v2/pkg/options/dialog
          go: github.com/matryer/xbar/app imports
            github.com/wailsapp/wails/v2/pkg/options/dialog: cannot find module providing package github.com/wailsapp/wails/v2/pkg/options/dialog: module lookup disabled by GOPROXY=off
          go: github.com/matryer/xbar/app imports
            github.com/matryer/xbar/pkg/update imports
            github.com/mholt/archiver imports
            github.com/pierrec/lz4 imports
            github.com/pierrec/lz4/internal/xxh32 tested by
            github.com/pierrec/lz4/internal/xxh32.test imports
            github.com/frankban/quicktest imports
            github.com/kr/pretty imports
            github.com/rogpeppe/go-internal/fmtsort: cannot find module providing package github.com/rogpeppe/go-internal/fmtsort: module lookup disabled by GOPROXY=off

          exit status 1

  ERROR   
          go: finding module for package github.com/rogpeppe/go-internal/fmtsort
          go: finding module for package github.com/wailsapp/wails/v2/pkg/options/dialog
          go: github.com/matryer/xbar/app imports
            github.com/wailsapp/wails/v2/pkg/options/dialog: cannot find module providing package github.com/wailsapp/wails/v2/pkg/options/dialog: module lookup disabled by GOPROXY=off
          go: github.com/matryer/xbar/app imports
            github.com/matryer/xbar/pkg/update imports
            github.com/mholt/archiver imports
            github.com/pierrec/lz4 imports
            github.com/pierrec/lz4/internal/xxh32 tested by
            github.com/pierrec/lz4/internal/xxh32.test imports
            github.com/frankban/quicktest imports
            github.com/kr/pretty imports
            github.com/rogpeppe/go-internal/fmtsort: cannot find module providing package github.com/rogpeppe/go-internal/fmtsort: module lookup disabled by GOPROXY=off

          exit status 1

Output from wails doctor:

Wails CLI v2.5.1

 SUCCESS  Done.                                                                                                                                                                                                                                           

# System

OS           | MacOS   
Version      | 14.0    
ID           | 23A5312d
Go Version   | go1.20.7
Platform     | darwin  
Architecture | arm64   

# Wails

Version | v2.5.1

# Dependencies

Dependency                | Package Name | Status    | Version
Xcode command line tools  | N/A          | Installed | 2399   
Nodejs                    | N/A          | Installed | 20.5.1 
npm                       | N/A          | Installed | 9.8.0  
*Xcode                    | N/A          | Available |        
*upx                      | N/A          | Available |        
*nsis                     | N/A          | Available |        
* - Optional Dependency

# Diagnosis

Your system is ready for Wails development!
Optional package(s) installation details: 
  - Xcode: Available at https://apps.apple.com/us/app/xcode/id497799835
  - upx : Available at https://upx.github.io/
  - nsis : More info at https://wails.io/docs/guides/windows-installer/
leaanthony commented 11 months ago

Thanks for the report. xBar uses a certain branch of Wails so the above would not work as expected. I don't have Sonoma installed (yet) but I'll try see what's happening when I do. I believe the release date is in about 2.5 months.

3aa49ec6bfc910647fa1c5a013e48eef commented 11 months ago

Thanks. I wasn’t able to get the earlier version of wails working either, I presume it needs a specific version of Go as well.

guentherwieser commented 11 months ago

Can confirm that it fails on Sonoma Public Beta 3 (Version 14.0 Beta (23A5312d)), but it worked fine until this version with Sonoma.

Sonoma will most likely be released in late October.

3aa49ec6bfc910647fa1c5a013e48eef commented 11 months ago

Oh, that’s good to know. I had not tried on earlier versions of Sonoma. I’ll report back if it starts to work again on the next beta.

leaanthony commented 11 months ago

I can reproduce this locally in a VM. Running it through lldb shows assertion failure: "place == NSWindowBelow || place == NSWindowAbove" -> 0 however there is absolutely nothing in a Google search that would indicate why that is true for Sonoma.NSWindowBelow (https://developer.apple.com/documentation/appkit/nswindoworderingmode/nswindowbelow/) has not changed either :/ Can't see anything relevant in https://developer.apple.com/documentation/Xcode-Release-Notes/xcode-15-release-notes...

leaanthony commented 11 months ago

Out of interest are you an an m1 or m2 or x64?

3aa49ec6bfc910647fa1c5a013e48eef commented 11 months ago

I’m using M1.

guentherwieser commented 11 months ago

Maybe this is a temporary bug, the next public release should be out this week, the latest next week. Will update.

leaanthony commented 11 months ago

Yeah, that's my feeling too. It would be really weird to have an API change so late in the beta releases, plus the error message makes no sense (it looks like it's checking if the NSEffectLayer is being added to the window above or below and failing, despite it actually being set to below)

bbazsy commented 11 months ago

confirmed working again with beta 6 ^^

3aa49ec6bfc910647fa1c5a013e48eef commented 11 months ago

Confirmed working, closing issue.