-
Notifications
You must be signed in to change notification settings - Fork 785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
startHTTPListener
crashes on a macOS app written in Swift
#107
Comments
I've tried adding the library to a brand new project (also macOS in Swift) and the http listener starts (and therefore the app doesn't crash after). I also made a test accessing the library from Objective-C code (which I know it's not necessary) in my app, and obviously it doesn't crash, but the http listener doesn't start either, and I get the same output in the console: I guess there is something in my project (which isn't new) that's messing around with this, but I can't understand what. I can't find any useful info about this "bind failure" problem. Does someone have any clue about what could be happening? Thanks. |
Does the Objective-C macOS sample work for you with the HTTP redirect option? |
I have to check that, but probably it does, because it did in a brand new project I created to test the library. |
Can you provide a sample to reproduce this bug? |
Unfortunately I can't, the project where the problem happens belongs to a client. I've tried to reproduce the issue in a brand new project in Swift but it didn't happen. I've carefully checked the project where I experienced it, looking for places where something could affect the proper functioning of AppAuth but it's pretty straightforward code, nothing special, mostly UI stuff, and I've followed the guides closely, and checked the examples. I've even written that part in Objective C, as I commented above, in case Swift itself was the problem, but I had the same error. |
Would it be possible for you to provide the crash dump along with your project's build settings? |
@danielmartinprieto If your app is sandboxed, you need to set a server entitlement for your app |
@apparentsoft thanks! I just wanted to confirm that this fixed my issue. |
Hi. I'm having problems using AppAuth in a Swift macOS app.
I'm using Carthage as dependency manager and the integration seems to work as expected.
When I try to start the HTTP listener, I observe two different (related) issues. When I run this code:
I get this logged in the console:
CFSocketSetAddress bind failure: 1
, and then a crash in the last line of the snippet above.I don't know why the server cannot be started in the first place, it seems to fail here, but I don't know why, and I think the crash after is due to the fact that the function
startHTTPListener
ofOIDRedirectHTTPHandler
is imported to Swift like this:and it should return
URL?
instead, right?Thanks for your help.
The text was updated successfully, but these errors were encountered: