m0ppers / syncthing-bar

A statusbar for syncthing on Mac OS X
Other
134 stars 16 forks source link

'Open UI' and 'Stop Syncthing' menu items grayed out #21

Closed crahan closed 9 years ago

crahan commented 9 years ago

Hi, in the latest update (0.0.8) the 'Open UI' and 'Stop Syncthing' menu items are grayed out for me. Is there anything in particular that needs to be done to get those menu items working? Thanks!

Connecting to http://localhost:8084 brings up the Syncthing web interface, so the application is running in the background as it should.

screen shot 2015-10-24 at 23 15 46

m0ppers commented 9 years ago

Interesting :O This will happen if syncthing doesn't come up or if the port couldn't be determined. Any log output?

crahan commented 9 years ago

This is what the log shows:

OUT: [3KDS4] 10:12:57 INFO: syncthing v0.11.26 “Aluminium Ant” (go1.4.2 darwin-amd64 default) unknown-user@syncthing-builder 2015-10-02 06:08:07 UTC OUT: [3KDS4] 10:12:57 INFO: My ID: OUT: [3KDS4] 10:12:57 INFO: Database block cache capacity 65536 KiB OUT: [3KDS4] 10:12:57 OK: Ready to synchronize default (read-write) OUT: [3KDS4] 10:12:57 INFO: Starting web GUI on http://127.0.0.1:8084/ OUT: [3KDS4] 10:12:57 INFO: Completed initial scan (rw) of folder default OUT: [3KDS4] 10:12:57 INFO: Starting local discovery announcements OUT: [3KDS4] 10:12:57 INFO: Starting global discovery announcements OUT: [3KDS4] 10:12:57 INFO: Device is “geodon” at [dynamic] OUT: [3KDS4] 10:12:57 INFO: API listening on 127.0.0.1:8084

I've removed the device ID from the output. The web UI on http://localhost:8084 works fine too. I can add folders and change configuration settings.

m0ppers commented 9 years ago

Just to verify. If you reinstall 0.0.7 everything works fine?

alyberty commented 9 years ago

Maybe this is caused by AppTransport Security. ( https://developer.apple.com/library/prerelease/ios/technotes/App-Transport-Security-Technote/ ) It restricts an non TLS 1.2 connection. Because the default ssl certificate of syncthing is not signed it is refused.

m0ppers commented 9 years ago

@alyberty Thanks for the hint. That sounds very likely. By upgrading the Swift version I probably targeted El Capitan as well. To get some more info:

@crahan Do you have El Captain? Can you quit syncthing-bar and launch it from the command line? That should get some more infos. I should really stream everything into the log :|

crahan commented 9 years ago

Hi @m0ppers, I am running El Capitan. Looks like @alyberty was right though. This is the output when I launch via the command line:

Syncthing version 0 11 26 2015-10-25 15:22:20.776 syncthing-bar[3666:352597] App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

crahan commented 9 years ago

As a test, I've set NSAllowsArbitraryLoads to 'Yes' in the Info.plist file and now all menubar items show up as expected (including an entry for the folder that's configured).

m0ppers commented 9 years ago

Great! If possible could you try the following in your Info.plist?

I am still on yosemite and can't really test.

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>localhost</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
        </dict>
    </dict>
</dict>

AllowArbitraryLoads is the sledgehammer ;) The thing above should be sufficient.

If that works and if you want (for honor and glory!) you could send a pull request :O Otherwise I will simply change it later ;)

crahan commented 9 years ago

Took a stab at a pull request, but apparently the Github CI build fails. If anything needs to be changed, definitely let me know as this is my first time contributing to an OS X/Swift app ;)

m0ppers commented 9 years ago

Thank you! One last (final, ultimate) question: Does the new release work for you? Then I will announce the new version. The build is failing because of the new xcode version. No worries ;)

https://github.com/m0ppers/syncthing-bar/releases/tag/0.0.9

crahan commented 9 years ago

Hi @m0ppers, I installed 0.0.9 and everything appears to be working as expected. Menubar items are active and start/stop syncthing works. Thanks!

m0ppers commented 9 years ago

:+1: