"security policy error" on iPhone and iPod Touch - iphone

I'm getting an "Error from Debugger: Error launching remote program: security policy error" when I try to run my app on my ipod touch. The provisions look in order, and the app builds to my iphone 3gs just fine. The app used to build just fine to my ipod touch, so I'm flustered what could have changed and wondering if anyone has any thoughts on what might be causing this issue. The build logs are below.
Mon Mar 15 14:25:54 unknown com.apple.debugserver-43[449] <Warning>: Connecting to com.apple.debugserver service...
Mon Mar 15 14:25:55 unknown SpringBoard[24] <Warning>: Unable to launch com.yourcompany.Unearthed because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.
Mon Mar 15 14:25:55 unknown com.apple.debugserver-43[449] <Error>: error: unable to launch the application with CFBundleIdentifier 'com.yourcompany.Unearthed' sbs_error = 9
Mon Mar 15 14:25:55 unknown com.apple.debugserver-43[449] <Warning>: 1 [01c1/0903]: RNBRunLoopLaunchInferior DNBProcessLaunch() returned error: ''
Mon Mar 15 14:25:55 unknown com.apple.debugserver-43[449] <Warning>: error: failed to launch process (null): security policy error
Mon Mar 15 14:26:03 unknown MobileSafari[72] <Warning>: void SendDelegateMessage(NSInvocation*): delegate (webView:decidePolicyForNavigationAction:request:frame:decisionListener:) failed to return after waiting 10 seconds. main run loop mode: UITrackingRunLoopMode

Have you checked that the iPod doesn't contain any expired provisioning profiles? I've had trouble in the past when building to devices that contain expired provisioning profiles.
Try removing any expired profiles and see if it helps.

Delete all old expire provisioning profile..

We "fixed" this by installing the release version (built for ad-hoc distribution) and then debugging from Xcode. It installs and updates the application fine from now. 3GS with 4.3.2.

Related

Running calabash-ios on physical device, and the app start and crash immediately

