NetworkInfo error won't let me use app on physical device

I'm having an issue on my Xcode project after upgrading to version 10.3. For some reason I'm getting a bunch of NetworkInfo Signal strength query returned error: ErrorDomain=NSPOSIXErrorDomain Code=13 "Permission denied". I have tried everything imaginable and have searched through every post everywhere, yet nothing has resolved my problem. I've also gone back a previous version on Github saved that was working perfectly and never had this error message, but I even get it on the previous version as well. I can't even run the project on my device and go past the launch screen; however, it runs perfectly on the Xcode Simulator and I don't get the error message that way, but I need to run it on a device.


I would really appreciate if someone could help me figure this problem out so I can continue building as it's already cost me two weeks of time, and I haven't gotten a responce from Stackoverflow.


For more information please look at my Stackoverflow post: NetworkInfo Signal strength query returned error: Error Domain=NSPOSIXErrorDomain Code=13 “Permission denied”

Replies

For some reason I'm getting a bunch of

NetworkInfo Signal strength query returned error: ErrorDomain=NSPOSIXErrorDomain Code=13 "Permission denied"
.

Are these log entries actually correlated with a failure in your app? If so, what are the symptoms of that failure (other than this log entries)?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I don't imagine or see where it would be a failure in the app since I went back to previous versions where the app was working without any trouble; as well as it runs perfectly on the Xcode Simulator. Once I launch the app, it won'go past the launch screen which I don't understand and I get those Network errors. Do you know how I could solve this or troubleshoot it? I've never had this happen before.

Once I launch the app, it won'go past the launch screen

If you stop the app in the debugger, what does the backtrace look like?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Once running the app, this is what I get in the debugger:


