I'm working on sending message through UDP. However, I've been trapped in the problem about 'binding port'.
When I built the project on iOS simulator first time, nothing strange happened. Everything was fine.
But when I built the project second time. I got an error message from terminal when the app tried to bind port.
The message goes like this "Error Domain=NSPOSIXErrorDomain Code=48 "Address already in use" UserInfo=0x767c830 {NSLocalizedFailureReason=Error in bind() function, NSLocalizedDescription=Address already in use}"
What's confuses me is that the error didn't appear when I run my app on iPad.
I guess that maybe it is for the reason that I didn't close the socket. But why it goes correctly on iPad?
Hope someone could solve this. Thx!
Current head of GDAAsyncUdpSocket does not (also) set SO_REUSEPORT (it just does ADDRESS, which is quite enough for TCP).
I just popped in a quick fix:
https://github.com/dirkx/CocoaAsyncSocket/commit/5ec8c83d59ecb754824f706198eb62e29961c1be
https://github.com/dirkx/CocoaAsyncSocket
and it should get fixed upstream too:
https://github.com/robbiehanson/CocoaAsyncSocket/pull/159
Thanks,
Dw.
Related
Following the steps of a tutorial (git/flash_chat_app), I got stuck when I write the code to get the connection with Firebase. The app runs very well (simple app). The problem is on the "Login" & "Register" buttons. After writing the email and password, when I press the button to submit the app crushes and I've got a simple "Lost connection to device" message. However, on Firebase the email is registered. So there is the connection but the app just crushes every time... I've read the posts about this subject but nothing similar to this issue.
I hope you can help, thank you
Ok found it...the whole day.
If anybody else faces this issue, I solved it just downgrading flutter (I had the last version 1.27xxxxx till this day). So on 1.26 I have no issue for the moment.
Worklight 6.2 building a hybrid application targeting iPad - we get the symptoms described below in the xCode Simulator irrespective of exactly which target device we select.
The application currently attempts a call to
WL.Client.login()
from within wlCommoninit()
Our target server is a full WL Server running on a Liberty instance on a remote machine, we use HTTPS and a specified IP Address
https://w.x.y.z:443/worklight
We have adjusted the Deploy Target and rebuilt the app before running XCode.
The WL.Client.login() error callback fires and we see log messages indicating that we are attempting to hit the correct URL. We also see this error message
NSURLErrorDomain error -1012
We do have a complex network setup, with a firewall between the iOS simulator and the server and yet if we run up Safari on the simulated device we can correctly access the URL.
Questions:
Does that NSURLErrorDomain reflect the cause of the failure? Or is it just part of the error processing?
Any suggestions for further diagnosis?
Further investigation indicated that we did have the wrong URL configured. It seems that
NSURLErrorDomain error -1012
is not in itself an indicator of the problem. Rather, the error follows from the failure to reach the specified host. Conclusion: study the logs prior top that NSURLErrorDomain message.
When I try to do anything in Playground, this pops up before I even finish typing a word.
Error running playground.
Failed to launch iOS stub for playground: The operation couldn’t be completed. (Mach error -308 - (ipc/mig) server died).
and when I just try to run IOS Simulator I get the following error
Unable to boot the iOS Simulator.
oh and this error just popped up
An error was encountered while running (Domain = DTiPhoneSimulatorErrorDomain, Code = 2)
I tried rebooting, I closed out and opened again, I deselected file and reselected. Just keeps happening. Anyone have a solution?
Your firewall is blocking the debugger, you need to allow it to connect:
TCP out 127.0.0.1:63748
Or allow the debugserver process open access (whichever you, or your firewall, prefer(s)).
Upon enabling it, and restarting Xcode everything should work like a charm.
Note/Update:
If you're having trouble finding, or allowing, the debugserver simply try, temporarily, disabling your firewall and restart xcode. Does the playground work? Oh, and don't forget to make sure you've got the assistant view open and the output box showing.
Currently the Xcode 6 beta needs to reside in \Applications for the playground and simulator to work. After you move it there you need to reboot.
This error popped up for me when I closed the simulator before Xcode finished attaching my application to it. Opening the simulator and running the app again solved this problem.
When I am opening my sqlite database using sqlite_open function its working fine in foreground mode but when the iOS device is in sleep mode then it returning the error code 23. I searched for that error code on google then I found that it is 'SQLITE_AUTH'. I also got the error message that 'authorization denied'. Can someone explain me about this why it is happening and what is this error stands for.
Thanks in advance
I searched a lot about it but I didn't found anything anything related to it on internet.
After some practical work about my problem I noticed that this error occurs when the device's passcode is turned on and the device is locked then sqlite don't have permissions to use the sqlite database file because of that this error occurs.
When I start my app everything goes well. But if I close it, I mean really close it, and then opens it again it shows me the last open view and the app is totally freezed and xcode shows an SIGABRT error.
I have done so much, it's not that easy to just step backwards and see where it breaks. Any ideas?
Have you added an Exception Breakpoint in XCode? If something's wrong in your execution (possibly as a result of stored state from the previous execution that is now being loaded?), then you'll be able to see exactly where an exception happened before the program received the SIGABRT.
Ehm ok I might have done a noobie misstake...
I disconnected my phone from my computer (with the app totally closed) opened it and closed it again. Now when I open it, everything works. I guess you can't do that when running from xcode... he he...