I have cloned android application from
https://github.com/Azure/azure-iot-sdk-java/tree/master/device/iot-device-samples/android-sample
and created a IOT Hub as directed Here
https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-csharp-csharp-getstarted
and I got Connection string as mentioned there
My code is as bellow
String connString = "HostName=********.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=FYhyjH***************c1rQ22g=";
IotHubClientProtocol protocol = IotHubClientProtocol.MQTT;
DeviceClient client = new DeviceClient(connString, protocol); // error at this line
try {
client.open();
}
catch(IOException e1)
{
System.out.println("Exception while opening IoTHub connection3: " + e1.toString());
}
catch(Exception e2)
{
System.out.println("Exception while opening IoTHub connection4: " + e2.toString());
}
but getting this error while running app, please correct me
06-21 17:29:13.865 12640-12640/com.ccc.iot_demo I/System.out: Exception while opening IoTHub connection2: java.lang.IllegalArgumentException: Device ID cannot be null.
06-21 17:29:13.865 12640-12640/com.ccc.iot_demo W/System.err: java.lang.IllegalArgumentException: Device ID cannot be null.
06-21 17:29:13.865 12640-12640/com.ccc.iot_demo W/System.err: at com.microsoft.azure.sdk.iot.device.IotHubConnectionString.validateTerms(IotHubConnectionString.java:206)
06-21 17:29:13.865 12640-12640/com.ccc.iot_demo W/System.err: at com.microsoft.azure.sdk.iot.device.IotHubConnectionString.<init>(IotHubConnectionString.java:90)
06-21 17:29:13.865 12640-12640/com.ccc.iot_demo W/System.err: at com.microsoft.azure.sdk.iot.device.DeviceClient.<init>(DeviceClient.java:141)
06-21 17:29:13.865 12640-12640/com.ccc.iot_demo W/System.err: at com.ccc.iot_demo.MainActivity.SendMessage(MainActivity.java:52)
06-21 17:29:13.865 12640-12640/com.ccc.iot_demo W/System.err: at com.ccc.iot_demo.MainActivity.onCreate(MainActivity.java:33)
06-21 17:29:13.865 12640-12640/com.ccc.iot_demo W/System.err: at android.app.Activity.performCreate(Activity.java:6259)
06-21 17:29:13.865 12640-12640/com.ccc.iot_demo W/System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130)
06-21 17:29:13.865 12640-12640/com.ccc.iot_demo W/System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
06-21 17:29:13.865 12640-12640/com.ccc.iot_demo W/System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490)
06-21 17:29:13.865 12640-12640/com.ccc.iot_demo W/System.err: at android.app.ActivityThread.-wrap11(ActivityThread.java)
06-21 17:29:13.865 12640-12640/com.ccc.iot_demo W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
06-21 17:29:13.865 12640-12640/com.ccc.iot_demo W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
06-21 17:29:13.866 12640-12640/com.ccc.iot_demo W/System.err: at android.os.Looper.loop(Looper.java:148)
06-21 17:29:13.866 12640-12640/com.ccc.iot_demo W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5443)
06-21 17:29:13.866 12640-12640/com.ccc.iot_demo W/System.err: at java.lang.reflect.Method.invoke(Native Method)
06-21 17:29:13.866 12640-12640/com.ccc.iot_demo W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
06-21 17:29:13.866 12640-12640/com.ccc.iot_demo W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
This issue caused by using the wrong connection string.
Instead of using IoT Hub connection string you need use device connection string that has the following format:
HostName=[YOUR HUB NAME].azure-devices.net;DeviceId=[YOUR DEVICE ID];SharedAccessKey=rr****************************************4w=
Simply, you can get this connection string from Device Explorer.
https://stackoverflow.com/a/44688691/15057788
Confirm this solution it also work fine for me, you could see my details issue below.
**1.**First time once the applicatin lunch, in the logcat shown me to "com.iothub.azure.microsoft.com.androidsample E/ion: ioctl c0044901 failed with code -1: Invalid argument"
**2.**Second time once click starting to connect the IoThub from the application on the application display shown me to "Exception while opening IoTHub connection:java.lang.lllegalArgumentException:IoT Hub hostName cannot be null"
Hopefully, my details issue it's gonna be an benefit for anyone, and "Rita Han - MSFT" thank you so much.
Related
I'm trying to run my application in a real iOS device, but it is giving me the next error that I have no idea what to do to solve:
dyld: Library not loaded: #rpath/libsndfile.1.dylib
Referenced from: /private/var/containers/Bundle/Application/7366AC4C-A729-4AB4-A2F6-7ADB2FC71B5D/MyApp.app/MyApp
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/7366AC4C-A729-4AB4-A2F6-7ADB2FC71B5D/MyApp.app/Frameworks/libsndfile.1.dylib: code signature invalid for '/private/var/containers/Bundle/Application/7366AC4C-A729-4AB4-A2F6-7ADB2FC71B5D/MyApp.app/Frameworks/libsndfile.1.dylib'
/private/var/containers/Bundle/Application/7366AC4C-A729-4AB4-A2F6-7ADB2FC71B5D/MyApp.app/Frameworks/libsndfile.1.dylib: code signature invalid for '/private/var/containers/Bundle/Application/7366AC4C-A729-4AB4-A2F6-7ADB2FC71B5D/MyApp.app/Frameworks/libsndfile.1.dylib'
/private/var/containers/Bundle/Application/7366AC4C-A729-4AB4-A2F6-7ADB2FC71B5D/MyApp.app/Frameworks/libsndfile.1.dylib: stat() failed with errno=1
/private/var/containers/Bundle/Application/7366AC4C-A729-4AB4-A2F6-7ADB2FC71B5D/MyApp.app/Frameworks/libsndfile.1.dylib: code signature invalid for '/private/var/containers/Bundle/Application/7366AC4C-A729-4AB4-A2F6-7ADB2FC71B5D/MyApp.app/Frameworks/libsndfile.1.dylib'
/private/var/containers/Bundle/Application/7366AC4C-A729-4AB4-A2F6-7ADB2FC71B5D/MyApp.app/Frameworks/libsndfile.1.dylib: stat() failed with errno=1
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
When I run my app in my own device, it works perfectly, but when I run it in any other device, the app doesn't even open, it just crashes and throws that error.
Trying to deploy a Xamarin Android App to an emulator running on a Mac fails with error "Deployment Failed" along with Mono.AndroidTools.AdbException: secure_mkdirs failed: Permission denied
Update: The emulator was started by Android Studio. When I try to start the emulator from Visual Studio Mac, I get error
PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value [/Users/myname/Library/Developer/Xamarin/android-sdk-macosx]!
Below is an excerpt from the Deploying To Device pad round about where the errors start showing
...
Synchronizing assemblies
Synchronizing assemblies...
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: Deployment failed
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: Xamarin.AndroidTools.AndroidDeploymentException: FailedToSynchronizeFastDevAssemblies ---> Mono.AndroidTools.AdbException: secure_mkdirs failed: Permission denied
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: at Mono.AndroidTools.Util.AggregateAsyncResult.CheckError (System.Threading.CancellationToken token) [0x0002a] in /Users/builder/azdo/_work/287/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Mono.AndroidTools/Util/AggregateAsyncResult.cs:72
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: at Mono.AndroidTools.Adb.AdbSyncClient.EndPushSyncItems (System.IAsyncResult result) [0x00006] in /Users/builder/azdo/_work/287/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Mono.AndroidTools/Adb/AdbSyncClient.cs:1071
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: at Mono.AndroidTools.Internal.AdbClientTaskExtensions.InnerInvoke (System.Threading.Tasks.TaskCompletionSource`1[TResult] tcs, System.Func`2[T,TResult] endMethod, System.IAsyncResult l) [0x00000] in /Users/builder/azdo/_work/287/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Mono.AndroidTools/Internal/AdbClientTaskExtensions.cs:256
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: --- End of stack trace from previous location where exception was thrown ---
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: at Xamarin.AndroidTools.AndroidDeploySession.InstallAssemblies (System.String destinationPath, System.Threading.CancellationToken token) [0x00339] in /Users/builder/azdo/_work/287/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:614
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: --- End of inner exception stack trace ---
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: at Xamarin.AndroidTools.AndroidDeploySession.InstallAssemblies (System.String destinationPath, System.Threading.CancellationToken token) [0x003b5] in /Users/builder/azdo/_work/287/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:622
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: at Xamarin.AndroidTools.AndroidDeploySession.FastDevAsync (System.Boolean useExternal) [0x000da] in /Users/builder/azdo/_work/287/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:514
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: at Xamarin.AndroidTools.AndroidDeploySession.RunAsync (System.Threading.CancellationToken token) [0x004b0] in /Users/builder/azdo/_work/287/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:229
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(618,2): error ADB1000: at Xamarin.AndroidTools.AndroidDeploySession.RunLoggedAsync (System.Threading.CancellationToken token) [0x0002f] in /Users/builder/azdo/_work/287/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Sessions/AndroidDeploySession.cs:123
Done building target "_Upload" in project "xamarinwrapper.csproj" -- FAILED.
Done building project "xamarinwrapper.csproj" -- FAILED.
Build FAILED.
...
Well, I reinstalled Visual Studio for Mac, and created a new emulator using the Visual Studio Device Manager, started the emulator from Visual Studio Device Manager and it works now.
We get the below error while executing Visual Studio Test Agent Deployment task is being executed. Update test agent is not selected in the task configuration.
[error]Error occured on 'QA38:5985'. Details : 'Failed to install 'VisualStudioRemoteDeployer491d645c-0c5a-4e37-b387-18dc78d524ff' from service executable path VisualStudioRemoteDeployer.exe . Consult the logs below:
2016-07-14T11:09:20.2180363Z ##[error]Exception calling "SetRight" with "2" argument(s): "Could not obtain the user information."
2016-07-14T11:09:20.2180363Z ##[error] CategoryInfo :NotSpecified: (:) [], MethodInvocationException
2016-07-14T11:09:20.2180363Z ##[error] FullyQualifiedErrorId :Exception
2016-07-14T11:09:20.2180363Z ##[error]'. For troubleshooting, refer http://aka.ms/remotevstest
When the update test agent check box is selected, the below error is encountered:
DistributedTests: Task 'DownloadTestAgent' for machine QA38:5985's Error : System.AggregateException: Failed to install 'VisualStudioRemoteDeployer63061344-35bc-47ed-ab13-4093a853a458' from service executable path VisualStudioRemoteDeployer.exe . Consult the logs below:
2016-07-13T14:07:15.9388814Z ##[warning]Exception calling "SetRight" with "2" argument(s): "Could not obtain the user information."
2016-07-13T14:07:15.9388814Z ##[warning] CategoryInfo :NotSpecified: (:) [], MethodInvocationException
2016-07-13T14:07:15.9388814Z ##[warning] FullyQualifiedErrorId :Exception
2016-07-13T14:07:15.9388814Z ##[warning] ---> System.Management.Automation.RemoteException: Exception calling "SetRight" with "2" argument(s): "Could not obtain the user information."
2016-07-13T14:07:15.9388814Z ##[warning] --- End of inner exception stack trace ---
2016-07-13T14:07:15.9388814Z ##[warning] at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable)
2016-07-13T14:07:15.9388814Z ##[warning] at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.RemoteDeploymentHelper.InstallServiceInternal(String serviceSourcePath, String serviceName, String destinationFileName)
2016-07-13T14:07:15.9388814Z ##[warning] at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.RemoteDeploymentHelper.InstallService(String serviceSourcePath, String serviceName, String destinationFileName)
2016-07-13T14:07:15.9388814Z ##[warning] at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.DeploymentClient.<RunAsync>d__24.MoveNext()
2016-07-13T14:07:15.9388814Z ##[warning]---> (Inner Exception #0) System.Management.Automation.RemoteException: Exception calling "SetRight" with "2" argument(s): "Could not obtain the user information."<---
2016-07-13T14:07:15.9488740Z ##[warning]DistributedTests: Task 'DownloadTestAgent' for machine QA38:5985's Log : System.AggregateException: Failed to install 'VisualStudioRemoteDeployer63061344-35bc-47ed-ab13-4093a853a458' from service executable path VisualStudioRemoteDeployer.exe . Consult the logs below:
2016-07-13T14:07:15.9488740Z ##[warning]Exception calling "SetRight" with "2" argument(s): "Could not obtain the user information."
2016-07-13T14:07:15.9488740Z ##[warning] CategoryInfo :NotSpecified: (:) [], MethodInvocationException
2016-07-13T14:07:15.9488740Z ##[warning] FullyQualifiedErrorId :Exception
2016-07-13T14:07:15.9488740Z ##[warning] ---> System.Management.Automation.RemoteException: Exception calling "SetRight" with "2" argument(s): "Could not obtain the user information."
2016-07-13T14:07:15.9488740Z ##[warning] --- End of inner exception stack trace ---
2016-07-13T14:07:15.9488740Z ##[warning] at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable)
2016-07-13T14:07:15.9488740Z ##[warning] at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.RemoteDeploymentHelper.InstallServiceInternal(String serviceSourcePath, String serviceName, String destinationFileName)
2016-07-13T14:07:15.9488740Z ##[warning] at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.RemoteDeploymentHelper.InstallService(String serviceSourcePath, String serviceName, String destinationFileName)
2016-07-13T14:07:15.9488740Z ##[warning] at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.DeploymentClient.<RunAsync>d__24.MoveNext()
2016-07-13T14:07:15.9588831Z ##[warning]---> (Inner Exception #0) System.Management.Automation.RemoteException: Exception calling "SetRight" with "2" argument(s): "Could not obtain the user information."<---
2016-07-13T14:07:15.9588831Z ##[warning]DistributedTests: Failed to copy testagent setup to test machines. Check if the machines are accessible and installation file is accessible to the test machines.
2016-07-13T14:07:16.0642158Z ##[warning]For troubleshooting, refer http://aka.ms/remotevstest.
[error]Failed to copy testagent setup to test machines. Check if the machines are accessible
[error]Failed to copy testagent setup to test machines. Check if the machines are accessible
Just tested task Visual Studio Test Agent Deployment on my TFS 2015 Update3, and got a successful release:
You may try to upgrade your TFS to the latest Update 3, and refer to my setting to create a new release:
We are working on a project where we are fetching feeds from Spotify. We have integrated Spotify library in the same. The app was rejected by MFI approval process due to app launch crash issue. We are stuck here. Its really urgent and we appreciate some quick help.
We are getting a app crash error when app launches. We are calling a method, which might be the reason of the crash but we are not sure.
- (void)clearKeychain {
for( NSString *serviceName in #[#"rdio",#"spotify",#"spotifyUsername",#"muzik"]) {
DDLogVerbose(#"removing keychain entry for service = %#", serviceName);
[MZUserManager removeTokenForService:serviceName];
}
MZSpotifyService *spotify = (MZSpotifyService*)[[MZDataManager sharedManager] serviceWithName:[MZSpotifyService shortName]];
[spotify.sessionManager logout];
[MZRdioService rdio].delegate = nil;
[[MZRdioService rdio] logout];
}
---------------------------------
- (MZBaseService *)serviceWithName:(NSString *)serviceName
{
NSLog(#"active services : \n %#",_activeServices);
return _activeServices[serviceName];
}
---------------------------------------
- (void)logout {
[[SPSession sharedSession] logout:^{
DDLogVerbose(#"logged out from spotify");
}];
}
Below are the logs
2013-10-31 15:43:54 -0700 muzik[297] <Warning> *** Assertion failure in NSString* base::deviceIdFromKeychain()(), /Users/spotify-buildagent/buildAgent/work/1e0ce8a77adfb2dc/client/base/_apple/_ios/os_ios.mm:287
2013-10-31 15:43:54 -0700 muzik[297] <Error> *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Keychain error when fetching device ID, nonrecoverable'
*** First throw call stack:
(0x2e265e8b 0x385ca6c7 0x2e265d5d 0x2ec0e29b 0x2ea90f 0x2eaee5 0x2e7bb3 0x1a618d 0x1a545d 0x2e230f55 0x2e2302cf 0x2e22ebd5 0x2e199541 0x2e1dd1ab 0x1a55a1 0x2ec49dc7 0x38be0c5d 0x38be0bcf 0x38bdecd0)
Detail logs are uploaded here (skydive)
Full Crash Logs shared by MFI
Date/Time: 2013-10-31 15:43:54.065 -0700
OS Version: iOS 7.0.2 (11A501)
UDID: 41ab058a88eb7c1c3976828019bdfa0bd5edae22
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 7
Filtered syslog:
2013-10-31 15:43:52 -0700 muzik[297] <Warning> Flurry: Starting session on Agent Version [Flurry_iOS_120_4.2.4]
2013-10-31 15:43:53 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:53 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:53 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:53 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:53 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:53 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:53 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:54 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:54 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:54 -0700 muzik[297] <Warning> *** Assertion failure in NSString* base::deviceIdFromKeychain()(), /Users/spotify-buildagent/buildAgent/work/1e0ce8a77adfb2dc/client/base/_apple/_ios/os_ios.mm:287
2013-10-31 15:43:54 -0700 muzik[297] <Error> *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Keychain error when fetching device ID, nonrecoverable'
*** First throw call stack:
(0x2e265e8b 0x385ca6c7 0x2e265d5d 0x2ec0e29b 0x2ea90f 0x2eaee5 0x2e7bb3 0x1a618d 0x1a545d 0x2e230f55 0x2e2302cf 0x2e22ebd5 0x2e199541 0x2e1dd1ab 0x1a55a1 0x2ec49dc7 0x38be0c5d 0x38be0bcf 0x38bdecd0)
The important error is here:
The operation couldn’t be completed. (OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements)
Now, as to why you're triggering it, I don't know. Try Googling that specific error — it's not Spotify-specific.
However, it looks like you're storing Spotify credentials in the Keychain, and you might be triggering the problem by clearing stuff from the Keychain. Unfortunately, "We are calling a method" isn't helpful information.
Now, you shouldn't be storing Spotify credentials in the Keychain. DEFINITELY not user passwords — that's a breach of the ToS. CocoaLibSpotify gives you token that are safe to store in NSUserDefaults.
You can find an example of how to store Spotify credentials properly in the "Empty CocoaLibSpotify" sample project that ships with the library.
Also, try testing your archive builds before submitting them to the App Store. There's no reason this shouldn't be triggering for you locally if it's happening during review.
I was testing my application which has action bar sherlock library on a device that has android version 2.3.6. But it crashes after loading the splash screen. In the manifest I have set the minimum sdk to 4 and the target sdk to 18. The theme is Sherlock.Light. What could be causing the forced closing?
Here is the error log:
10-18 12:13:32.874: E/AndroidRuntime(313): Uncaught handler: thread main exiting due to uncaught exception
10-18 12:13:32.884: E/AndroidRuntime(313): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.budcode.findaspecialistv1/com.budcode.buddoctorbeta.MainActivity}: java.lang.IllegalStateException: No implementations match configuration.
10-18 12:13:32.884: E/AndroidRuntime(313): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
10-18 12:13:32.884: E/AndroidRuntime(313): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
10-18 12:13:32.884: E/AndroidRuntime(313): at android.app.ActivityThread.access$2100(ActivityThread.java:116)
10-18 12:13:32.884: E/AndroidRuntime(313): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
10-18 12:13:32.884: E/AndroidRuntime(313): at android.os.Handler.dispatchMessage(Handler.java:99)
10-18 12:13:32.884: E/AndroidRuntime(313): at android.os.Looper.loop(Looper.java:123)
10-18 12:13:32.884: E/AndroidRuntime(313): at android.app.ActivityThread.main(ActivityThread.java:4203)
10-18 12:13:32.884: E/AndroidRuntime(313): at java.lang.reflect.Method.invokeNative(Native Method)
10-18 12:13:32.884: E/AndroidRuntime(313): at java.lang.reflect.Method.invoke(Method.java:521)
10-18 12:13:32.884: E/AndroidRuntime(313): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
10-18 12:13:32.884: E/AndroidRuntime(313): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
10-18 12:13:32.884: E/AndroidRuntime(313): at dalvik.system.NativeStart.main(Native Method)
10-18 12:13:32.884: E/AndroidRuntime(313): Caused by: java.lang.IllegalStateException: No implementations match configuration.
10-18 12:13:32.884: E/AndroidRuntime(313): at com.actionbarsherlock.ActionBarSherlock.wrap(ActionBarSherlock.java:224)
10-18 12:13:32.884: E/AndroidRuntime(313): at com.actionbarsherlock.app.SherlockFragmentActivity.getSherlock(SherlockFragmentActivity.java:31)
10-18 12:13:32.884: E/AndroidRuntime(313): at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:261)
10-18 12:13:32.884: E/AndroidRuntime(313): at com.budcode.buddoctorbeta.MainActivity.onCreate(MainActivity.java:44)
10-18 12:13:32.884: E/AndroidRuntime(313): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
10-18 12:13:32.884: E/AndroidRuntime(313): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
10-18 12:13:32.884: E/AndroidRuntime(313): ... 11 more
ABS is 2.1+ only, so you'd need minimum SDK at 7:
android:minSdkVersion="7"