vanshg / MacAssistant

Google Assistant for macOS!
MIT License
1.61k stars 132 forks source link

Compatibility with sample rates besides 44.1K #53

Closed mrdev023 closed 5 years ago

mrdev023 commented 6 years ago

On my mac with mac os x 10.14. MacAssistant crash at startup.

fatal error: unexpectedly found nil while unwrapping an Optional value
Current stack trace:
0    libswiftCore.dylib                 0x000000010a950130 swift_reportError + 129
1    libswiftCore.dylib                 0x000000010a96cb50 _swift_stdlib_reportFatalError + 60
2    libswiftCore.dylib                 0x000000010a75d250 specialized specialized StaticString.withUTF8Buffer<A> ((UnsafeBufferPointer<UInt8>) -> A) -> A + 342
3    libswiftCore.dylib                 0x000000010a8d7e90 partial apply for (_fatalErrorMessage(StaticString, StaticString, file : StaticString, line : UInt, flags : UInt32) -> Never).(closure #2) + 109
4    libswiftCore.dylib                 0x000000010a75d250 specialized specialized StaticString.withUTF8Buffer<A> ((UnsafeBufferPointer<UInt8>) -> A) -> A + 342
5    libswiftCore.dylib                 0x000000010a88a9a0 specialized _fatalErrorMessage(StaticString, StaticString, file : StaticString, line : UInt, flags : UInt32) -> Never + 96
6    MacAssistant                       0x00000001094d53f0 Authenticator.(refresh(onRefresh : (Bool) -> ()) -> ()).(closure #1) + 1303
7    Alamofire                          0x000000010a56a7d0 specialized DataRequest.(response<A where ...> (queue : DispatchQueue?, responseSerializer : A, completionHandler : (DataResponse<A.SerializedObject>) -> ()) -> Self).(closure #1).(closure #1) + 282
8    libdispatch.dylib                  0x00007fff687af88b _dispatch_call_block_and_release + 12
9    libdispatch.dylib                  0x00007fff687b0959 _dispatch_client_callout + 8
10   libdispatch.dylib                  0x00007fff687bb816 _dispatch_main_queue_callback_4CF + 1125
11   CoreFoundation                     0x00007fff3b7f6f23 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
12   CoreFoundation                     0x00007fff3b7c1b99 __CFRunLoopRun + 2335
13   CoreFoundation                     0x00007fff3b7c17b2 CFRunLoopRunSpecific + 463
14   HIToolbox                          0x00007fff3aa58704 RunCurrentEventLoopInMode + 293
15   HIToolbox                          0x00007fff3aa582ec ReceiveNextEventCommon + 618
16   HIToolbox                          0x00007fff3aa58293 _BlockUntilNextEventMatchingListInModeWithFilter + 64
17   AppKit                             0x00007fff38d1325e _DPSNextEvent + 997
18   AppKit                             0x00007fff39460b50 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1362
19   AppKit                             0x00007fff38d08c0f -[NSApplication run] + 699
20   AppKit                             0x00007fff38cd8bb5 NSApplicationMain + 782
21   MacAssistant                       0x00000001094a72d0 main + 13
22   libdyld.dylib                      0x00007fff687e8ed4 start + 1
[1]    5596 illegal hardware instruction  ./MacAssistant

Crash Log

vanshg commented 6 years ago

I will update to Mojave soon and test out. I'm also rewriting MacAssistant so I will make sure to fix. I think maybe if you do a checkout from a couple commits back you might be able to get it to work (no guarantees)? I know that in its current from MacAssistant has gotten fairly buggy due to me being new to Swift/Cocoa development. Thank you for the detailed crash log

JHoogendijk commented 6 years ago

The app is working fine on Mojave beta 6 here. It crashed before I replaced the google_oath.json file though.

vanshg commented 6 years ago

@mrdev023 Please try the most recent version (Build from source). It's the beginning of a revamp, with some basic functionality. But it is working on my Mojave machine.

mrdev023 commented 6 years ago

I can't test you version because i'm reinstalled Mac os High Sierra for my work. Sorry :/

dun198 commented 5 years ago

@vanshg Built successfully on Mojave, but all I get is a white window with the title "Login to MacAssistant". Seems like a problem with OAuth.

vanshg commented 5 years ago

Hm. Is this a fresh install? Do you think you can send me logs from XCode?

dun198 commented 5 years ago

No, I run Mojave since the first Beta. Here's the log:

2018-09-21 18:55:11.873356+0200 MacAssistant[27968:919630] [default] Unable to load Info.plist exceptions (eGPUOverrides)
2018-09-21 18:55:12.249998+0200 MacAssistant[27968:919553] [User Defaults] Couldn't read values in CFPrefsPlistSource<0x600002914d90> (Domain: com.apple.Accessibility, User: kCFPreferencesCurrentUser, ByHost: No, Container: kCFPreferencesNoContainer, Contents Need Refresh: Yes): accessing preferences outside an application's container requires user-preference-read or file-read-data sandbox access

Since the log is cluttered with "...is implemented in both..." maybe there's other relevant stuff as well.

Edit: Oh, by turning off App Sandbox it worked fine.

mrdev023 commented 5 years ago

Build Error.

Module compiled with Swift 4.1 cannot be imported by the Swift 4.2 compiler: /Users/florian/MacAssistant/Pods/AudioKit/macOS/AudioKit.framework/Modules/AudioKit.swiftmodule/x86_64.swiftmodule

Edit: I'm trying to update AudioKit to AudioKit 4.5

EDIT: It works. I can fork and add pull requests with correct update if you want @vanshg .

EDIT: I'm add pull request

mesqueeb commented 5 years ago

Is it already supported on Mojave? I just found out about this app and would love to use it!!!

praging commented 5 years ago

Successful build on 10.14 (18A391) after merging branch #57. I should also note two things: google_oauth.json needs to be placed in MacAssistant/MacAssistant/Config rather than the directory specified in the ReadMe and the code needs to be signed by a development team (can be done with a personal account) in order for the build to succeed (otherwise "Command PhaseScriptExecution failed with a nonzero exit code").

vanshg commented 5 years ago

If you guys are having crashes, try going into the Audio MIDI Setup app and changing the frequency from 48K to 44.1K Hz and let me know if it works

vanshg commented 5 years ago

Changing the title to more closely reflect the action that needs to be taken here

vanshg commented 5 years ago

With regards to the initial title, I've been testing and building on Mojave, and it is working (with the caveat mentioned above)

vanshg commented 5 years ago

For reference: https://github.com/AudioKit/AudioKit/issues/1556. I will look into trying to address this by manually setting the sample rate via AKSettings

vanshg commented 5 years ago

Fixed with https://github.com/vanshg/MacAssistant/commit/9411eb3666dd14bbe310792ffbe07a13c41c4a53

vanshg commented 5 years ago

Verified working with https://github.com/vanshg/MacAssistant/issues/14#issuecomment-434540939