stonesam92/ChitChat

v1.4 not working on OSX 10.11

Closed this issue · 21 comments

Version 1.4 is not working on OSX 10.11 (can't connect to whatsapp web). Reverted back to 1.3 and it's working again. Can I do more to help debugging?

I’m using 1.4 with no problems.

On Oct 1, 2015, at 11:16 AM, Gerben van Dijk notifications@github.com wrote:

Version 1.4 is not working on OSX 10.11 (can't connect to whatsapp web). Reverted back to 1.3 and it's working again. Can I do more to help debugging?


Reply to this email directly or view it on GitHub #81.

Is the app window left blank, or is the web app loaded successfully but failed to connect to the server?

It is completely green, with the notice that it can't connect to whatsapp web and telling you to refresh - but that does not work. I can send you a screenshot of it later today 👍

Hmm. That green screen would mean the app can't even load web.whatsapp.com. This sounds intriguing, since the only change that might have caused this would be App Transport Security enforcement in 10.11 SDK, given that you can connect with v1.3. But frankly, I cannot reproduce it in the release build of El Capitan. Could you try to run the following diagnostics in Terminal, to see if your app can establish a connection to WhatsApp Web with ATS enforced? Don't worry though - this is just a tool from Apple to test ATS compliance of connections to a host.

/usr/bin/nscurl --ats-diagnostics https://web.whatsapp.com/
/usr/bin/nscurl --ats-diagnostics wss://w1.web.whatsapp.com/
/usr/bin/nscurl --ats-diagnostics https://dyn.web.whatsapp.com/

You do not need to post the results. A list of failed items, if any, would be good enough.

Everything is a pass on those tests @andersio

Hmm. Then I can't think of any other possible cause. Perhaps may you check if your OSX in-built firewall has blocked the latest build of ChitChat somehow?

Hey,
I've the same problem and have just a few details more while using the console (or what it's called in english). Firewall is disabled, by the way.

See the screen below.

Thanks for the great work, would be nice to use the software soon on El Capitan.

Best,

Martin
bildschirmfoto 2015-10-04 um 11 16 35

Have you tried to run the diagnostic above? It seems ATS somehow blocked web.whatsapp.com on your machine.

Anyway, it seems the easiest solution would be disabling ATS in ChitChat after all, hmm, since ATS seems having inconsistent results. I will make a pull request ASAP.

Yes, I did - I'm not sure if I saw everything because it was very fast, but all I saw was "PASS" for every test.

I don't know what this is, but thanks for your great and fast reply!

I have just pushed a commit. May you please try to replace the Info.plist in your ChitChat.app package with this updated version, and see if the issue is resolved? It should completely disable ATS on *.whatsapp.com. If it succeeds, please also check if your media (not just the thumbnails) loads without problem.

https://github.com/andersio/ChitChat/blob/03fe670ca321814b8fa1d7766265777fbf70799c/WhatsMac/Info.plist

*edited: Just found I typed the dictionary key wrong 15 minutes after pushing. Sorry about that, and it has been fixed (andersio@03fe670).

Thanks! I tried the info.plist with the Version 1.4 (1.4.0) without any change, sorry. Error in Konsole is still the same, I think. Screen of ChitChat looks like the attachment. Only change is, I think, that I got the update window for the new version (which I already installed, I think).

bildschirmfoto 2015-10-04 um 12 56 59

Sorry, but do you mean the Info.plist I linked? The one in the master branch of ChitChat's main repo isn't updated yet. Either, you may update the content of Info.plist on your own by replacing the NSAppTransportSecurity section with:

    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSExceptionDomains</key>
        <dict>
            <key>whatsapp.com</key>
            <dict>
                <key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
                <true/>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
                <key>NSIncludesSubdomains</key>
                <true/>
            </dict>
            <key>whatsapp.net</key>
            <dict>
                <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
                <false/>
                <key>NSExceptionRequiresForwardSecrecy</key>
                <false/>
                <key>NSIncludesSubdomains</key>
                <true/>
            </dict>
        </dict>
    </dict>

If the above one still fails, please try once more with:

    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>

If this still fails, perhaps we should ask @stonesam92 to build it with 10.10 SDK instead.

Yes, I did the changes of the edited and updated plist. Currently, my plist looks like:

<?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>BuildMachineOSBuild</key>
    <string>14E46</string>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleExecutable</key>
    <string>ChitChat</string>
    <key>CFBundleIconFile</key>
    <string>AppIcon</string>
    <key>CFBundleIdentifier</key>
    <string>com.samstone.ChitChat</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>ChitChat</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.4.1</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleSupportedPlatforms</key>
    <array>
        <string>MacOSX</string>
    </array>
    <key>CFBundleVersion</key>
    <string>1.4.1</string>
    <key>DTCompiler</key>
    <string>com.apple.compilers.llvm.clang.1_0</string>
    <key>DTPlatformBuild</key>
    <string>7A1001</string>
    <key>DTPlatformVersion</key>
    <string>GM</string>
    <key>DTSDKBuild</key>
    <string>15A278</string>
    <key>DTSDKName</key>
    <string>macosx10.11</string>
    <key>DTXcode</key>
    <string>0701</string>
    <key>DTXcodeBuild</key>
    <string>7A1001</string>
    <key>LSMinimumSystemVersion</key>
    <string>10.10</string>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSExceptionDomains</key>
        <dict>
            <key>whatsapp.com</key>
            <dict>
                <key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
                <true/>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
                <key>NSIncludesSubdomains</key>
                <true/>
            </dict>
            <key>whatsapp.net</key>
            <dict>
                <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
                <false/>
                <key>NSExceptionRequiresForwardSecrecy</key>
                <false/>
                <key>NSIncludesSubdomains</key>
                <true/>
            </dict>
        </dict>
    </dict>
    <key>NSHumanReadableCopyright</key>
    <string>Mac wrapper by Sam Stone and others, available under the MIT license. Contains Code from Messenger for Mac. WhatsApp Web by WhatsApp.</string>
    <key>NSMainNibFile</key>
    <string>MainMenu</string>
    <key>NSPrincipalClass</key>
    <string>WAMApplication</string>
    <key>SUFeedURL</key>
    <string>https://raw.githubusercontent.com/stonesam92/ChitChat/master/update_appcast.xml</string>
    <key>SUPublicDSAKeyFile</key>
    <string>dsa_pub.pem</string>
</dict>
</plist>

I see. May you please also try very last 5-line ATS setting I listed? This would disable ATS completely for all domains. Really appreciate your help.

    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>

Don't know which plist - 03fe670? The code block you commented is in the plist above. Sure, it helps us both ;) - SORRY, didn't see the lines...

Just Info.plist but have the entire section replaced with the 5-liner.

P.S. Just in case - you would need to quit and relaunch the application for the changes to take effect.

Thanks, I changed the lines from above the the 5 you posted and the applications works now.

Thanks for the help! Please le me know, if there's a way getting the SSL back :)

Glad to know, though I am not exactly sure about why this happened. Anyway, I will make a pull request to disable App Transport Security completely. Thanks for your help.

The encryption SSL connection is still there, by the way. It is just somehow not compliant with Apple's new App Transport Security enforcements, which blocked the connections and caused the errors you might have observed in the console.

App Transport Security is now disabled in 1.5, so the bug should be fixed now.

Great, it's working again! Thanks! 👍