Troubleshooting
Helpshift’s Legacy SDKs (SDK Version <=7.x.x) will see end of life as of 31 Dec 2022 and end of support as of 31 March 2023.
Troubleshooting
SDK integration
7.9.0 SDK Update
We found a bug for the following scenario - for SDK 7.9.0, when New Issue Automations(NIAs) are used to assign to a Custom Bot and if the first step in the bot is a Get Info from User step with Options, the Options don’t show up to the end user till they go back and come to the conversation screen again.
Action needed:
- If you are planning to integrate or are in the process of integrating SDK 7.9.0, we recommend integrating with 7.9.1 instead.
- If you have already released any of your apps with the affected SDKs and your New Issue Automation triggers options bot, we recommend that you upgrade to 7.9.1 SDK.
Using Xcode 11
If you are migrating to Xcode 11 for building and deploying your app, please note that Helpshift SDKs < 7.6.3
will not be able to support Apple Push notifications. This is due to the change in the NSData class's description
property. The Helpshift SDK uses this property in the device token that is passed by the App in the [HelpshiftCore registerDeviceToken:]
API. Please wait for version 7.6.3
which is slated to release on the 10th of October, 2019. More details are available in the Apple forum thread.
Crash while force unwrapping optional values in swift
If your app crashes with following stack trace when you call an Helpshift SDK API with an Optional param which is nil, you can add nullability annotation to that API in .h file to allow nil values.
Fatal error: Unexpectedly found nil while unwrapping an Optional value.
For Example:
+ (void) setTheme:(NSString *)themeName;
should be changed to
+ (void) setTheme:(NSString *__nullable)themeName;
Managing Helpshift SDK updates with Cocoapods
Due to the way Cocoapods handles version updates, if you have your own custom localized strings, note that, on the next SDK release they will be overwritten. Make sure you backup your translations, so you can migrate the values back into the new string files. One way of doing that might be to add these customizations in the version control system. That way when you upgrade Helpshift, you can see the diff
of the changes that you made and reinstate them as you require.
Unable to run Helpshift Integration Assistant
To run Helpshift Integration Assistant, you need to update your Security and Privacy Settings.
To do so, goto System Preferences -> Security and Privacy Settings -> General
and select Anywhere
under Allow apps downloaded from
:
hs_setContentInsetAdjustmentBehaviorToAutomaticWithParent crash
If you are seeing app crash just after launching Helpshift Support screens, please add -ObjC flag to the Other Linker Flags under Build Settings section.
*** Terminating app due to uncaught exception
reason: '-[UITableView hs_setContentInsetAdjustmentBehaviorToAutomaticWithParent:]: unrecognized selector sent to instance 0x7fafe8837c00'
CFBundleShortVersionString crash
If you are seeing app crashes just after launching the app, please make sure to set the CFBundleShortVersionString (Bundle versions string, short) in the <YOUR_APP>-Info.plist file of your XCode project.
*** Terminating app due to uncaught exception NSInvalidArgumentException,
reason: *** setObjectForKey: object cannot be nil (key: av)
*** First throw call stack:
(0x2da11f0b 0x381a8ce7 0x2d94d1bf 0x654897 0x6643ab 0x38691d53 0x38696cbd 0x38693c6f 0x386975f1 0x386978dd 0x387c2c17 0x387c2adc)
libc++abi.dylib: terminating with uncaught exception of type NSException
Incorrect iOS initialization code crash
If just after launching the app, you get a crash that has readLocalConfig
in it's call stack, then make sure that you're using the correct Helpshift initialization code for iOS.
When testing again, after using the correct initialization code, delete the app from your device or simulator and do a fresh install.
2014-08-26 13:28:54.862 HS Demo[96593:3a03] -[__NSCFString objectAtIndex:]: unrecognized selector sent to instance 0x9e27a30
2014-08-26 13:28:54.865 HS Demo[96593:3a03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString objectAtIndex:]: unrecognized selector sent to instance 0x9e27a30'
*** First throw call stack:
(
0 CoreFoundation 0x025df1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x01c918e5 objc_exception_throw + 44
2 CoreFoundation 0x0267c243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x025cf50b ___forwarding___ + 1019
4 CoreFoundation 0x025cf0ee _CF_forwarding_prep_0 + 14
5 HS Demo 0x0001e305 -[HSConfigController updateConfigFromDictionary:] + 1238
6 HS Demo 0x0001e615 -[HSConfigController readLocalConfig] + 659
7 HS Demo 0x00015994 __43+[Helpshift handleBecomeActiveNotification]_block_invoke_5 + 96
8 libdispatch.dylib 0x01f3a7b8 _dispatch_call_block_and_release + 15
9 libdispatch.dylib 0x01f4f4d0 _dispatch_client_callout + 14
10 libdispatch.dylib 0x01f3d047 _dispatch_queue_drain + 452
11 libdispatch.dylib 0x01f3ce42 _dispatch_queue_invoke + 128
12 libdispatch.dylib 0x01f3dde2 _dispatch_root_queue_drain + 78
13 libdispatch.dylib 0x01f3e127 _dispatch_worker_thread2 + 39
14 libsystem_pthread.dylib 0x0227edab _pthread_wqthread + 336
15 libsystem_pthread.dylib 0x02282cce start_wqthread + 30
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Orientation Fix
To account for the changes in iOS 6 and above with autorotation and interface orientations, we suggest a few precautionary measures to avoid issues with the Helpshift SDK.
The Helpshift SDK uses UIImagePickerController
, which according to
Apple docs
supports portrait mode only.
This means if the interface orientations supported by your application do
not include portrait mask, then while choosing a screenshot the
application will crash.
So please make sure that your application's list of supported interface orientations does not exclude portrait out.
To give you an idea, if you add something like this to your application delegate, it will avoid the crash.
-(NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window{
return UIInterfaceOrientationMaskAll;
}
-(BOOL)shouldAutorotate{
return NO;
}
You can still adjust your viewcontrollers for landscape only. However the application needs to allow portrait mask to support screenshot requests.
You can also allow portrait mode by changing your app's Info.plist file.
It again depends upon your application how you implement these requirements.
Missing chat bubbles in conversation screen
If you encounter a conversation screen, where the chat bubbles are missing, or camera icon is missing, then make sure to correctly import the png files from the HSResources folder into your project.
Strings missing in the SDK UI
If you cannot see strings in the SDK UI, make sure to correctly add localizable string files to your project. The files are to be found in HSLocalization
folder. For more info, refer our Going International guide.
Notifications
Push Notifications
To setup push notifications, check out the Notifications doc.
Things to check when you're not receiving push notifications:
- Make sure that you've uploaded the correct .p12 file for development/production push modes. For more info check here.
- Make sure you're using the
registerDeviceToken:
API, in yourapplication:didRegisterForRemoteNotificationsWithDeviceToken:
delegate method. - Check that the app identifier you're using is the one used for your push certificate.
- Check whether you're have the correct Code Signing setup for the app identifier.
- Make sure that you're registering the app to use push notifications, using
registerForRemoteNotificationTypes
(registerForRemoteNotifications
in iOS 8) in theapplication:didFinishLaunchingWithOptions:
delegate method. - If badge count is not showing up with push, make sure that in the agent dashboard, Send Badge Count is selected under App Settings > Push Notification.
- If custom sound alerts are not working, make sure that Custom Sound Alert is selected under App Settings > Push Notifications. Also, provide the sound file name (with the file extension) exactly as the file name used in your app.
- To configure your app to handle notifications from Helpshift, check out the configuration doc.
Campaign notification shows "Support" as its title.
Please make sure to set the "CFBundleDisplayName" key, in your application's Info.plist file, to the display name of your application.
Helpshift SDK uses the value of this key as the title of the notification. If this key isn't set then the notification by default shows "Support" as the title.
Testing push notifications for an App already in Production
There may be a need to test push notifications for an app that is already in production. This needs to be done safely without causing a disruption of Push Notifications in the production app. The solution here is to register a new app on our dashboard and have your in-development iOS app point to this new app on Helpshift. To configure push for this dashboard app, navigate to 'Push notifications settings' on the dashboard and turn it on. You will also need to provide a certificate.
If you are using the new Universal Push Notification system, upload the same certificate you have used in the production app and select the 'Development mode' radio button.
If you have not moved to Universal Push Notification system, upload a development mode certificate and make sure you have selected the 'Development mode' radio button.
Theming and skinning
Things to check if skinning is not working as expected:
- Make sure that
HelpshiftConfig.plist
is correctly imported into your Xcode project. It should shown under Build Phases > Copy Bundle Resources for your target. To make sure that your project is picking up the plist correctly, you can run the following snippet in your project:
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"HelpshiftConfig" ofType:@"plist"];
NSLog(@"%@",filePath);
If it is printing null
etc. then the HelpshiftConfig.plist
file is not correctly added to your project.
- Colors are specified in hexadecimal format, e.g.
FF0000
is Red. Do not useor0xFF0000
to specify color values.#FF0000
- If you're using
UIAppearance
for a particular UI element, then you will not need to configure that UI element inHelpshiftConfig.plist
, as Helpshift takes on UIAppearance values automatically. - When using custom fonts make sure that you're using the exact font name. For more info check here.
Miscellaneous
App crashing on foreground during getAcceptLangHeaderValue:
or completeEventsDataForEventDTOs:
If you are using iOS SDK version 7.4.0 or below and are seeing crashes during app foreground with a similar stacktrace, please upgrade the SDK to version 7.5.0 or above.
objc_retain + 16
-[HsBaseNetwork getAcceptLangHeaderValue] + 48`
Known issues
UILabel allocation in iOS 7
Apple has a bug with the UILabel component which causes it's allocation to be persisted in the stack. We've minimized the effect as much as possible and reported the issue to Apple. For more details on the root issue, please refer here
For Crittercism users
If you're using Crittercism for crash analytics and facing issues related to FAQ's content not loading, do not use the following API to initialize Crittercism.
+ (void)enableWithAppID:(NSString *)appId;
As described here use,
+ (void)enableWithAppID:(NSString *)appId
andDelegate:(id <CrittercismDelegate>)critterDelegate
andURLFilters:(NSArray *)filters
disableInstrumentation:(BOOL)disableInstrumentation;
iPad iOS 7 Attaching a Screenshot
A bug exists in iOS 7.0.3
on the iPad caused by tapping 'Ok,Attach'
in
the screenshot request (this happens only for the first time after app install).
This is a known issue. Please refer here
UIImagePicker
controller crashes when asking the user to grant photo access.
If you get a crash showing a stack trace similar to the one below, it's
the aforementioned bug causing the crash.
Fatal Exception CALayerInvalidGeometry
CALayer position contains NaN: [nan nan]
0 ... CoreFoundation __exceptionPreprocess + 130
2 CoreFoundation -[NSException initWithCoder:]
3 QuartzCore CA::Layer::set_position(CA::Vec2<double> const&, bool) + 242
4 QuartzCore -[CALayer setPosition:] + 54
5 QuartzCore -[CALayer setFrame:] + 594
6 UIKit -[UIView(Geometry) setFrame:] + 254
7 UIKit -[UILabel setFrame:] + 138
8 UIKit -[UINavigationItemView initWithNavigationItem:] + 384
9 UIKit -[UINavigationItem _titleView] + 92
10 UIKit -[UINavigationBar _prepareForPushAnimationWithItems:] + 68
11 UIKit -[UINavigationBar pushNavigationItem:] + 292
12 UIKit -[UINavigationBar _pushNavigationItem:transition:] + 386
13 UIKit __71-[UINavigationController pushViewController:transition:forceImmediate:]_block_invoke + 150
14 UIKit -[UINavigationController pushViewController:transition:forceImmediate:] + 1384
15 UIKit -[UINavigationController pushViewController:animated:] + 294
16 UIKit -[UIImagePickerController _setupControllersForCurrentSourceType] + 112
17 UIKit -[UIImagePickerController setSourceType:] + 456
18 ... libdispatch.dylib _dispatch_call_block_and_release + 10
19 libdispatch.dylib _dispatch_client_callout + 22
20 libdispatch.dylib _dispatch_main_queue_callback_4CF$VARIANT$mp + 268
21 CoreFoundation __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
22 CoreFoundation __CFRunLoopRun + 1300
23 CoreFoundation CFRunLoopRunSpecific + 522
24 CoreFoundation CFRunLoopRunInMode + 106
25 GraphicsServices GSEventRunModal + 138
26 UIKit UIApplicationMain + 1136
Hidden status bar on orientation change in iOS 8
On iOS 8, Helpshift SDK's navigation bar covers status bar after a change of orientation. To fix this, implement following method in the viewController that makes use of Helpshift API.
// Add this Method in your viewController
- (BOOL)prefersStatusBarHidden {
// return YES or NO as you want to hide status bar or not
return NO;
}
Images not loading in FAQs and Conversations for iOS 9
Root Cause : Apple has changed its policies regarding TLS versions and only accepts connections which support TLSv1.2 SSL. Some of our backend servers do not currently work well with this restriction due to which the network calls fail and images do not load.
Workaround : App developers will temporarily have to disable this restriction by adding the following lines to the app's Info.plist file
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
Crashes due to error reporting
If you are experiencing crashes or reduced instances being reported in your crash reporting tool, it is likely because of Helpshift Error reporting tool can’t forward the error/crash details to your crash reporting tool. We have experienced this with HockeyApp, SplunkMint and several crash reporting tools which use PlCrashReporter platform. You can disable our crash reporting using the flag disableErrorLogging.
For example :/
NSDictionary *installConfig = @{@"disableErrorLogging" : @"yes"};
[Helpshift installForApiKey:@"apikey" domainName:@"domain_name" appID:@"app_id" withOptions:installConfig];
Crashes due to missing data in App's Info.plist
Helpshift SDK adds some meta data (like app's version number, name etc.) along with the conversations that users start. The SDK reads this info from the app's Info.plist file. Some of these fields are mandatory and may cause a crash if left emtpy. Please ensure that the following values are always populated in your Info.plist:
- Bundle versions string
- Bundle name
- Bundle identifier
Xcode12.3 integration build error : Building for iOS, but the embedded framework ‘Helpshift.framework’ was built for iOS + iOS Simulator.
Workaround : Under Build Settings - Navigate to Validate Workspace - Toggle setting back to Yes/No but not to Yes (Error).
If the flag is already set to Yes/No, set it to “Yes” and then set it to “No” again or vice versa. Due to a bug in Xcode 12.3, this setting is visible in Xcode but isn’t actually present in the project file.
Known Issues List
No. | Known Issue | SDK Version | OS Version & Device | Occurs When & Frequency | Work Around |
---|---|---|---|---|---|
1 | Update iOS theming for searchbox | v4.11.1 and above | iOS 7,8 iPhone, iPad |
| |
2 | Crash when text size is changed from settings and app is in background. | v4.11.1 and above | iOS 8.3 iPhone 6, iPhone 6+ |
| |
3 | Chat screen does not get scrolled automatically when screenshot is attached. | v4.11.1 and above | iOS 7+ iPhone, iPad |
| Manually scroll the in-app chat. Or go to the previous screen and get into the in-app chat again |
4 | Migration from 4.11.1 to 4.12.0 sometimes causes a crash on iPhone 6+. | v4.11.1 and above | iOS 7,8 iPhone, iPad | Migration from 4.11.1 to 4.12.0 sometimes causes a crash on iPhone 6+ Frequency: Very rare. | |
5 | Sometimes In-app notification is received after reporting on issue. Or Sometimes user gets in-app notification with 0 notification count. | v4.11.1 and above | iOS 7,8 iPhone, iPad |
| |
6 | Chat bar disappears when user goes back to chat screen after receiving follow up on customer feedback.. | v4.11.1 and above | iOS 6,7,8 iPhone, iPad |
|