Running calabash-ios on device and the app start and crash immediately.
Running calabash-ios on simulator works fine.
It is related to the issue: calabash-ios physical device test, app starts but crashes but the solution there is not working for me.
The app developed with Xamarin.
The app already been installed on the device.
I run the commands:
export BUNDLE_ID=com.appName.name
export DEVICE_ENDPOINT=http://192.168.1.14:37265
export DEVICE_TARGET=e2a5c640b9bc6fe30209612eefbf1194…
DEBUG=1 cucumber
And get the below:
INFO: Using uia strategy: 'host'
DEBUG: Searching for run-loop results with glob: /Users/nirortal/.run-loop/results/*
DEBUG: Found 6 previous run-loop results
DEBUG: Will delete 1 previous run-loop results
DEBUG: Deleted 1 previous results in 0.00405 seconds
DEBUG: Searching for instruments caches with glob: /Library/Caches/com.apple.dt.instruments/xrtmp__*
DEBUG: Found 6 instruments caches
DEBUG: Will delete 1 instruments caches
DEBUG: Deleted 1 instruments caches in 0.001272 seconds
2016-04-26 15:11:32 +0300 [RunLoop:debug]:
{
:app => " com.appName.name ",
:args => [],
:bundle_dir_or_bundle_id => " com.appName.name ",
:bundle_id => " com.appName.name ",
:device_target => "e2a5c640b9bc6fe30209612eefbf1194…",
:instruments => #<Instruments 7.3>,
:launch_method => :instruments,
:launch_retries => 5,
:log_file => "/Users/nirortal/.run-loop/results/2016-04-26_15-11-32/run_loop.out",
:no_launch => false,
:no_stop => false,
:relaunch_simulator => true,
:reset => false,
:results_dir => "/Users/nirortal/.run-loop/results/2016-04-26_15-11-32",
:results_dir_trace => "/Users/nirortal/.run-loop/results/2016-04-26_15-11-32/trace",
:script => "/Users/nirortal/.run-loop/results/2016-04-26_15-11-32/_run_loop.js",
:sdk_version => nil,
:udid => "e2a5c640b9bc6fe30209612eefbf1194…",
:uia_strategy => :host,
:xcode => "7.3",
:xcode_path => "/Applications/Xcode.app/Contents/Developer"
} EXEC: xcrun instruments -s templates
### Starting on e2a5c640b9bc6fe30209612eefbf1194bee30933 App: com.gettradio.tradio ###
2016-04-26 15:11:32 +0300 [RunLoop:debug]: xcrun instruments -w e2a5c640b9bc6fe30209612eefbf1194… -D /Users/nirortal/.run-loop/results/2016-04-26_15-11-32/trace -t Automation com.appName.name -e UIARESULTSPATH /Users/nirortal/.run-loop/results/2016-04-26_15-11-32 -e UIASCRIPT /Users/nirortal/.run-loop/results/2016-04-26_15-11-32/_run_loop.js >& /Users/nirortal/.run-loop/results/2016-04-26_15-11-32/run_loop.out
2016-04-26 15:11:32 +0300 [RunLoop:debug]: Preparation took 0.853639 seconds
2016-04-26 15:12:03 +0300 [RunLoop:debug]: Error while writing to fifo. RunLoop::Fifo::NoReaderConfiguredError
2016-04-26 15:12:03 +0300 [RunLoop:debug]: Failed to launch. Error while writing to fifo. RunLoop::Fifo::NoReaderConfiguredError: Error while writing to fifo. RunLoop::Fifo::NoReaderConfiguredError
The device’s log:
Apr 26 15:13:28 iPhone-6-931 SpringBoard[58] <Error>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Apr 26 15:13:28 iPhone-6-931 SpringBoard[58] <Error>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Apr 26 15:13:28 iPhone-6-931 kernel[0] <Notice>: xpcproxy[293] Container: /private/var/mobile/Containers/Data/Application/81B447CB-DEE4-452A-8371-FA6652D6AC18 (sandbox)
Apr 26 15:13:28 iPhone-6-931 DTServiceHub[220] <Warning>: Unable to acquire task port after launch of pid 293 (com.appName.name)
Apr 26 15:13:28 iPhone-6-931 com.apple.xpc.launchd[1] (UIKitApplication:com.gettradio.tradio[0xd8eb][293]) <Notice>: Service exited due to signal: Killed: 9
Apr 26 15:13:29 iPhone-6-931 DTServiceHub[220] <Warning>: Could not create service named com.apple.instruments.server.services.processcontrol.posixspawn
Apr 26 15:13:29 iPhone-6-931 notification_proxy[212] <Error>: 0x16e12f000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error!
Apr 26 15:13:29 iPhone-6-931 notification_proxy[212] <Error>: 0x16e1bb000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error!
Apr 26 15:13:29 iPhone-6-931 SpringBoard[58] <Warning>: Application 'UIKitApplication:com.gettradio.tradio[0xd8eb]' exited abnormally via signal.
I notice that in the log that the ‘Container: /private/var/mobile/Containers/Data/Application/81B447CB-DEE4-452A-8371-FA6652D6AC18 (sandbox)’ has a UDID of simulator.
Cannot find this UDID in my list when I run the command xcrun instruments -s devices
I have:
iPhone 6 – 9.3.1
xcode 7.3
calabash-cucumber (0.18.2, 0.17.0, 0.16.4, 0.14.0, 0.13.0, 0.12.3)
cucumber (1.3.19, 1.3.18, 1.3.17)
ruby 2.0.0p648
OS X - 10.11.4
the xcode recognize and connect to the device without any issue.
UI Automation on the device is enabled.
I ran the command ‘killall -9 instruments’ before running ‘cucumber’ but get the same result.
What I'm missing here?
‘Container: /private/var/mobile/Containers/Data/Application/81B447CB-DEE4-452A-8371-FA6652D6AC18 (sandbox)’ has a UDID of simulator.
That is the application data container on your physical device.
This is a very difficult problem to diagnosis and it usually comes down to one of these problems.
The bundle id is incorrect.
The app is not installed on the physical device.
The .ipa installed on the device is not signed with Developer cert.
The debugging symbols on the device have not been copied over to Xcode.
The device is not eligible for instruments debugging.
The following information was pulled from these documents.
Hot Topic: Errno::EINTR: Interrupted system call AKA RunLoop::Fifo::NoReaderConfiguredError
Testing on Physical Devices
Bundle id is incorrect
# Find your .ipa bundle identifier
$ bundle exec calabash-ios console
> ipa = RunLoop::Ipa.new("path/to/my.ipa")
> ipa.bundle_identifier
App is not installed
# 1. Check with ideviceinstaller
# 2. Use a visual check in Xcode's Device window
.ipa is not signed with a developer cert
$ bundle exec calabash-ios console
> ipa = RunLoop::Ipa.new("path/to/my.ipa")
> ipa.codesign_info.split($-0)
You need to see a Developer certificate here:
"Authority=iPhone Developer: Joshua Moody (Y<snip>9)"
If you built and installed on your physical device from Xcode or Xamarin Studio, be sure that you are building with the Debug configuration and not a Release configuration. Check your project settings to be sure that you are signing the application with a Developer certificate.
Device is Not Ready
The device must appear in Xcode's Devices window without errors. Devices need to be restarted and reconnected to Xcode to clear these errors. After updating an iOS version, you might need restart/reconnect several times. If all else fails, plug the device into an other machine with Xcode installed; this can sometimes cause debugging symbols to be copied over.
The device may be enabled for development, but not be ready for instruments. You can check by targeting your device with a Automation template in the Instruments.app - this is described in the documents linked above.

xcode 5 - debug on device failed using jailcoder

Using xcode 5.1.1, and trying to debug my app on a jailbroken iphone 4 (7.1.2).
I installed Jailcoder (from the facebook page) and patched both my xcode and my project with it.
The project is just a simple view application (trying to get that to work first).
I run the app using my iphone as the build setting, the app loads on my phone but then it exits with
2014-07-28 16:00:42.831 testLiveDebug[11384:60b] otherApps (null)
Opening the console in the organizer i see this error:
Jul 28 15:51:45 my-iPhone com.apple.launchd[1] (UIKitApplication:com.debug.testLiveDebug[0xe02e][11348]) <Error>: (UIKitApplication:com.debug.testLiveDebug[0xe02e]) Exited with code: 45
Jul 28 15:51:45 my-iPhone com.apple.launchd[1] (UIKitApplication:com.debug.testLiveDebug[0xe02e]) <Notice>: (UIKitApplication:com.debug.testLiveDebug[0xe02e]) Throttling respawn: Will start in 2147483641 seconds
Jul 28 15:51:45 my-iPhone com.apple.debugserver-310.2[11346] <Warning>: 38 +6.392165 sec [2c52/1307]: error: ::read ( -1, 0x35a9ec, 18446744069414585344 ) => -1 err = Bad file descriptor (0x00000009)
Jul 28 15:51:45 my-iPhone com.apple.debugserver-310.2[11346] <Warning>: Exiting.
Jul 28 15:51:45 my-iPhone backboardd[11188] <Warning>: Application 'UIKitApplication:com.debug.testLiveDebug[0xe02e]' exited abnormally with exit status 45
I have Appsync for 7.0+ and also tried with AppSync Unified....but still i get the same error.
In the past (ios6) this whole process worked fine with jailcoder.
Any idea why i cant live debug on the device ?
-Thanks
Resupported 4+ was causing the error....after i uninstalled it everything was working fine.

How can I determine what crashed Mobile Safari?

My website crashes on Mobile Safari, but works fine on desktop.
How can I determine why it is crashing?
What you can do when Safari quits unexpectedly showing your website:
1. Safari debug console
Use Safari's debug console. Switch on in your iPhone: Settings->Safari->Advanced->Debug console=on.
For me it says
2 HTML errors on Line 6 (Viewport argument value "device-width" for key "width" not recognized and Viewport argument value "no" for key "user-scalable" not recognized.)
2 HTML tips also n Line 6.
Debug console will be shown next time you check your web page using Safari.
2. Web Inspector (from iOS 6.0)
If it is getting more complicated to find out the problem in your webpage use Web Inspector to Debug Mobile Safari. It is a great tutorial for this.
Using IOS Simulator I found that for this particular website all iOS version I have, 5.0, 5.1 and also 6.1, runs the page correctly with crashing the page but on device (iOS 5.0.1) still crashes.
My device runs on iOS 5, so I cannot access Web Inspector, but it is certainly the next step for you to check your site on device and check Web Inspector on your machine.
3. Use iPhone Configuration Utility's Console
You can downlod Apple's iPhone Configuration Utility, then you can access your mobile's Console during Safari test.
Checking your site I see couple of memory warnings which eventually lead to Safari crash.
4a. Use Xcode's debug facility
Using Xcode you can also access the device's Console (Window->Organizer->Devices tab->Console).
Your case reported the following on console:
Apr 30 10:15:18 unknown kernel[0] <Debug>: launchd[2489] Builtin profile: MobileSafari (sandbox)
Apr 30 10:15:38 unknown MobileSafari[2489] <Warning>: Received memory warning.
Apr 30 10:15:39 unknown SpringBoard[15] <Warning>: Received memory warning.
Apr 30 10:15:50 unknown UserEventAgent[12] <Notice>: jetsam: kernel termination snapshot being created
Apr 30 10:15:50 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.apple.mobilephone[0xb2a4]) Exited: Killed: 9
Apr 30 10:15:50 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.apple.mobilesafari[0xf755]) Exited: Killed: 9
Apr 30 10:15:50 unknown SpringBoard[15] <Warning>: Application 'Phone' exited abnormally with signal 9: Killed: 9
Apr 30 10:15:50 unknown SpringBoard[15] <Warning>: Application 'Safari' exited abnormally with signal 9: Killed: 9
Apr 30 10:15:52 unknown ReportCrash[2491] <Error>: Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2013-04-30-101552.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0
4b. Use Xcode's debug facility, Instruments
Another sophisticated way to check what's happening is to use Instruments.
Checking again your site I see many-many low memory warning reported by Safari before it quits. Sadly it doesn't directy help you discovering the web site problem but maybe helps to find Safari open bug reports.
I had success debugging a crash by doing the following:
connect to the phones console using xcode
find the crash in the console, in my case is looks like this:
Sep 2 17:16:21 Edwards-iPhone ReportCrash[7093] : Saved report to /Library/Logs/CrashReporter/JetsamEvent-2015-09-02-171621.ips
Then go to Diagnostics in settings (settings > privacy > diagnostics & usage data - that's on ios 8.4. It's in a different place on other versions) and find the crash file.
This removes the need to guess at which crash reports the one you experienced.

Flurry analytics doesn't seem to log events in ios 4.2

In the past days I'm having issues with flurry api, and it seems that it
stopped working.
My build ios version is 4.2 and the Flurry version is Flurry iPhone SDK v4.0.4
In my code I'm doing this:
[Flurry setDebugLogEnabled:YES];
[Flurry startSession:#"MY_API_KEY"];
[Flurry logEvent:#"Entered app"];
And I'm getting:
Oct 12 18:17:40 unknown myApp[2981] <Warning>: Flurry: startSession
called for the first time
Oct 12 18:17:40 unknown myApp[2981] <Warning>: Flurry: Start session
called with apiKey[MY_API_KEY]
Oct 12 18:17:40 unknown myApp[2981] <Warning>: Flurry: Trim white space
and use apiKey[MY_API_KEY]
Oct 12 18:17:40 unknown myApp[2981] <Warning>: initial network status [1]
=========
Oct 12 18:17:40 unknown myApp[2981] <Warning>: FlurrySession: Add session
with startTime[2012-10-11 19:36:13 +0000] to saved sessions
Oct 12 18:17:40 unknown myApp[2981] <Error>: -[__NSCFNumber length]:
unrecognized selector sent to instance 0x4504a0
Oct 12 18:17:40 unknown myApp[2981] <Warning>: Flurry: Finish starting
session with apiKey[MY_API_KEY]
Oct 12 18:17:40 unknown myApp[2981] <Warning>: FlurrySession: dealloc
session
And no event Entered app seems to be logged or viewed in debug, except:
Oct 12 18:23:11 unknown myApp[2981] <Warning>: Flurry: setGender[M]
Oct 12 18:25:03 unknown myApp[3001] <Warning>: Flurry: setUserID[5]
Also if running it in xcode it stopped in this line
[Flurry startSession:#"MY_API_KEY"];
And only after pressing twice the continue program execution the program
continues to run.
In the iphone (without the xcode) it runs smoothly but the debug log is the
same, and no events seems to be logged.
Any suggestions?
p.s. Tried to talk to flurry support about this, no one got back to me for 3 days now...
Good to see that the issue got resolved. It seems that for some reason your mail did not reach Flurry. For any further issues, please feel free to write to support#flurry.com. We'll make sure your query is answered within 24 hours. (Full disclosure: I work in the Support team at Flurry)
It seems that [Flurry setUserID:currUserId] when currUserId was NSNumber* (due to passing of id currUserId), caused the problem.
Always make sure that you pass the value NSString* to Flurry, also in events values....
If we use flurry event in background,we should enable
[Flurry setBackgroundSessionEnabled:YES]; under didFinishLaunchingWithOptions in Appdelegate.
To enable background session the error of [_NSCF Number length] is avoided,it can able to track the event.

Unable to connect jailbroken iPhone 3G running iOS 4.2.1 to Xcode for development

I have jailbroken iPhone 3G and recently I've updated the firmware to 4.2.1 (was 3.1.2). Now I'm trying to add this iPhone to Xcode organizer to use it for development. Xcode runs the process of collecting debug information for the device but gets stuck copying file (2 of 2) somewhere about 80%. I switch to Console and see nothing that could relate to the problem. Where can I get more information about what's happeining?
Update:
I've tried to reconnect the device and this time there is multiple lines in Console:
Sun Nov 20 02:13:57 unknown lockdownd[17] <Error>: 2ffea000 handle_connection: Could not receive USB message #6 from DTDKSymbolHelper. Killing connection
Sun Nov 20 02:13:57 unknown com.apple.mobile.lockdown[17] <Notice>: Could not receive size of message
Sun Nov 20 02:13:57 unknown /Developer/Library/Daemons/DTFetchSymbols[1859] <Notice>: Found paths:
Sun Nov 20 02:13:57 unknown /Developer/Library/Daemons/DTFetchSymbols[1859] <Notice>: /usr/lib/dyld
Sun Nov 20 02:13:57 unknown /Developer/Library/Daemons/DTFetchSymbols[1859] <Notice>: /System/Library/Caches/com.apple.dyld/dyld_shared_cache_armv6
Sun Nov 20 02:14:59 unknown lockdownd[17] <Error>: 2ff68000 handle_connection: Could not receive USB message #6 from MDCrashReportTool. Killing connection
Googling did not give any results.
Make sure you have an SDK installed on your desktop that supports the iOS version installed on your iPhone. Otherwise, Xcode will not recognize your device. You can also launch Organizer and it will tell you whats going on and if your device (OS) is supported.
Is it possible that you disabled any launchdaemons?
If you disabled an accessory launch daemon then I'm guessing it could affect xcode connecting to the device.
Have you tried to Un-Jailbreak it.