Spotify ios sdk suddenly failing on all requestItemAtURI - ios

requestItemAtURI received error
Error Domain=com.spotify.ios-sdk Code=101
"JSON object contains no URI" UserInfo=0x16e2e890
{NSLocalizedDescription=JSON object contains no URI}
Testing with various uri have previously succeeded until just now, for example, this uri should be valid:
spotify:track:5jSz894ljfWE0IcHBSM39i
Any ideas?

Unfortunately this is part of the "This SDK may stop working at any time" part of the Beta. There'll be an update before long to resolve it.

Related

redirect_uri_mismatch Unity Google API on iOS

I created an app in Unity with Google Play Leaderboard support. I could easily make it work on Android, then I moved to OSX to build it for iPhone too.
First I got a problem, that Apple won't accept any bundle identifier with the '_' character in it, but my Android app bundle identifier had 2 of them...
However I found out, that in the Google Developer Console I can link another app to my app (to use the same Leaderboard) for iOS too, so I was quite happy. Unfortunately this doesn't seem to work. I get the *redirect_uri_mismatch* error message every time I try to log in.
On Android I used the UnityGPGPlugin but as it didn't work for me on iOS, I tried the PlayGameServices too. In UnityGPGPlugin I could set only the Application ID, so I thought that's why it is not working. In the PlayGameServices plugin there are two fields, one for the Application ID and one for the Client ID that made it look like that's really what I need. Unfortunately the error is still present and I really don't know what I could do with it. Here is the well known message:
Error: redirect_uri_mismatch
Request Details
cookie_policy_enforce=false
scope=https://www.googleapis.com/auth/appstate
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/plus.login
https://www.googleapis.com/auth/plus.moments.write
https://www.googleapis.com/auth/plus.me
https://www.googleapis.com/auth/plus.profile.agerange.read
https://www.googleapis.com/auth/plus.profile.language.read
https://www.googleapis.com/auth/plus.circles.members.read
response_type=code
access_type=offline
redirect_uri= < my bundle identifier without '_' characters >:/oauth2callback
state=16885367
gpsdk=1.5.0
verifier=12647966
display=page
client_id=123456789123-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
hl=en
The debug log contains only this:
2014-03-16 14:21:19.507 <my app>[1699:60b] GPGSAuthenticateWithCallback.
2014-03-16 14:21:19.509 <my app>[1699:60b] GPGSManager initializing and authenticating.
2014-03-16 14:21:19.512 <my app>[1699:60b] GPPSignIn initialized.
2014-03-16 14:21:19.514 <my app>[1699:60b] GPPSignIn attempting sign in now.
-> applicationWillResignActive()
-> applicationDidEnterBackground()
Does anyone know how could I solve this problem?
Thanks in advance!
Edit:
Maybe it wasn't obvious, but I have 2 bundle identifiers, both of them are linked to the same game service in Google Play Developer Console. The com.x.a_b_c belongs to the Android app, the com.x.abc belongs to the iOS app.
I was having redirect_uri_mismatch error while using UnityGPGPlugin. I was using "123456789123" as my Application ID instead of "123456789123-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".
However, I manage to get through the Google Sign In page after changing all my setup to "123456789123-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" as my Application ID. Including the GPGApplicationID in Info.plist.
Sad to say that I am having another problem now, but at least that's how I manage to get through that error. :)

Error: Failed to load skin for error: NSURLError Domain

Does anyone know anything about this error: "Error: Failed to load skin for error: NSURLError Domain"
After trying to open a download link in order to reskin an app on an iPad, I get the above error. The interesting/annoying thing about this is that it is not followed by any error code, which is making it difficult to search for in the forums as all of the results that I get include an error code e.g.: "NSURLErrorDomain error -1012"
The re-skinning has worked for another skin, but not for the one I'm working on now.
Any ideas? Any recommendations for diagnostic tests etc.?
NSURLErrorDomain error -1012 is kCFURLErrorUserCancelledAuthentication, meaning that the server issued an authentication challenge that was subsequently rejected. Causes for rejection vary, but could be invalid password supplied, or because the authentication challenge was not handled at all. It's hard to say without seeing the code.
Have resolved this now. Turned out that the URL I was using was simply incorrect.

Dropbox iOS SDK: WebKit Discarded an Uncaught Exception

