As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
I just wanted to include an auto created user for quick test of the system. Actually my app will not ask for registration, if users don't want to register. So, a working auto created user would be fine for the final version as well.
Running it, the user actually is created in the kinvey backend every time it runs; however terminates and provides the following error message:
2016-10-01 16:23:15.009 AppName[91983:1756853] *** Terminating app due to uncaught exception 'KinveyException', reason: 'Could not write token to keychain. Err (null) (-34018)'
Anybody experienced the same or has an idea how to solve?
Best Answer
P
Pranav J
said
about 7 years ago
Martin,
For error "'KinveyException', reason: 'Could not write token to keychain. Err (null) (-34018)'", this seems to be an issue with iOS simulator. Please take a look at following links:
Glad that your issue has been resolved! Let me know if you have more questions.
Thanks, Pranav Kinvey Support
A
Arnold Ackerer
said
about 7 years ago
thx Pranav, sharing the keychain also worked for me.
Also, using the device and not the simulator was also a useful hint.
M
Martin Wiingaard
said
about 7 years ago
Awesome.. Turning on the "Keychain Sharing" capability solved my problem
P
Pranav J
said
about 7 years ago
Answer
Martin,
For error "'KinveyException', reason: 'Could not write token to keychain. Err (null) (-34018)'", this seems to be an issue with iOS simulator. Please take a look at following links:
Terminating app due to uncaught exception 'KinveyInitializationError', reason: '`nil` or invalid appKey, cannot use Kinvey Service, no recovery available'
Does it help?
M
Mark Pruitt
said
about 7 years ago
I am having the exact same issue but with the iOS v3 SDK. I am using Xcode 8.0
*** Terminating app due to uncaught exception 'KinveyException', reason: 'Could not write token to keychain. Err (null) (-34018)'
I think there is an issue with the KeychainAccess dependency when updating to Swift 3. There were some errors with it that I fixed last pm to even get it to compile (ambiguity with parameter and method names) so my suspicion lies here.
Thanks,
Mark
P
Pranav J
said
about 7 years ago
Arnold,
What version of Kinvey SDK are you using?
What is the Xcode version and
what is the iOS SDK version where you see in the issue?
Also just in
case you have tried - wanted to check if you were able to execute any of
the Kinvey sample apps earlier?
Arnold Ackerer
I am migrating my backend service from parse to kinvey but get slammed with the above error message and termination of my app.
Happens with the emulator but also when running on real phone device.
I have not included any big chunks of kinvey related code yet. Basically just the code below:
In AppDelegate.m:
//kinvey
NSString *APP_KEY = @"abc_....";
NSString *APP_SECRET = @"...333";
..
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
...
//Kinvey use code: You'll need to create an app on the backend and initialize it here:
//http://docs.kinvey.com/ios-developers-guide.html#Initializing_Programmatically
KCSClientConfiguration* config = [KCSClientConfiguration configurationWithAppKey:APP_KEY secret:APP_SECRET];
[[KCSClient sharedClient] initializeWithConfiguration:config];
}
---------
And in the LoginScreen.m:
...
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[self createNewAccount];
}
...
- (void)createNewAccount{
if ([KCSUser activeUser] == nil) {
[KCSUser createAutogeneratedUser:@{KCSUserAttributeEmail : @"kinvey@kinvey.com", KCSUserAttributeGivenname : @"ArnoldWolfgang", KCSUserAttributeSurname : @"Kinvey"} completion:^(KCSUser *user, NSError *errorOrNil, KCSUserActionResult result) {
//do something
}];
} else {
//otherwise user is set and do something
}
}
-----
I just wanted to include an auto created user for quick test of the system. Actually my app will not ask for registration, if users don't want to register. So, a working auto created user would be fine for the final version as well.
Running it, the user actually is created in the kinvey backend every time it runs; however terminates and provides the following error message:
2016-10-01 16:23:15.009 AppName[91983:1756853] *** Terminating app due to uncaught exception 'KinveyException', reason: 'Could not write token to keychain. Err (null) (-34018)'
2 AppName 0x000000010c1afd83 +[KCSKeychain2 setKinveyToken:user:] + 1411
3 AppName 0x000000010c1f8b82 +[KCSUser2(KinveyUserService) setupActiveUser:completion:checkAuth:] + 882
4 AppName 0x000000010c1f2d92 __90+[KCSUser2(KinveyUserService) createUserWithUsername:password:fieldsAndValues:completion:]_block_invoke.45 + 530
Anybody experienced the same or has an idea how to solve?
For error "'KinveyException', reason: 'Could not write token to keychain. Err (null) (-34018)'", this seems to be an issue with iOS simulator. Please take a look at following links:
https://forums.developer.apple.com/thread/51071
https://openradar.appspot.com/27844971
Workaround for this is sharing the Keychain (which can also allows your keychain between your apps). Take a look at this link http://evgenii.com/blog/sharing-keychain-in-ios/.
Thanks,
Pranav
Kinvey Support
- Oldest First
- Popular
- Newest First
Sorted by Newest FirstPranav J
Glad that your issue has been resolved! Let me know if you have more questions.
Thanks,
Pranav
Kinvey Support
Arnold Ackerer
thx Pranav, sharing the keychain also worked for me.
Also, using the device and not the simulator was also a useful hint.
Martin Wiingaard
Awesome.. Turning on the "Keychain Sharing" capability solved my problem
Pranav J
For error "'KinveyException', reason: 'Could not write token to keychain. Err (null) (-34018)'", this seems to be an issue with iOS simulator. Please take a look at following links:
https://forums.developer.apple.com/thread/51071
https://openradar.appspot.com/27844971
Workaround for this is sharing the Keychain (which can also allows your keychain between your apps). Take a look at this link http://evgenii.com/blog/sharing-keychain-in-ios/.
Thanks,
Pranav
Kinvey Support
Martin Wiingaard
I'm also getting:
'KinveyException', reason: 'Could not write token to keychain. Err (null) (-34018)'
I'm using iOS 10, Xcode 8 and SDK version 1.41.1.
The problem only occurs when I'm running on the simulator. When I run an iPhone (6) I have no problem. I have had this problem with the simulator for a while. See this thread: https://support.kinvey.com/support/discussions/topics/12000005303
Arnold Ackerer
Hello Pranav,
thanks for getting back to me.
1. I use version 1.41.0 of the iOS SDK
2.
Version: 8.0 (8A218a)
Location: /Applications/Xcode.app
Applications:
Xcode: 8.0 (11246)
Instruments: 8.0 (61187)
SDKs:
iOS:
10.0: (14A345)
iOS Simulator:
10.0: (14A345)
macOS:
10.12: (16A300)
tvOS:
10.0: (14T328)
tvOS Simulator:
10.0: (14T328)
watchOS:
3.0: (14S326)
watchOS Simulator:
3.0: (14S326)
3. many of them fail but to a number of causes
for instance the test drive sample
Terminating app due to uncaught exception 'KinveyInitializationError', reason: '`nil` or invalid appKey, cannot use Kinvey Service, no recovery available'
Does it help?
Mark Pruitt
I am having the exact same issue but with the iOS v3 SDK. I am using Xcode 8.0
*** Terminating app due to uncaught exception 'KinveyException', reason: 'Could not write token to keychain. Err (null) (-34018)'
I think there is an issue with the KeychainAccess dependency when updating to Swift 3. There were some errors with it that I fixed last pm to even get it to compile (ambiguity with parameter and method names) so my suspicion lies here.
Thanks,
Mark
Pranav J
Thanks,
Pranav
Kinvey Support
-
Why do I get "Undefined symbols" errors when building with KinveyKit?
-
How do I register push tokens?
-
When using social login, to perform a log-out, do I need to log out of the social network, Kinvey, o
-
How can I assign additional properties to users?
-
Does KinveyKit support 64-bit ARM devices, such as iPhone 5s?
-
Authorization Token Invalid or Expired
-
BOOL and how it is stored in the database.
-
Offline saving throwing errors
-
Custom endpoint not able to form request object
-
Security through business logic
See all 437 topics