ejabberd ACME unexpected content type when it receives certificate - ejabberd

I am running a processone/ejabberd container that i am trying to get to request a certificate via ACME to a smallstep ca container. The request fails with this error:
#{<<"kid">> =>
<<"https://ca.mydomain.local:8000/acme/acme/account/svUkT7QwXD4pBqyrVdys94VMeVCeeo0D">>,
<<"nonce">> =>
<<"..">>,
<<"url">> =>
<<"https://ca.mydomain.local:8000/acme/acme/certificate/Jks2zJjdJwqDzE7VSsLM0TOaAzzYUB2P">>}}
2022-11-07 08:30:28.355858+00:00 [debug] HTTP request: {post,{"https://ca.mydomain.local:8000/acme/acme/certificate/Jks2zJjdJwqDzE7VSsLM0TOaAzzYUB2P",
[],"application/jose+json",
<<"{\"signature\":\"....\",\"protected\":\"......\",\"payload\":\"\"}">>}}
2022-11-07 08:30:28.608072+00:00 [debug] HTTP response: {{"HTTP/1.1",200,"OK"},
[{"cache-control","no-store"},
{"date","Mon, 07 Nov 2022 08:30:28 GMT"},
{"content-length","2108"},
{"content-type",
"application/pem-certificate-chain; charset=utf-8"},
{"link",
"<https://ca.mydomain.local:8000/acme/acme/directory>;rel=\"index\""},
{"replay-nonce",
".."}],
<<"-----BEGIN CERTIFICATE-----........\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----........\n-----END CERTIFICATE-----\n">>}
2022-11-07 08:30:28.609162+00:00 [error] Failed to request certificate for jabber-gw.mydomain.me: HTTP error: unexpected content type: application/pem-certificate-chain; charset=utf-8
2022-11-07 08:30:28.609456+00:00 [debug] Unregistering ACME challenge #Ref<0.1802325958.1657798659.124306>
2022-11-07 08:35:26.914567+00:00 [debug] Error when retrieving http headers gen_tcp: timeout
Any ideas on why its not happy with the content type and how to resolve?
Prior to the error message, the logs show what looks like a successful ACME challenge:
[<<".well-known">>,<<"acme-challenge">>,
<<"3rNIelLxSuDU0tWZgb3yEw5sL6d6Z61J">>] matches [<<".well-known">>,
<<"acme-challenge">>]
2022-11-04 04:28:12.436337+00:00 [debug] Received ACME challenge request for token: blah
2022-11-04 04:28:12.546710+00:00 [debug] HTTP response: {{"HTTP/1.1",200,"OK"},
The smallstep container was built with this great blog.

Related

Ejabberd api set_vcard database_failure

When I use the following command for the ejabberd API I get the following response;
curl -ik -X POST -H 'Authorization: Bearer xxxxxxxxxxx' https://localhost:5280/api/set_vcard -d '{"user":"foo","host":"example.com","name":"FN","content":"foobar"}'
HTTP/1.1 400 Bad Request
Content-Length: 18
Content-Type: application/json
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Content-Type, Authorization, X-Admin
"database_failure"
On the ejabberd log (level 5) I see this;
[info] (<0.607.0>) Accepted connection ::ffff:172.18.0.1:46622 -> ::ffff:172.18.0.3:5280
[debug] S: [{[<<"ws">>],ejabberd_http_ws},{[<<"bosh">>],mod_bosh},{[<<"oauth">>],ejabberd_oauth},{[<<"api">>],mod_http_api},{[<<"admin">>],ejabberd_web_admin}]
[debug] ({tlssock,#Port<0.18819>,#Ref<0.650175335.3240493057.203147>}) http query: 'POST' <<"/api/set_vcard">>
[debug] client data: <<"{\"user\":\"foo\",\"host\":\"example.com\",\"contents\":[\"FN:foobar\"]}">>
[debug] [<<"api">>,<<"set_vcard">>] matches [<<"api">>]
[info] API call set_vcard [{<<"user">>,<<"foo">>},{<<"host">>,<<"example.com">>},{<<"contents">>,[<<"FN:foobar">>]}] from ::ffff:172.18.0.1:46622
[debug] Command 'set_vcard' execution allowed by rule 'api service' (CallerInfo=#{caller_module => mod_http_api,caller_server => <<"example.com">>,ip => {0,0,0,0,0,65535,44050,1},oauth_scope => [<<"ejabberd:api-service">>],usr => {<<"admin">>,<<"example.com">>,<<>>}})
[debug] Executing command mod_admin_extra:set_vcard with Args=[<<"foo">>,<<"example.com">>,<<>>,<<>>,[<<"FN:foobar">>]]
It is using MySQL as a database (working fine for everything else) however when I watch the database general query log I don't see my API request trigger any queries. I see all the other normal ejabberd queries so there isn't a problem with the db connection and as mentioned earlier everything else works.
$ ejabberdctl status
The node ejabberd#e87da11aa894 is started with status: started
ejabberd 18.4.0 is running in that node
Does anyone have any clues they can throw my way? I've ran out of leads on what could be the issue.
!!! EDIT !!!
Work around
As mentioned in https://github.com/processone/ejabberd/issues/2629 other people have experienced this issue. Changing config to disable the cache and clearing the vcard table in the database seems to be a work around;
SQL:
DELETE FROM vcard;
Config:
...
mod_vcard:
search: false
use_cache: false
...
The API is fairly permissive in what it allows, however once it's in the database the record will fail to load.
For 'set_vcard', the 'name 'is the field name you wish to alter and the content is the contents of that field.
{
"user": "catman",
"host": "the.host",
"name": "FN",
"content": "Cat Man"
}
ejabberd also caches queries, so once you have a barfed record it'll return 'database_failed' even if you've corrected your api call or fixed it in the database by hand. Caching can be disabled under the modules configuration.
Notice in your log that it says:
[debug] client data: <<"{\"user\":\"foo\",\"host\":\"example.com\",\"contents\":[\"FN:foobar\"]}">>
How can it be that contents is FN:foobar? I installed 18.04, setup mysql storage, and running this query:
$ curl -v -H "X-Admin: true" -H "Content-Type:application/json" http://localhost:5280/api/set_vcard -d '{"user":"user1","host":"localhost","name":"FN","content":"mi nombre curllll"}'
The log says:
21:42:29.638 [info] (<0.487.0>) Accepted connection 127.0.0.1:58412 -> 127.0.0.1:5280
21:42:29.638 [debug] S: [{[<<"api">>],mod_http_api},{[<<"bosh">>],mod_bosh},{[<<"oauth">>],ejabberd_oauth},{[<<"presence">>],mod_webpresence},{[<<"register">>],mod_register_web},{[<<"rest">>],mod_rest},{[<<"ws">>],ejabberd_http_ws},{[<<"admin">>],ejabberd_web_admin}]
21:42:29.639 [debug] (#Port<0.18079>) http query: 'POST' <<"/api/set_vcard">>
21:42:29.639 [debug] client data: <<"{\"user\":\"user1\",\"host\":\"localhost\",\"name\":\"FN\",\"content\":\"mi nombre curllll\"}">>
21:42:29.639 [debug] [<<"api">>,<<"set_vcard">>] matches [<<"api">>]
21:42:29.639 [info] API call set_vcard [{<<"user">>,<<"user1">>},{<<"host">>,<<"localhost">>},{<<"name">>,<<"FN">>},{<<"content">>,<<"mi nombre curllll">>}] from 127.0.0.1:58412
21:42:29.640 [debug] Command 'set_vcard' execution allowed by rule 'test commands' (CallerInfo=#{caller_module => mod_http_api,ip => {127,0,0,1}})
21:42:29.640 [debug] Executing command mod_admin_extra:set_vcard with Args=[<<"user1">>,<<"localhost">>,<<"FN">>,<<"mi nombre curllll">>]
21:42:29.640 [debug] SQL: "select vcard from vcard where username='user1' and 0=0"
21:42:29.642 [debug] SQL: "begin;"
21:42:29.642 [debug] SQL: "UPDATE vcard SET vcard='<vCard xmlns=''vcard-temp''><FN>mi nombre curllll</FN><N><FAMILY>mi familia11</FAMILY></N><NICKNAME>mi apodoooooooooooooooooooo11</NICKNAME><PHOTO><BINVAL>R0lGODlhDwAPAJECAP//AAAAAP///wAAACH5BAEAAAIALAAAAAAPAA8AAAIulB2Zx5IA4WIhWnnqvQFJDTyhE4khaG5Wqn4tp4ErFnMY+Sll9naUfGpkFL5DAQA7</BINVAL><TYPE>image/gif</TYPE></PHOTO></vCard>' WHERE username='user1'"
21:42:29.644 [debug] SQL: "UPDATE vcard_search SET username='user1', fn='mi nombre curllll', lfn='mi nombre curllll', family='mi familia11', lfamily='mi familia11', given='', lgiven='', middle='', lmiddle='', nickname='mi apodoooooooooooooooooooo11', lnickname='mi apodoooooooooooooooooooo11', bday='', lbday='', ctry='', lctry='', locality='', llocality='', email='', lemail='', orgname='', lorgname='', orgunit='', lorgunit='' WHERE lusername='user1'"
21:42:29.658 [debug] SQL: "commit;"

Artifactory Create Repository Rest API does not work

I have Artifactory pro license, and as the following pages provide, I called rest api.
https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-CreateRepository
I have verified that all other APIs such as repository listing, account creation and listing works normally, but I have confirmed that the repository creation api does not work with 400 errors.
I wanted to see the error by changing the log level, but there was no information about why there was a 400 error at the trace log level.
Below are related logs:
2018-06-15 10:31:34,028 [http-nio-8081-exec-15] [TRACE] (o.a.a.d.r.DockerV2AuthenticationFilter:84) - DockerV2AuthenticationFilter path: /api/repositories/newrepo
2018-06-15 10:31:34,028 [http-nio-8081-exec-15] [DEBUG] (o.a.w.s.a.AuthenticationFilterUtils:105) - Entering ArtifactorySsoAuthenticationFilter.getRemoteUserName
2018-06-15 10:31:34,028 [http-nio-8081-exec-15] [DEBUG] (o.a.w.s.AccessFilter:299) - Cached key has been found for request: '/artifactory/api/repositories/newrepo' with method: 'PUT'
2018-06-15 10:31:34,028 [http-nio-8081-exec-15] [TRACE] (o.a.s.PasswordDecryptingManager:95) - Received authentication request for org.artifactory.security.props.auth.PropsAuthenticationToken#3dc5bccf: Principal: null; Credentials: [PROTECTED]; Authenticated: false; Details: org.springframework.security.web.authentication.WebAuthenticationDetails#b364: RemoteIpAddress: {IP}; SessionId: null; Not granted any authorities
2018-06-15 10:31:34,029 [http-nio-8081-exec-15] [DEBUG] (o.j.a.c.h.AccessHttpClient:109) - Executing : GET http://localhost:8040/access/api/v1/users/?cd=apiKey_shash%3DGprGDe&exactKeyMatch=false
2018-06-15 10:31:34,035 [http-nio-8081-exec-15] [DEBUG] (o.a.w.s.AccessFilter:305) - Header authentication org.artifactory.security.props.auth.PropsAuthenticationToken#c20ca8df: Principal: admin; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails#b364: RemoteIpAddress: {IP}; SessionId: null; Granted Authorities: admin, user found in cache.
2018-06-15 10:31:34,035 [http-nio-8081-exec-15] [DEBUG] (o.a.w.s.RepoFilter :100) - Entering request PUT (10.191.128.129) /api/repositories/newrepo.
2018-06-15 10:31:34,038 [http-nio-8081-exec-15] [DEBUG] (o.a.w.s.RepoFilter :188) - Exiting request PUT (10.191.128.129) /api/repositories/newrepo
Updated
My Artifactory Version: 6.0.2
Reponse Message from Artifactory:
{
"errors" : [ {
"status" : 400,
"message" : "No valid type of repository found.\n"
} ]
}
Repository Create JSON Message*:
{
"key": "newrepo",
"rclass: "local",
"packageType": "docker",
"dockerApiVersion": "V2",
"includesPattern": "**/*",
"excludesPattern": "",
"repoLayoutRef": "simple-default",
"description": "",
"checksumPolicyType": "client-checksums",
"blackedOut": false,
"propertySets": ["artifactory"]
}
The error in this block is on purpose, and the code highlighting finds it quite nicely, but when this post was originally made, highlighting was not available on SO.
In your JSON you are missing " after the rclass.
You wrote ' "rclass: ' and it should be ' "rclass": '
Once fixing this the command should work properly.
Good luck :)
curl -iuadmin:password -X PUT http://localhost:8081/artifactory/api/repositories/newrepo -H "Content-type:application/vnd.org.jfrog.artifactory.repositories.LocalRepositoryConfiguration+json" -T repo_temp.json
HTTP/1.1 100 Continue
HTTP/1.1 200 OK
Server: Artifactory/5.11.0
X-Artifactory-Id: bea9f3f68aa06e62:4db81752:1643a9cff9e:-8000
Content-Type: text/plain
Transfer-Encoding: chunked
Date: Tue, 26 Jun 2018 06:57:24 GMT
Successfully created repository 'newrepo'
repo_temp.json:
{
"key": "newrepo",
"rclass": "local",
"packageType": "docker",
"dockerApiVersion": "V2",
"includesPattern": "**/*",
"excludesPattern": "",
"repoLayoutRef": "simple-default",
"description": "",
"checksumPolicyType": "client-checksums",
"blackedOut": false,
"propertySets": ["artifactory"]
}
This error is (somehow) returned by Artifactory if the content-type header contains the charset, for example: Content-Type: application/json; charset=UTF-8
Try with simply Content-Type: application/json

Switching to webview context will got exception "chrome not reachable" after resetApp

Environment
Appium : 1.6.4
OS : Ubuntu 16.04 64bit
Node.js : 7.9.0
Android : 5.1
Device :1501-M02
API :java
Appium CLI
Details
I am using spock as test framework,with blow code:
class Test{
AndroidDriver<RemoteWebElement> driver;
DesiredCapabilities cap=DesiredCapabilities.android();
........
def setup(){
//setup driver
.....
cap.setCapability(NO_RESET, "true");
cap.setCapability(FULL_RESET, "false");
.....
cap.setCapability(RECREATE_CHROME_DRIVER_SESSIONS, "true");
.......
driver.context("WEBVIEW_com.domain.pkg");
}
def "test1"(){}
def "test2"(){}
def cleanup(){
driver.resetApp();
}
}
In eclipse,If right clicking test1 or test2->run as->junit test,both two run as expected,but if right clicking Test(class)->run as->junit test,the first test works,and the second test will throw exception:
org.openqa.selenium.WebDriverException: chrome not reachable
(Session info: webview=39.0.0.0)
(Driver info: chromedriver=2.28.455506
if replacing cleanup() with this:
def cleanup(){
driver.quit();
}
all works as expected,but each test will reinitialize a lot of staff which wastes huge time,
so
driver.resetApp()
not work as expected,is this a bug or do I do something wrong?
appium log like this:
[debug] [ADB] Running '/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","MB8DW44999999999","shell","am","force-stop","com.vsi.pd.doctor"]
[debug] [MJSONWP] Responding to client with driver.closeApp() result: null
[HTTP] <-- POST /wd/hub/session/ebe4a8b1-844c-49f3-9997-9bc1bc0dd8a2/appium/app/close 200 1099 ms - 76
[HTTP] --> POST /wd/hub/session/ebe4a8b1-844c-49f3-9997-9bc1bc0dd8a2/appium/app/launch {}
[debug] [MJSONWP] Calling AppiumDriver.launchApp() with args: ["ebe4a8b1-844c-49f3-9997-9bc1bc0dd8a2"]
[AndroidDriver] No app sent in, not parsing package/activity
[debug] [AndroidDriver] No app capability. Assuming it is already on the device
[debug] [ADB] Device API level: 22
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","MB8DW44999999999","shell","am","start","-W","-n","com.vsi.pd.doctor/.MainActivity","-S","-a","android.intent.action.MAIN","-c","android.intent.category.LAUNCHER","-f","0x10200000"]
[debug] [MJSONWP] Responding to client with driver.launchApp() result: null
[HTTP] <-- POST /wd/hub/session/ebe4a8b1-844c-49f3-9997-9bc1bc0dd8a2/appium/app/launch 200 1987 ms - 76
[HTTP] --> POST /wd/hub/session/ebe4a8b1-844c-49f3-9997-9bc1bc0dd8a2/context {"name":"WEBVIEW_com.vsi.pd.doctor"}
[debug] [MJSONWP] Calling AppiumDriver.setContext() with args: ["WEBVIEW_com.vsi.pd.doctor","ebe4a8b1-844c-49f3-9997-9bc1bc0dd8a2"]
[debug] [AndroidDriver] Getting a list of available webviews
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","MB8DW44999999999","shell","cat","/proc/net/unix"]
[debug] [AndroidDriver] WEBVIEW_17929 mapped to pid 17929
[debug] [AndroidDriver] Getting process name for webview
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","MB8DW44999999999","shell","ps"]
[debug] [AndroidDriver] Parsed pid: 17929 pkg: com.vsi.pd.doctor!
[debug] [AndroidDriver] from: u0_a181,17929,274,1666480,109536,ffffffff,00000000,S,com.vsi.pd.doctor
[debug] [AndroidDriver] returning process name: com.vsi.pd.doctor
[debug] [AndroidDriver] Found webviews: ["WEBVIEW_com.vsi.pd.doctor"]
[debug] [AndroidDriver] Available contexts: ["NATIVE_APP","WEBVIEW_com.vsi.pd.doctor"]
[debug] [MJSONWP] Responding to client with driver.setContext() result: null
[HTTP] <-- POST /wd/hub/session/ebe4a8b1-844c-49f3-9997-9bc1bc0dd8a2/context 200 117 ms - 76
[HTTP] --> POST /wd/hub/session/ebe4a8b1-844c-49f3-9997-9bc1bc0dd8a2/element {"using":"id","value":"login"}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[debug] [JSONWP Proxy] Proxying [POST /wd/hub/session/ebe4a8b1-844c-49f3-9997-9bc1bc0dd8a2/element] to [POST http://127.0.0.1:8000/wd/hub/session/eb87d1b86ef6331102013b50ee2c0ea4/element] with body: {"using":"id","value":"login"}
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"eb87d1b86ef6331102013b50ee2c0ea4","status":100,"value":{"message":**"chrome not reachable**\n (Session info: webview=39.0.0.0)\n (Driver info: chromedriver=2.28.455506 (18f6627e265f442aeec9b6661a49fe819aeeea1f),platform=Linux 4.4.0-75-generic x86_64)"}}
[JSONWP Proxy] Replacing sessionId eb87d1b86ef6331102013b50ee2c0ea4 with ebe4a8b1-844c-49f3-9997-9bc1bc0dd8a2
[HTTP] <-- POST /wd/hub/session/ebe4a8b1-844c-49f3-9997-9bc1bc0dd8a2/element 200 13 ms - 269
[HTTP] --> POST /wd/hub/session/ebe4a8b1-844c-49f3-9997-9bc1bc0dd8a2/appium/app/close {}
[debug] [MJSONWP] Calling AppiumDriver.closeApp() with args: ["ebe4a8b1-844c-49f3-9997-9bc1bc0dd8a2"]
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","MB8DW44999999999","shell","am","force-stop","com.vsi.pd.doctor"]
[debug] [MJSONWP] Responding to client with driver.closeApp() result: null
With new UIautomator you don't need to switch your driver to webview. It has built in capabilities to identify the elements inside webView.
Please update your Android SDK once.
Elements inside WebView will be visible in UIAutomator for Android Version 6.0+ versions. However, once you automate the script for Android 6.0+ device, you can use the same script for Android version below 6.0.
And also you can see the elements inside webView on Android 6.0+ devices using UIAutomator.

mobilefirst ios error crashing my app

when I make a request to a url, sometimes i get a 403 response and the app crashes
I have edited my entitlements-Release.plist and entitlements-debug.plist so that they contain:
key-chain-access-groups: Array
item 0: $(AppIdentifierPrefix)worklight.group
this step let me make the call a few more times, but eventually crashed my app again
mfp -v 7.1.0.00.20151227-1730
2016-01-21 12:41:49.332 kmf[2236:1264285] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/11/14 16:38:36
2016-01-21 12:41:49.362 kmf[2236:1266048] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] +[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:52 :: Request url is http://sdc01dcxp01.keybank.com:16131/kmf/adapters/kttAdapter/mfp/itemAdd
2016-01-21 12:41:49.372 kmf[2236:1266048] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:320 :: Starting the request with URL http://sdc01dcxp01.keybank.com:16131/kmf/adapters/kttAdapter/mfp/itemAdd
2016-01-21 12:41:50.296 kmf[2236:1264285] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:352 :: Request Failed
2016-01-21 12:41:50.298 kmf[2236:1264285] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:353 :: Response Status Code : 403
2016-01-21 12:41:50.308 kmf[2236:1264285] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:354 :: Response Error : Request failed: forbidden (403)
2016-01-21 12:41:50.316 kmf[2236:1264285] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/11/14 16:38:36
2016-01-21 12:41:50.327 kmf[2236:1264285] THREAD WARNING: ['WLApp'] took '11.582275' ms. Plugin should use a background thread.
2016-01-21 12:41:50.328 kmf[2236:1267145] [DEBUG] [NONE] Request [http://sdc01dcxp01.keybank.com:16131/kmf/authorization/v1/authorization]
2016-01-21 12:41:51.072 kmf[2236:1264285] [ERROR] [CERTIFICATE_MANAGER] +[WLCertManager generateKeyPair:withPublicKeyLabel:withKeySize:] in WLCertManager.m:222 :: generating keypair --> Failed
2016-01-21 12:41:51.121 kmf[2236:1264285] [FATAL] [WORKLIGHT] Uncaught Exception: Keychain returned the following status: -34018
2016-01-21 12:41:51.154 kmf[2236:1264285] *** Terminating app due to uncaught exception 'Unable to generate key pair.', reason: 'Keychain returned the following status: -34018'
*** First throw call stack:
(0x18374d900 0x182dbbf80 0x18374d848 0x10041217c 0x10041640c 0x1003f8428 0x100371670 0x1000e6860 0x1000e612c 0x18410244c 0x1837055f4 0x183705298 0x1837029ac 0x183631680 0x184b40088 0x1884a8d90 0x100088f88 0x1831d28b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
A web server may return a 403 Forbidden HTTP status code in response to a request from a client for a web page or resource to indicate that the server can be reached and understood the request, but refuses to take any further action. Status code 403 responses are the result of the web server being configured to deny access, for some reason, to the requested resource by the client.
entitlements-Release.plist and entitlements-debug.plist edits are alright so more clarification check out this link
mobilefirst native ios keychain wrapper issue

How to use the Fluent API of Apache HttpClient to read UTF-8 coded website?

String html = Request.Get("https://kokos.pl/")
.execute().returnContent().asString();
System.out.println(html);
What I obtain in the 12th line is:
<title>Szybkie po??yczki got??wkowe, po??yczki spo??eczno??ciowe - Kokos.pl</title>
while it should be:
<title>Szybkie pożyczki gotówkowe, pożyczki społecznościowe - Kokos.pl</title>
[DEBUG] DefaultClientConnection - Sending request: GET / HTTP/1.1
[DEBUG] headers - >> GET / HTTP/1.1
[DEBUG] headers - >> Host: kokos.pl
[DEBUG] headers - >> Connection: Keep-Alive
[DEBUG] headers - >> User-Agent: Apache-HttpClient/4.2.5 (java 1.5)
[DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 200 OK
[DEBUG] headers - << HTTP/1.1 200 OK
[DEBUG] headers - << Server: nginx
[DEBUG] headers - << Date: Thu, 01 Aug 2013 12:04:12 GMT
[DEBUG] headers - << Content-Type: text/html
[DEBUG] headers - << Connection: keep-alive
...
The response message returned by the server for this URI does not explicitly specify the charset of the content. In such cases HttpClient is forced to use the default charset encoding for HTTP content, which is ISO-8859-1 and not UTF-8.
Unfortunately the only way to override the default content charset used by fluent API is by using a custom response handler
ResponseHandler<String> myHandler = new ResponseHandler<String>() {
#Override
public String handleResponse(
final HttpResponse response) throws IOException {
return EntityUtils.toString(response.getEntity(), Consts.UTF_8);
}
};
String html = Request.Get("https://kokos.pl/").execute().handleResponse(myHandler);
System.out.println(html);