I am using the Dropbox iOS SDK (as of this writing, Cocoapod version 1.3.9). I noticed a strange bug. Here are the steps to reproduce it.
Connect to Dropbox, successfully sign in, and link to my account.
URL logged to the console (tokens masked for security):
db-abcdef123://1/connect?oauth_token=xyz123&oauth_token_secret=lmno123&uid=10884&state=91D8CB70-1037-4A4C-8F7B-CB8970E5E0BC
App linked successfully!
Sign out, then sign in with a different account...
URL logged to the console again, similar to the previous one:
db-abcdef123://1/connect?oauth_token=def123&oauth_token_secret=jkl123&uid=95157647&state=DC716BF2-E033-4586-926C-5E733CEA1E3F
Then comes the error:
*** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <Unsupported Signature Method> The signature method "(null)" is not currently support by MPOAuthConnection
[WARNING] DropboxSDK: error loading DBConnectController - Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo=0x12848f00 {NSErrorFailingURLStringKey=db-abcdef123://1/connect?oauth_token=123abc&oauth_token_secret=xyz123&uid=95157647&state=DC716BF2-E033-4586-926C-5E733CEA1E3F, NSErrorFailingURLKey=db-abcdef123://1/connect?oauth_token=123abc&oauth_token_secret=xyz123&uid=95157647&state=DC716BF2-E033-4586-926C-5E733CEA1E3F, NSLocalizedDescription=unsupported URL, NSUnderlyingError=0x144c4c80 "unsupported URL"}
The Dropbox login screen remains in the webView, and clicking Sign in again causes the same error but then makes the app crash.
Any ideas?
I'm using Xcode 5 and iOS 7
This is a known issue which will be fixed in the next release of the iOS Dropbox app (not the SDK).
EDIT: I misdiagnosed this based on the error message. The actual issue is likely that once you've initialized a DBRestClient, it continues to try to use the same user ID for authentication throughout its lifespan. If you unlink that user (even if you've added another user instead), it will fail to authenticate API calls because it no longer has credentials for that user.
The fix is to create a new DBRestClient when you switch to a new user.
This issue is present in the DBRoulette sample app. We're going to try to put in a fix for the next SDK release.

How do I get Geolocation API to work in Dartium?

I'm trying to test in Dartium browser using the Geolocation API. In particular I try doing the following
window.navigator
.geolocation.getCurrentPosition()
..then((pos) {
window.alert(pos.toString());
})
..catchError((PositionError error) {
window.alert("Error code: ${error.code}, Error message: ${error.message}");
})
..whenComplete(() => window.alert("complete"))
;
Ignoring the fact I'm using window.alert here, All I get is an error with the following message "Error code: 2, Error message: Network location provider at 'https://www.googleapis.com/' : Returned error code 400."
However the same code works in Google Chrome when I use "pub serve". It also works with Firefox. How do I overcome this error, and get it to work in Dartium? Is it even possible?
UPDATE
I took a look at the 403 bug and tried using the fix specified on this page http://www.chromium.org/developers/how-tos/api-keys, and when I first tried this, I got my credentials and setting wrong, I was getting a 403 error, but once that was resolved, and all the APIs enabled, plus the environment settings of
GOOGLE_API_KEY
GOOGLE_DEFAULT_CLIENT_ID
GOOGLE_DEFAULT_CLIENT_SECRET
I was back to "Network location provider at 'https://www.googleapis.com/' : Returned error code 400.", so I conclude it isn't the same issue. Though if someone can prove me wrong, I'd be happy.
FURTHER UPDATE
This is a bug. I've answered my own question below.
Maybe you are running into this issue
Geolocation giving 403 error
Should be fixable by providing Google API keys for Dartium
This is a bug.
I posted this question on https://groups.google.com/a/dartlang.org/forum/#!topic/web/UMJHJlQH7wc, where Seth Ladd asked me to open a bug.
I've opened a bug for this, https://code.google.com/p/dart/issues/detail?id=15866. So hopefully this will be resolved soon.

ACAccountStore Error 5

When attempting to save an account into an ACAccountStore, I sometimes receive this error. Later, if I attempt to access this account, I find that it's actually been saved. So far, I've yet to find any information about this nondescript error. Does anyone know what it means?
Error Domain=com.apple.accounts Code=5 "The operation couldn't be completed. (com.apple.accounts error 5.)"
This question is a little dated, but I'm struggling in the same area. Here's one thing that should help: I did find documentation on the error codes:
typedef enum ACErrorCode {
ACErrorUnknown = 1,
ACErrorAccountMissingRequiredProperty,
ACErrorAccountAuthenticationFailed,
ACErrorAccountTypeInvalid,
ACErrorAccountAlreadyExists,
ACErrorAccountNotFound,
ACErrorPermissionDenied,
ACErrorAccessInfoInvalid
} ACErrorCode;
I found this in the documentation under the Accounts.framework link.
Interpreting this gives error=5 being "Account already exists" and error=6 being "Account not found." I'm hopeful this makes the errors a little less "nondescript."
This error occurs because you didn't set the Facebook account in the settings. The settings are available in iOS 6. Set that account and then try again.
Also give proper alert message on error.
While I didn't find any documentation to support (or contradict) my findings, here is what seems be changed (since iOS 5):
In iOS 5, the user is prompted with access request even when there are no Twitter accounts setup. In iOS 6 it seems the request is declined with error code 6 when there are no accounts setup.
In iOS 5 the user is prompted again (and again) with access request if the user had previously disabled access to said account from Settings > Twitter. Now, in iOS 6, it seems access request is silently declined (with no error, i.e. nil error) if user has removed access to app from Settings
If anyone else finds a better answer, do comment, please.

Resources