I am facing an unexpected issue that is when I am running App
most of the times a dialog box open up and saying "Application failed
connection to the service " See snapshot:
Though after two or three times pressing "Reload" button on this dialog connects App with WL Server and then App works fine. But if I kill App and then re-run it , again same dialog appears.
It also appears when you first time run App after installing on a device.
My App was running perfectly fine from two months back.
The only new thing that I have done is Push Notification. This is the
only new feature that I have added in the App.
Any suggestion on this?
What could be the root cause of this issue? How can I trace it?
And if I want to disable this dialog and instead show a
custom message (alert) on screen. Because this dialog box reveals the
running service / WL server URL.
In the console it only shows "Application failed connection to the service "
And while clicking on the Details option on the dialog box. It shows correct address of WL Server. And after three/four times of reload it connects App with server and then works fine, and afterwards goes fine and doesn't show anything.
The Logs are given below:
Apr 15 14:24:51 iPhone myApp[2746] <Warning>: [LOG] ondeviceready event dispatched
Apr 15 14:24:51 iPhone myApp [2746] <Warning>: {
appVersionPref = "1.0";
freeSpace = 13572620288;
wlSkinLoaderChecksum = "(null)";
wlSkinName = default;
}
Apr 15 14:24:51 iPhone myApp [2746] <Warning>: [LOG] Application did not define an i18n messages object, skipping translation.
Apr 15 14:24:51 iPhone myApp [2746] <Warning>: [LOG] wlclient init started
Apr 15 14:24:51 iPhone myApp [2746] <Warning>: [LOG] Read cookies: null
Apr 15 14:24:51 iPhone myApp [2746] <Warning>: [LOG] CookieMgr read cookies: {}
Apr 15 14:24:57 iPhone myApp [2746] <Warning>: [LOG] Connection went Down: Mon Apr 15 2013 14:24:57 GMT+0300 (AST)
Apr 15 14:24:57 iPhone myApp [2746] <Warning>: [ERROR] Client init failed. Connection to the service is not available.
Apr 15 14:25:07 iPhone myApp [2746] <Warning>: [LOG] ondeviceready event dispatched
Apr 15 14:25:07 iPhone myApp [2746] <Warning>: {
appVersionPref = "1.0";
freeSpace = 13572620288;
wlSkinLoaderChecksum = "(null)";
wlSkinName = default;
}
by clicking Details:
Apr 15 2013 23:55:17 GMT+0300 (AST)
Apr 15 23:55:17 iPhone myApp[3116] <Warning>: [ERROR] Client init failed. Connection to the service is not available.
Apr 15 23:55:19 iPhone myApp[3116] <Warning>: WLReachability Flag Status: -R -----l- networkStatusForFlags
Apr 15 23:55:59 iPhone kernel[0] <Debug>: launchd[3120] Builtin profile: MobileSafari (sandbox)
Apr 15 23:56:02 iPhone kernel[0] <Debug>: launchd[3121] Builtin profile: syncdefaultsd (sandbox)
Apr 15 23:56:21 iPhone myApp[3116] <Warning>: Copied text: 'App Diagnostics
Time : Mon Apr 15 2013 23:55:19 GMT+0300 (AST)
Application Name : myApp
Application Version : 1.0
Service URL : https://www.mydomain.com.bh:443/AppProject/apps/services/api/myApp/iphone/
Device Platform : iPhone
Device Version : 6.1
Screen Resolution : 320x480
Airplane Mode : Not available
Using Network : WIFI
Wifi Name : Not available
Mobile Network Type : Not available
Carrier Name : Not available
IP Address : 192.168.109.101
Error Code : UNRESPONSIVE_HOST
Error Message : Connection to the service is not available.
HTTP Status :
It sounds like there's a network issue preventing you from connecting to your Worklight server.
This can be due to many different reasons, to list some:
Poor WiFi/3G
Faulty device
Firewall issues on the network where the webserver is hosted
Worklight server issue
To ensure that you are indeed reaching the server I would suggest using a network sniffer. One tool that runs on Windows is Fiddler.
Fiddler can be set up as a reverse proxy where your device will be making calls to the proxy. The proxy will then route your request to the web server but it will also log the information so you can view it.
If you are on Windows, I would suggest installing Fiddler and following Option #2 of this answer.
You should then be able to see if your requests are reaching the server and continue investigation from there.
Related
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.
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.
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.
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.
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.