on
$tns run ios
I have this interesting bit saying that my session expired, why is that if I am not using as I am aware anything from developerservices2.apple.com ?
Pod installation complete! There are 2 dependencies from the Podfile and 6 total pods installed.
Project successfully prepared (ios)
Building project...
Xcode build...
2020-02-25 17:25:15.195 xcodebuild[14933:1513031] DVTPortal: Service '<DVTPortalViewDeveloperService: 0x7ff1dad949c0; action='viewDeveloper'>' encountered an unexpected result code from the portal ('1100')
2020-02-25 17:25:15.195 xcodebuild[14933:1513031] DVTPortal: Error:
Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={
creationTimestamp = "2020-02-25T17:25:15Z";
httpCode = 200;
protocolVersion = QH65B2;
requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action";
responseId = "2db7642e-2968-41e4-b622-a343370951c9";
resultCode = 1100;
resultString = "Your session has expired. Please log in.";
userLocale = "en_US";
userString = "Your session has expired. Please log in.";
}, NSLocalizedDescription=Your session has expired. Please log in.}
2020-02-25 17:25:15.597 xcodebuild[14933:1513031] DVTPortal: Service '<DVTPortalViewDeveloperService: 0x7ff1dabb4480; action='viewDeveloper'>' encountered an unexpected result code from the portal ('1100')
2020-02-25 17:25:15.597 xcodebuild[14933:1513031] DVTPortal: Error:
Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={
creationTimestamp = "2020-02-25T17:25:15Z";
httpCode = 200;
protocolVersion = QH65B2;
requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action";
responseId = "214edf34-9ad8-471c-8207-fd361198ad8f";
resultCode = 1100;
resultString = "Your session has expired. Please log in.";
userLocale = "en_US";
userString = "Your session has expired. Please log in.";
}, NSLocalizedDescription=Your session has expired. Please log in.}
Xcode build...
Related
I am using QuickBlox iOS SDK (version 2.9.2) and got a failure with error code 422 when calling
[QBRequest createObject:qbcoCustomObject successBlock:^(QBResponse *response, QBCOCustomObject *object) {
} errorBlock:^(QBResponse *response) {
}];
It happens OCCASIONALLY and does not resume until I logout and login QuickBlox again.
The error message is as follows:
2017-04-24 06:18:45.855557 App[8720:4958563] [QBCore] Response error: Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: client error (422)" UserInfo={com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x17422ed40> { URL: https://api.quickblox.com/data/MyCircleComments.json } { status code: 422, headers {
"Access-Control-Allow-Origin" = "*";
"Cache-Control" = "no-cache";
Connection = "keep-alive";
"Content-Length" = 45;
"Content-Type" = "application/json; charset=utf-8";
Date = "Mon, 24 Apr 2017 12:18:45 GMT";
"QB-Token-ExpirationDate" = "2017-04-24 14:09:35 +0000";
"QuickBlox-REST-API-Version" = "0.1.1";
Server = "openresty/1.9.15.1";
Status = "422 Unprocessable Entity";
"X-Rack-Cache" = "invalidate, pass";
"X-Request-Id" = 89f509abd6fd7f61d02e34ae9e83ce70;
"X-Runtime" = "0.009477";
"X-UA-Compatible" = "IE=Edge,chrome=1";
} }, NSErrorFailingURLKey=https://api.quickblox.com/data/MyCircleComments.json, com.alamofire.serialization.response.error.data=<7b226572 726f7273 223a7b22 62617365 223a5b22 466f7262 69646465 6e2e204e 65656420 75736572 2e225d7d 7d>, NSLocalizedDescription=Request failed: client error (422)}
2017-04-24 06:18:45.856659 App[8720:4958563] [QBCore] Response error reasons: {
errors = {
base = (
"Forbidden. Need user."
);
};
}
Due to the fact that it resumes only after I logout and login again, I was thinking that it may be related to session expiry. I added login method at the app's didFinishLaunching and didBecomeActive so that the app will automatically re-login to make sure the login session be valid. The login method I use is
[QBRequest logInWithUserLogin:sUsername password:sPassword successBlock:^(QBResponse *response, QBUUser *user) {
} errorBlock:^(QBResponse *response) {
}];
and by setting breakpoints I am sure each time the auto relogin did succeed.
However, app's auto-relogin does not work. The failure still happens occasionally and the only way out is logout and login manually.
I googled this issue and found a bunch of topic but none seems to meet my problem. (One post suggests that the time of device may not be synchronized but actually my iPhone is using the network time.)
Can anyone give me a hint why it fails and a solution is highly appreciated. Thanks in advance.
One of the best answer for above issue:-
**"Bad timestamp means that you send invalid timestamp value on session creation, which is based on your phone time. Your device time shouldn't differ from server more than 2 hours.
We suggest you synchronize time on your devices with NTP service or just set tick 2 checkboxes in Settings in your device: Automatic date & time and Automatic time zone.
Hope this help"**
Ref :- https://github.com/QuickBlox/quickblox-ios-sdk/issues/452
From setting of the device set timezone automatic on.
Hope this will help you.
Try to get Quickblox session token
[[[QBSession currentSession] sessionDetails] token];
And check session type via REST API
//QuickBlox Documentation
curl -X GET \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-H "QB-Token: 8b75a6c7191285499d890a81df4ee7fe49bc732a" \
https://api.quickblox.com/session.json
If field "user_id" of your token will be equal to 0 this mean that you have "application-token" type, and you cannot create or update items on QBlox, after login with session token "upgrades" to "user-token"
I have similar issue, and i made extra check, if token-type is application, then you need login with same user again (recursively call login method if you can), i know that its a workaround, but we cant dig deeper because all locked in Quickblox.framework
I have been able to authenticate with the Pinterest API on both the javascript and Android SDK. On iOS, I've triple-checked all of my settings to make sure I've configured everything according to the documentation.
However, when I log in through iOS, I am taken to the Pinterest app to authorize and all looks good. However, when Pinterest passes me back to my app, I am getting the following login error:
Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: unauthorized (401)" UserInfo={com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x17403dea0> { URL: https://api.pinterest.com/v1/oauth/inspect?access_token=AYalMni-yTq5Y0UihwETrFxZpzL5FK2tXvfmkbhDyJ_OP8BGeQAAAAA&token=AYalMni-yTq5Y0UihwETrFxZpzL5FK2tXvfmkbhDyJ_OP8BGeQAAAAA } { status code: 401, headers {
Age = 0;
"Cache-Control" = private;
Connection = "keep-alive";
"Content-Length" = 177;
"Content-Type" = "application/json";
Date = "Mon, 20 Mar 2017 19:21:15 GMT";
"Pinterest-Generated-By" = "devplatform-devapi-prod-0a01239b";
"Pinterest-Version" = 918ef75;
"X-Content-Type-Options" = nosniff;
"X-Pinterest-RID" = 280542321780;
} }, NSErrorFailingURLKey=https://api.pinterest.com/v1/oauth/inspect?access_token=AYalMni-yTq5Y0UihwETrFxZpzL5FK2tXvfmkbhDyJ_OP8BGeQAAAAA&token=AYalMni-yTq5Y0UihwETrFxZpzL5FK2tXvfmkbhDyJ_OP8BGeQAAAAA, com.alamofire.serialization.response.error.data=<7b227374 61747573 223a2022 6661696c 75726522 2c202263 6f646522 3a20332c 2022686f 7374223a 20226465 76706c61 74666f72 6d2d6465 76617069 2d70726f 642d3061 30313233 3962222c 20226765 6e657261 7465645f 6174223a 20224d6f 6e2c2032 30204d61 72203230 31372031 393a3231 3a313520 2b303030 30222c20 226d6573 73616765 223a2022 41757468 6f72697a 6174696f 6e206661 696c6564 2e222c20 22646174 61223a20 6e756c6c 7d>, NSLocalizedDescription=Request failed: unauthorized (401)}
I tried taking the access token referred to in the error response and using the token debugger on the Pinterest developer site to check it, but when I did so I got the message "An error occurred. Please try again."
So, I'm stumped. It seems to me that the access token that's being generated on iOS login is being seen as invalid by Pinterest, but I don't know how to fix that.
Do you have any thoughts on what can be done to resolve this?
I am trying to configure basic login / password authentication for p2p replication.
Replication works fine with no authentication. So I pretty sure my issue relates to authentication configuration.
CBListener configuration:
login = "my_login"
password = "my_password"
listener = CBLListener(manager: CBLManager.sharedInstance(), port: 55555)
listener.setBonjourName(netServiceName, type: netServiceType)
listener.readOnly = true
listener.setPasswords([login : password])
try! listener.start()
CBLReplication configuration:
let netService: NetService = ... // Got from NetServiceBrowserDelegate and NetServiceDelegate
let components = NSURLComponents()
components.scheme = "http"
components.host = netService.hostName
components.port = NSNumber(value: 55555)
components.path = "/" + database.name
components.user = login
components.password = password
let newReplication = database.createPullReplication(components.url!)
newReplication.continuous = true
newReplication.start()
Here is what I am getting in Xcode console:
CBLRestPuller[http://my_login:*****#Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net]: Going online
CBLRestPuller[http://my_login:*****#Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net]: No local checkpoint; not getting remote one
CBLRestPuller[http://my_login:*****#Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net] Progress: set active = 1
CBLReplication[from http://my_login:*****#Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net]: active, progress = 0 / 0, err: (null)
nil
CBLRestPuller[http://my_login:*****#Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net]: Reachability state = :reachable (20002), suspended=0
: HTTP auth failed; sent Authorization: Basic bXlfbG9naW46bXlfcGFzc3dvcmQ= ; got WWW-Authenticate: Digest realm="CouchbaseLite", qop="auth", nonce="69773230-683C-4DCC-AB40-A21527A1F911"
CBLSocketChangeTracker[0x127d63810 sg_to_firstfoundry_net]: Can't connect, giving up: CBLHTTP[401, http://my_login:*****#Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net/_changes?feed=normal&heartbeat=300000&style=all_docs]<--NSURLError[-1013, http://my_login:*****#Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net/_changes?feed=normal&heartbeat=300000&style=all_docs]
CBLRestPuller[http://my_login:*****#Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net]: ChangeTracker stopped; error=CBLHTTP[401, http://my_login:*****#Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net/_changes?feed=normal&heartbeat=300000&style=all_docs]<--NSURLError[-1013, http://my_login:*****#Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net/_changes?feed=normal&heartbeat=300000&style=all_docs]
I think the most important log here is this line:
: HTTP auth failed; sent Authorization:
Basic bXlfbG9naW46bXlfcGFzc3dvcmQ= ; got WWW-Authenticate: Digest
realm="CouchbaseLite", qop="auth",
nonce="69773230-683C-4DCC-AB40-A21527A1F911"
Alternatively I tried to use CBLAuthenticator instead of injecting login/password into url. Still doesn't work, however I am getting different error messages in log:
What is changed:
// Added:
newReplication.authenticator = CBLAuthenticator.basicAuthenticator(withName: login, password: password)
// Removed:
components.user = login
components.password = password
Here is what I am getting in Xcode console after updating the code:
CBLRestPuller[http://Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net]: Going online
CBLRestPuller[http://Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net] Progress: set active = 1
CBLRestPuller[http://Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net]: Successfully logged in!
RemoteRequest: Added Authorization header for CBLPasswordAuthorizer[my_login/****]
CBLRemoteJSONRequest[GET http://Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net/_local/b3f625c9bddabfb59ee49d78f3bb484a5876b486]: Starting...
DEALLOC CBLRemoteLogin[http://Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net]
2017-02-20 16:51:28.335 Union Dev[1922:1702832] RemoteRequest: CBLRemoteSession starting CBLRemoteJSONRequest[GET http://Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net/_local/b3f625c9bddabfb59ee49d78f3bb484a5876b486]
Sync: CBLReplication[from http://Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net]: active, progress = 0 / 0, err: (null)
nil
CBLRestPuller[http://Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net]: Reachability state = :reachable (20002), suspended=0
RemoteRequest: Got challenge for CBLRemoteJSONRequest[GET http://Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net/_local/b3f625c9bddabfb59ee49d78f3bb484a5876b486]: method=NSURLAuthenticationMethodHTTPDigest, err=(null)
RemoteRequest: challenge: (phase 3) continueWithoutCredential
Sync: CBLRestPuller[http://Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net]: Server is (null)
RemoteRequest: CBLRemoteJSONRequest[GET http://Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net/_local/b3f625c9bddabfb59ee49d78f3bb484a5876b486]: Got response, status 401
CBLRemoteJSONRequest[GET http://Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net/_local/b3f625c9bddabfb59ee49d78f3bb484a5876b486]: Got error CBLHTTP[401, "unauthorized", http://Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net/_local/b3f625c9bddabfb59ee49d78f3bb484a5876b486]
Sync: CBLRestPuller[http://Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net]: Error fetching last sequence: CBLHTTP[401, "unauthorized", http://Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net/_local/b3f625c9bddabfb59ee49d78f3bb484a5876b486]
Sync: CBLRestPuller[http://Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net] Progress: set error = CBLHTTP[401, "unauthorized", http://Uladzimir-Papkos-iPad.local.:55555/sg_to_firstfoundry_net/_local/b3f625c9bddabfb59ee49d78f3bb484a5876b486]
Could anybody point me to place where I am doing something wrong?
After having conversation with Couchbase engineers it was decided that the best solution here is to enable secure http connection, since it doesn't make sense to send login / password through insecure http request.
The easiest (not most secure) way to enable https is to do next:
// Change url to https
components.scheme = "https"
// Inject self-signed generated on the fly certificate into CBLListener
try listener.setAnonymousSSLIdentityWithLabel("use_any_string_here")
More information about configuring https connection for p2p replication is available here.
The Facebook SDK for iOS worked great until now. Since 2 hours ago, I'm constantly receiving the following error message when I'm trying to log in with Facebook:
Error Domain=com.facebook.sdk.core Code=8 "(null)" UserInfo={NSRecoveryAttempter=<_FBSDKTemporaryErrorRecoveryAttempter: 0x7fb060edae20>, com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorCode=2, NSLocalizedRecoverySuggestion=Momentan serverul este ocupat. Te rugăm să încerci din nou., com.facebook.sdk:FBSDKErrorDeveloperMessageKey=An unexpected error has occurred. Please retry your request later., com.facebook.sdk:FBSDKGraphRequestErrorHTTPStatusCodeKey=500, com.facebook.sdk:FBSDKGraphRequestErrorCategoryKey=1, NSLocalizedRecoveryOptions=<CFArray 0x7fb0638b71b0 [0x10c2fea40]>{type = immutable, count = 1, values = (
0 : OK
)}, com.facebook.sdk:FBSDKGraphRequestErrorParsedJSONResponseKey={
body = {
error = {
code = 2;
"fbtrace_id" = Et3O2yEtpV7;
"is_transient" = 1;
message = "An unexpected error has occurred. Please retry your request later.";
type = OAuthException;
};
};
code = 500;
}}
I have verified:
The bundle ID is correct
The parameters are correct - id,email,name,gender,birthday,picture.width(1080).height(1080),bio,location,friends
The SDK is correctly installed (info.plist with all the requirements - fb{app-id} etc)
All the methods inside the AppDelegate are added and are correctly updated for iOS 9
What should I do? I have tested the SDK on another app and there it's working.
I logged into my app using my FB credentials via the standard Parse SDK instructions. All worked fine, until I was playing with the phone settings and decided to switch off the application's fb authorization in the privacy settings in my phone.
I then couldn't log into the app using my FB credentials anymore. So I tried to remove the app from my facebook apps via facebook.com and waited a while, but still I get error:
com.facebook.sdk:ParsedJSONResponseKey={
body = {
error = {
code = 190;
"error_subcode" = 458;
message = "Error validating access token: The user has not authorized application xxxxxx.";
type = OAuthException;
};
};
code = 400;
headers = (
{
name = "Access-Control-Allow-Origin";
value = "*";
},
{
name = "Content-Type";
value = "text/javascript; charset=UTF-8";
},
{
name = Pragma;
value = "no-cache";
},
{
name = Vary;
value = "Accept-Encoding";
},
{
name = "Cache-Control";
value = "no-store";
},
{
name = "WWW-Authenticate";
value = "OAuth \"Facebook Platform\" \"invalid_token\" \"Error validating access token: The user has not authorized
application xxxxxxxxx.\"";
},
{
name = Expires;
value = "Sat, 01 Jan 2000 00:00:00 GMT";
}
); }}
I ended up solving the issue on my phone by resetting my privacy settings. Its an issue with iOS for not flushing the privacy settings once a user de-authorizes the application. It should have just asked for permission but the didn't.