2019-08-27 21:27:56.092340-0700 UNLK[396:25455] [DYMTLInitPlatform] platform initialization successful
2019-08-27 21:27:56.368564-0700 UNLK[396:25309] [Accessibility] ****************** Loading GAX Client Bundle ****************
2019-08-27 21:27:58.152684-0700 UNLK[396:25441] 4.13.0 - [Firebase/Analytics][I-ACS023007] Firebase Analytics v.40200000 started
2019-08-27 21:27:58.152976-0700 UNLK[396:25441] 4.13.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2019-08-27 21:27:58.222096-0700 UNLK[396:25470] 4.13.0 - [Firebase/Messaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. If you'd prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO. Follow the instructions at:
https://firebase.google.com/docs/cloud-messaging/ios/client#method_swizzling_in_firebase_messaging
to ensure proper integration.
2019-08-27 21:27:58.677243-0700 UNLK[396:25309] [SINPushRegistry] setDesiredPushTypes: {(
    PKPushTypeVoIP
)}
2019-08-27 21:27:58.677281-0700 UNLK[396:25309] [SINPushRegistry] starting background task for fetching PushKit VoIP push token
2019-08-27 21:27:58.687821-0700 UNLK[396:25309] [SINTimedBackgroundTask] beginning background task with token: 1 (timeout: 300.00)
2019-08-27 21:27:58.691577-0700 UNLK[396:25309] Called init with app ID: e0250385-d4a5-4b53-9aca-be02353108c3
2019-08-27 21:27:58.696620-0700 UNLK[396:25309] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2019-08-27 21:27:58.697292-0700 UNLK[396:25309] [MC] Reading from public effective user settings.
2019-08-27 21:27:58.750406-0700 UNLK[396:25309] [SINPushRegistry] stopping background task after VoIP push token received
2019-08-27 21:27:58.750463-0700 UNLK[396:25309] [SINTimedBackgroundTask] Ending background task
[Instabug] Instabug crash reporting is disabled because debugger is attached to this session. Crashes and NSErrors will not be reported to Instabug. To detach debugger, click the Stop button in Xcode, then run the app manually from the simulator.
2019-08-27 21:27:58.777047-0700 UNLK[396:25467] [NetworkInfo] Signal strength query returned error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied", descriptor: <CTServiceDescriptor 0x283c097c0, domain=1, instance=1>

That’s not quite what I was looking for. Rather, do this:

  1. Run the app from Xcode.

  2. Once it gets stuck, choose Debug > Pause.

  3. Choose View > Debug Area > Activate Console.

  4. At the

    (lldb)
    prompt, enter
    thread backtrace all
    .
  5. Copy the result and post it here.

Note When you post it, use the

<>
icon to format it as a code block.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
(lldb) thread backtrace all
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x0000000231db5c60 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x0000000231db50e8 libsystem_kernel.dylib`mach_msg + 76
    frame #2: 0x00000002321be520 CoreFoundation`__CFRunLoopServiceMachPort + 240
    frame #3: 0x00000002321b91c4 CoreFoundation`__CFRunLoopRun + 1344
    frame #4: 0x00000002321b8964 CoreFoundation`CFRunLoopRunSpecific + 452
    frame #5: 0x00000002343f9d8c GraphicsServices`GSEventRunModal + 108
    frame #6: 0x000000025f659758 UIKitCore`UIApplicationMain + 216
    frame #7: 0x0000000100f9d578 UNLK`main at AppDelegate.swift:24:7
    frame #8: 0x0000000231c74fd8 libdyld.dylib`start + 4
  thread #4
    frame #0: 0x0000000231e3fdc0 libsystem_pthread.dylib`start_wqthread
  thread #5, name = 'gputools.smt_poll.0x28205d900'
    frame #0: 0x0000000231dc13f0 libsystem_kernel.dylib`__semwait_signal + 8
    frame #1: 0x0000000231d37d00 libsystem_c.dylib`nanosleep + 216
    frame #2: 0x0000000231d37bd0 libsystem_c.dylib`usleep + 68
    frame #3: 0x0000000104e45814 GPUToolsCore`smt_poll_thread_entry(void*) + 140
    frame #4: 0x0000000231e37908 libsystem_pthread.dylib`_pthread_body + 132
    frame #5: 0x0000000231e37864 libsystem_pthread.dylib`_pthread_start + 48
    frame #6: 0x0000000231e3fdcc libsystem_pthread.dylib`thread_start + 4
  thread #6, name = 'gputools.smt_poll.0x28204c300'
    frame #0: 0x0000000231dc13f0 libsystem_kernel.dylib`__semwait_signal + 8
    frame #1: 0x0000000231d37d00 libsystem_c.dylib`nanosleep + 216
    frame #2: 0x0000000231d37bd0 libsystem_c.dylib`usleep + 68
    frame #3: 0x0000000104e45814 GPUToolsCore`smt_poll_thread_entry(void*) + 140
    frame #4: 0x0000000231e37908 libsystem_pthread.dylib`_pthread_body + 132
    frame #5: 0x0000000231e37864 libsystem_pthread.dylib`_pthread_start + 48
    frame #6: 0x0000000231e3fdcc libsystem_pthread.dylib`thread_start + 4
  thread #8, name = 'com.apple.uikit.eventfetch-thread'
    frame #0: 0x0000000231db5c60 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x0000000231db50e8 libsystem_kernel.dylib`mach_msg + 76
    frame #2: 0x00000002321be520 CoreFoundation`__CFRunLoopServiceMachPort + 240
    frame #3: 0x00000002321b91c4 CoreFoundation`__CFRunLoopRun + 1344
    frame #4: 0x00000002321b8964 CoreFoundation`CFRunLoopRunSpecific + 452
    frame #5: 0x0000000232b99a1c Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
    frame #6: 0x0000000232b998a4 Foundation`-[NSRunLoop(NSRunLoop) runUntilDate:] + 100
    frame #7: 0x000000025f74536c UIKitCore`-[UIEventFetcher threadMain] + 140
    frame #8: 0x0000000232b9861c Foundation`-[NSThread main] + 72
    frame #9: 0x0000000232ccec54 Foundation`__NSThread__start__ + 988
    frame #10: 0x0000000231e37908 libsystem_pthread.dylib`_pthread_body + 132
    frame #11: 0x0000000231e37864 libsystem_pthread.dylib`_pthread_start + 48
    frame #12: 0x0000000231e3fdcc libsystem_pthread.dylib`thread_start + 4
  thread #10
    frame #0: 0x0000000231e3fdc0 libsystem_pthread.dylib`start_wqthread
  thread #12, name = 'com.apple.CoreMotion.MotionThread'
    frame #0: 0x0000000231db5c60 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x0000000231db50e8 libsystem_kernel.dylib`mach_msg + 76
    frame #2: 0x00000002321be520 CoreFoundation`__CFRunLoopServiceMachPort + 240
    frame #3: 0x00000002321b91c4 CoreFoundation`__CFRunLoopRun + 1344
    frame #4: 0x00000002321b8964 CoreFoundation`CFRunLoopRunSpecific + 452
    frame #5: 0x00000002321b9698 CoreFoundation`CFRunLoopRun + 84
    frame #6: 0x0000000237c609d4 CoreMotion`___lldb_unnamed_symbol2457$$CoreMotion + 1012
    frame #7: 0x0000000231e37908 libsystem_pthread.dylib`_pthread_body + 132
    frame #8: 0x0000000231e37864 libsystem_pthread.dylib`_pthread_start + 48
    frame #9: 0x0000000231e3fdcc libsystem_pthread.dylib`thread_start + 4
  thread #13
    frame #0: 0x0000000231dc1b64 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #1: 0x0000000231e39abc libsystem_pthread.dylib`_pthread_wqthread + 344
    frame #2: 0x0000000231e3fdc4 libsystem_pthread.dylib`start_wqthread + 4
  thread #15
    frame #0: 0x0000000231e3fdc0 libsystem_pthread.dylib`start_wqthread
  thread #17, name = 'com.apple.NSURLConnectionLoader'
    frame #0: 0x0000000231db5c60 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x0000000231db50e8 libsystem_kernel.dylib`mach_msg + 76
    frame #2: 0x00000002321be520 CoreFoundation`__CFRunLoopServiceMachPort + 240
    frame #3: 0x00000002321b91c4 CoreFoundation`__CFRunLoopRun + 1344
    frame #4: 0x00000002321b8964 CoreFoundation`CFRunLoopRunSpecific + 452
    frame #5: 0x00000002327dbc88 CFNetwork`-[__CoreSchedulingSetRunnable runForever] + 208
    frame #6: 0x0000000232b9861c Foundation`-[NSThread main] + 72
    frame #7: 0x0000000232ccec54 Foundation`__NSThread__start__ + 988
    frame #8: 0x0000000231e37908 libsystem_pthread.dylib`_pthread_body + 132
    frame #9: 0x0000000231e37864 libsystem_pthread.dylib`_pthread_start + 48
    frame #10: 0x0000000231e3fdcc libsystem_pthread.dylib`thread_start + 4
(lldb)

Sorry for the mixup. I hope this helps. Thank you for helping me!

That backtrace shows that your app has made it to its main event loop and is receiving events from the system. Alas, that doesn’t help us understand why your app is unresponsive.

OK, new test: If you create a new app from Master-Detail App template, does it work?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I apologzie for the late response. Yes it does work when I created a new project from Master-Detail App and from Single View App (what my app is).

OK. The next step is to diff these two cases, the vanilla app that works and the main app that fails, to see what’s different. Easy! (-:

Seriously though, that is the next step I’d take. Selectively disable code in your main app until it starts launching, then you can focus your investigations on what you last disabled.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Sadly I don't have a version of the app that works. All of the versions that I go back to saved from Github all do the same thing when they were working perfectly before. They still don't work with the code that was added that isn't in this version. Is there a way to see if it's something else before copying the app over with a chance that it'll work?

Sadly I don't have a version of the app that works.

Right, but you do have an app that works, the test app you created on 2 Sep. So there’s nothing fundamentally broken about your Xcode and device setup, there’s just a problem in one specific app.

My suggestion is that you temporarily remove functionality from your main app until it starts launching. The last bit of code that you remove will be a hint as to why it’s failing to launch.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I have already done all of that and downloaded previous versions of the app from Github that were working previously and don't include the new functionality. However, I still get the same result and just tried it again after having done this for over a month now. Do you have any other recomondations what the problem could be why I get that message only when I run the app on a device? I don't understand what this network error permission denied is for and what it means. Is it possible to create a new project and transfer everything over?

Overall, I think the network error you’re seeing is a red herring. Even if this is a real network error, a network error should not prevent your app from launching.

I have already done all of that and downloaded previous versions of the app from Github that were working previously and don't include the new functionality.

I think you missed my point here. I’m not suggesting that you remove the most-recently added functionality, I’m suggesting that you (temporarily) rip stuff out of the startup sequence of your app until it starts responding on launch. Once you get something working, that gives you a focus for the next step of your investigation.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

After commenting out the code for notifications, it gets rid of the NetworkInfo error message; however, I found something odd whilst setting breakpoints. In my Launch Screen, after playing the animation, the breakpoint for the function to end the animation is reached, but after seeing if there's a user set on Firebase or not, the breakpoint after that to go to the app isn't hit and that's when the app is just set on pause and not doing anything which is what's been happening before. The project still runs perfectly when being run on the Xcode Simulator.


Here is what it looks like when my breakpoints are hit. This is as far as it will go and after it won't hit any of the others and just dissapera, unlike what it does on the simulator and what it's done in the past. https://www.dropbox.com/s/hmutulez10fzx2e/Screen%20Shot%202019-09-06%20at%2010.26.13%20PM.png?dl=0