rogchap / wombat

Cross platform gRPC client
MIT License
1.39k stars 52 forks source link

Not working on mac #17

Closed Azuka closed 3 years ago

Azuka commented 3 years ago

First, thanks for creating this: I found this on Reddit.

For some reason, I've tried multiple versions but haven't been able to get them to work on a Mac. I get the error below regardless of version:

image

I'm running macOs Catalina 10.15.7 (19H2).

rogchap commented 3 years ago

Are you running this from the DMG or the Applications directory?

Also make sure you follow the README instructions for install: Apple tries to block applications that have not paid them money to register; so the first time you launch the app you may need to do a Right/Option Click and then select "Open"

The app was build on 10.15 so no reason that it shouldn't work.

Azuka commented 3 years ago

I'm running from Applications. The icon for the application looks blocked/striked out:

image

I did follow the instructions, but also run sudo xattr -r -d com.apple.quarantine /Applications/Wombat.app which does the same thing. The block would show a different message if the reason was that it was unsigned.

rogchap commented 3 years ago

This is a strange one, with a case of "It works on my machine". 😞

I can see that you tried both 0.1.x and 0.2.x; this makes it even stranger as they have completely different build systems. 0.1.x was built with Qt, and 0.2.x has been completely re-built with different system dependencies; yet on your machine they are showing the same issue.

I'm presuming you have tried to install other software (from Github) with no issues?

One other thing to try is to use your terminal an see if you can run the binary directly and see what errors you get:

 $ /Applications/Wombat.app/Contents/MacOS/wombat

Another option is to wait until the brew cask has been published, then you could try and install via brew #10

Azuka commented 3 years ago

One other thing to try is to use your terminal an see if you can run the binary directly and see what errors you get:

 $ /Applications/Wombat.app/Contents/MacOS/wombat

Running via the terminal does work!

The only terminal output I got is:

ERRO[0001] [API] Key not found
2020-11-12 21:33:05.872 wombat[72838:14751269] *** WARNING: Method convertPointToBase: in class NSView is deprecated on 10.7 and later. It should not be used in new applications.
rogchap commented 3 years ago

That is expected "Error" Output. (I should change that to an Info level log). There must be an issue with your system running a .app, which is nothing more than a special folder structure. There is very little in this folder structure: the app binary (that you successfully ran), the icon file and the info.plist, which contains metadata about the app.

The only thing I could think of is that there is a entry in the plist that may be wrong that is causing the error for that particular version of MacOS. I have notices that the CFBundleVersion key was incorrectly being prefixed with string, but can't see how that would cause this error.

As I'm unable to produce the same error, are you able to do some debugging for me and see if changing any of the info.plist entries within /Applications/Wombat.app/Content helps resolve the issue?

Azuka commented 3 years ago

As I'm unable to produce the same error, are you able to do some debugging for me and see if changing any of the info.plist entries within /Applications/Wombat.app/Content helps resolve the issue?

Yes, I'd love to.

Here's the plist file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleExecutable</key>
    <string>Wombat</string>
    <key>CFBundleGetInfoString</key>
    <string>Created by Roger Chapman (rogchap)</string>
    <key>CFBundleIconFile</key>
    <string>iconfile</string>
    <key>CFBundleIdentifier</key>
    <string>com.rogchap.wombat</string>
    <key>CFBundleName</key>
    <string>Wombat</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>string v0.2.0</string>
    <key>CFBundleVersion</key>
    <string>string v0.2.0</string>
    <key>LSMinimumSystemVersion</key>
    <string>10.11</string>
    <key>NSHighResolutionCapable</key>
    <true/>
    <key>NSPrincipalClass</key>
    <string>NSApplication</string>
    <key>NSSupportsAutomaticGraphicsSwitching</key>
    <true/>
</dict>
</plist>

I tried removing the string before the versions but still see the same issue.

rogchap commented 3 years ago

Can you try a minimum plist (including removing the xml deceleration at the top...this might be the issue):

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleExecutable</key>
    <string>Wombat</string>
    <key>CFBundleIconFile</key>
    <string>iconfile</string>
    <key>CFBundleIdentifier</key>
    <string>com.rogchap.wombat</string>
    <key>CFBundleName</key>
    <string>Wombat</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>string v0.2.0</string>
    <key>CFBundleVersion</key>
    <string>string v0.2.0</string>
</dict>
</plist>
Azuka commented 3 years ago

Ok, I think I found the issue.

My file system is case-sensitive, so the CFBundleExecutable value should be wombat, not Wombat. Probably only fails on my machine because my setup is unusual.