mobilefirst ios error crashing my app - xcode7

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

Related

Unable to switch to WEBVIEW in Appium v2 Beta in Android - Error: 'unable to connect to renderer'

Unable to switch to web view context in Appium v2.0.0-beta.46 and v2.0.0-beta.47
Same code working fine in Appium v1.22.3
Error:
Got response with status 500: {"value":{"error":"disconnected","message":"disconnected: unable to connect to renderer\n (failed to check if window was closed: disconnected: unable to connect to renderer
Code:
//Driver details
capability.setCapability("device", aDevice);
capability.setCapability("newCommandTimeout", 100000);
capability.setCapability("platformName", platform);
capability.setCapability("udid", aUdid);
capability.setCapability("appPackage", appPkg);
capability.setCapability("appActivity", appAct);
capability.setCapability("automationName", "UiAutomator2");
capability.setCapability("setWebContentsDebuggingEnabled", true);
AppiumDriver driver = new AndroidDriver(new URL(serverUrl), capability);
Set<String> contexts = ((SupportsContextSwitching) driver()).getContextHandles();
System.out.println("CONTEXT="+contexts); //prints CONTEXT=[NATIVE_APP, WEBVIEW_chrome]
for (String context : contexts) {
if (context.contains("WEBVIEW")) {
((SupportsContextSwitching) driver()).context(context);
break;
}
}
Exceptions:
io.appium.java_client.NoSuchContextException: An unknown server-side error occurred while processing the command. Original error: An unknown server-side error occurred while processing the command. Original error: disconnected: unable to connect to renderer
(failed to check if window was closed: disconnected: unable to connect to renderer)
(Session info: chrome=108.0.5359.79)
Build info: version: '4.6.0', revision: '79f1c02ae20'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '12.6', java.version: '11.0.10'
Driver info: io.appium.java_client.android.AndroidDriver
Command: [0b2b612b-473a-456b-a281-842d6e138aa9, switchToContext {name=WEBVIEW_chrome}]
Capabilities {appium:appActivity: com.tech.service..., appium:appPackage: com.tech.service..., appium:applicationCacheEnabled: false, appium:automationName: UIAutomator2, appium:databaseEnabled: false, appium:desired: {appActivity: com.tech.service..., appPackage: com.tech.service..., applicationCacheEnabled: false, automationName: UIAutomator2, device: Pixel 6, newCommandTimeout: 100000, platformName: android, setWebContentsDebuggingEnabled: true, udid: RXCABCD}, appium:device: Pixel 6, appium:deviceApiLevel: 31, appium:deviceManufacturer: samsung, appium:deviceModel: SM-G770F, appium:deviceName: RXCABCD, appium:deviceScreenDensity: 420, appium:deviceScreenSize: 1080x2400, appium:deviceUDID: RXCABCD, appium:javascriptEnabled: true, appium:locationContextEnabled: false, appium:networkConnectionEnabled: true, appium:newCommandTimeout: 100000, appium:pixelRatio: 2.625, appium:platformVersion: 12, appium:setWebContentsDebuggingEnabled: true, appium:statBarHeight: 90, appium:takesScreenshot: true, appium:udid: RXCABCD, appium:viewportRect: {height: 2091, left: 0, top: 90, width: 1080}, appium:warnings: {}, appium:webStorageEnabled: false, platformName: ANDROID}
Session ID: 0b2b612b-473a-456b-a281-842d6e138aa9
Appium Logs:
[debug] [AndroidDriver] Getting a list of available webviews
[debug] [ADB] Running '/Users/tech/Library/Android/sdk/platform-tools/adb -P 5037 -s RXCABCD shell cat /proc/net/unix'
[debug] [AndroidDriver] Parsed 1 active devtools socket: ["#chrome_devtools_remote"]
[debug] [AndroidDriver] Collecting CDP data of 1 webview
[debug] [AndroidDriver] Forwarding remote port chrome_devtools_remote to a local port in range 10900..11000
[debug] [AndroidDriver] You could use the 'webviewDevtoolsPort' capability to customize the starting port number
[debug] [ADB] Running '/Users/tech/Library/Android/sdk/platform-tools/adb -P 5037 -s RXCABCD forward tcp:10900 localabstract:chrome_devtools_remote'
[debug] [ADB] Removing forwarded port socket connection: 10900
[debug] [ADB] Running '/Users/tech/Library/Android/sdk/platform-tools/adb -P 5037 -s RXCABCD forward --remove tcp:10900'
[debug] [AndroidDriver] CDP data collection completed
[debug] [AndroidDriver] Found 1 webview: ["WEBVIEW_chrome"]
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] Available contexts: ["NATIVE_APP","WEBVIEW_chrome"]
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] Connecting to chrome-backed webview context 'WEBVIEW_chrome'
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] Identified chromeAndroidPackage as 'com.android.chrome' for context 'WEBVIEW_chrome' by CDP
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] A port was not given, using random free port: 8000
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] Passing web view details to the Chromedriver constructor: {
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] "info": {
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] "Android-Package": "com.android.chrome",
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] "Browser": "Chrome/108.0.5359.79",
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] "Protocol-Version": "1.3",
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] "User-Agent": "Mozilla/5.0 (Linux; Android 12; SM-G770F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36",
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] "V8-Version": "10.8.168.21",
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] "WebKit-Version": "537.36 (#5194e1e1073e30a8fc93c72c2aee4bc572f5b07a)",
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] "webSocketDebuggerUrl": "ws://127.0.0.1:10900/devtools/browser"
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] },
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] "process": {
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] "name": "chrome",
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] "id": null
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] }
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] }
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] Automated Chromedriver download is disabled. Use 'chromedriver_autodownload' server feature to enable it
[debug] [AndroidDriver] Precalculated Chromedriver capabilities: {
[debug] [AndroidDriver] "androidPackage": "com.android.chrome",
[debug] [AndroidDriver] "androidUseRunningApp": true,
[debug] [AndroidDriver] "androidDeviceSerial": "RXCABCD"
[debug] [AndroidDriver] }
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] Before starting chromedriver, androidPackage is 'com.android.chrome'
[debug] [Chromedriver#4fe7] Changed state to 'starting'
[debug] [Chromedriver#4fe7] Using the static Chromedriver->Chrome mapping
[debug] [Chromedriver#4fe7] The most recent known Chrome version: 108.0.5359
[debug] [Chromedriver#4fe7] Found 1 executable in '/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/chromedriver/mac'
[debug] [Chromedriver#4fe7] The following Chromedriver executables were found:
[debug] [Chromedriver#4fe7] '/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/chromedriver/mac/chromedriver_mac64_v108.0.5359.71' (version '108.0.5359.71', minimum Chrome version '108.0.5359')
[debug] [Chromedriver#4fe7] Browser version in the supplied details: Chrome/108.0.5359.79
[debug] [Chromedriver#4fe7] Found Chrome bundle 'undefined' version '108.0.5359'
[debug] [Chromedriver#4fe7] Found 1 executable capable of automating Chrome '108.0.5359'.
[debug] [Chromedriver#4fe7] Choosing the most recent, '/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/chromedriver/mac/chromedriver_mac64_v108.0.5359.71'.
[debug] [Chromedriver#4fe7] If a specific version is required, specify it with the chromedriverExecutabledesired capability.
[Chromedriver#4fe7] Set chromedriver binary as: /Users/tech/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/chromedriver/mac/chromedriver_mac64_v108.0.5359.71
[debug] [Chromedriver#4fe7] Killing any old chromedrivers, running: pkill -15 -f "/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/chromedriver/mac/chromedriver_mac64_v108.0.5359.71.*--port=8000"
[Chromedriver#4fe7] No old chromedrivers seem to exist
[debug] [Chromedriver#4fe7] Cleaning this device's adb forwarded port socket connections: RXCABCD
[debug] [ADB] List forwarding ports
[debug] [ADB] Running '/Users/tech/Library/Android/sdk/platform-tools/adb -P 5037 -s RXCABCD forward --list'
[Chromedriver#4fe7] Spawning chromedriver with: /Users/tech/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/chromedriver/mac/chromedriver_mac64_v108.0.5359.71 --port=8000 --adb-port=5037 --verbose
[debug] [Chromedriver#4fe7] Chromedriver version: '108.0.5359.71'
[debug] [Chromedriver#4fe7] Matched '/status' to command name 'getStatus'
[debug] [Chromedriver#4fe7] Proxying [GET /status] to [GET http://127.0.0.1:8000/status] with no body
[debug] [Chromedriver#4fe7] Got response with status 200: {"value":{"build":{"version":"108.0.5359.71 (1e0e3868ee06e91ad636a874420e3ca3ae3756ac-refs/branch-heads/5359#{#1016})"},"message":"ChromeDriver ready for new sessions.","os":{"arch":"x86_64","name":"Mac OS X","version":"12.6.0"},"ready":true}}
[Chromedriver#4fe7] Starting W3C Chromedriver session with capabilities: {
[Chromedriver#4fe7] "capabilities": {
[Chromedriver#4fe7] "alwaysMatch": {
[Chromedriver#4fe7] "goog:chromeOptions": {
[Chromedriver#4fe7] "androidPackage": "com.android.chrome",
[Chromedriver#4fe7] "androidUseRunningApp": true,
[Chromedriver#4fe7] "androidDeviceSerial": "RXCABCD"
[Chromedriver#4fe7] },
[Chromedriver#4fe7] "goog:loggingPrefs": {
[Chromedriver#4fe7] "browser": "ALL"
[Chromedriver#4fe7] }
[Chromedriver#4fe7] }
[Chromedriver#4fe7] }
[Chromedriver#4fe7] }
[debug] [Chromedriver#4fe7] Matched '/session' to command name 'createSession'
[debug] [Chromedriver#4fe7] Proxying [POST /session] to [POST http://127.0.0.1:8000/session] with body: {"capabilities":{"alwaysMatch":{"goog:chromeOptions":{"androidPackage":"com.android.chrome","androidUseRunningApp":true,"androidDeviceSerial":"RXCABCD"},"goog:loggingPrefs":{"browser":"ALL"}}}}
[debug] [Chromedriver#4fe7] Webview version: 'Chrome/108.0.5359.79'
[Chromedriver#4fe7] Got response with status 500: {"value":{"error":"disconnected","message":"disconnected: unable to connect to renderer\n (failed to check if window was closed: disconnected: unable to connect to renderer)\n (Session info: chrome=108.0.5359.79)","stacktrace":"0 chromedriver_mac64_v108.0.5359.71 0x0000000101a45f38 chromedriver_mac64_v108.0.5359.71 + 4910904\n1 chromedriver_mac64_v108.0.5359.71 0x00000001019c5a03 chromedriver_mac64_v108.0.5359.71 + 4385283\n2 chromedriver_mac64_v108.0.5359.71 0x000000010160a747 chromedriver_mac64_v108.0.5359.71 + 472903\n3 chromedriver_mac64_v108.0.5359.71 0x00000001015ef7ea chromedriver_mac64_v108.0.5359.71 + 362474\n4 chromedriver_mac64_v108.0.5359.71 0x00000001015dee19 chromedriver_mac64_v108.0.5359.71 + 294425\n5 chromedriver_mac64_v108.0.5359.71 0x00000001015de9f5 chromedriver_mac64_v108.0.5359.71 + 293365\n6 chromedriver_mac64_v108.0.5359.71 0x000000010167e578 chromedriver_mac64_v108.0.5359.71 + 947576\n7 chromedriver_mac64_v108.0.5359.71 0x000000010167dcbf chromedri...
[debug] [W3C] Matched W3C error code 'disconnected' to UnknownError
[debug] [Chromedriver#4fe7] UnknownError: An unknown server-side error occurred while processing the command. Original error: disconnected: unable to connect to renderer
[debug] [Chromedriver#4fe7] (failed to check if window was closed: disconnected: unable to connect to renderer)
[debug] [Chromedriver#4fe7] (Session info: chrome=108.0.5359.79)
[debug] [Chromedriver#4fe7] at errorFromW3CJsonCode (/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/#appium/base-driver/lib/protocol/errors.js:928:23)
[debug] [Chromedriver#4fe7] at ProxyRequestError.getActualError (/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/#appium/base-driver/lib/protocol/errors.js:798:14)
[debug] [Chromedriver#4fe7] at JWProxy.command (/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/#appium/base-driver/lib/jsonwp-proxy/proxy.js:340:19)
[debug] [Chromedriver#4fe7] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[debug] [Chromedriver#4fe7] at Chromedriver.startSession (/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/lib/chromedriver.js:597:5)
[debug] [Chromedriver#4fe7] at Chromedriver.start (/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/lib/chromedriver.js:528:7)
[debug] [Chromedriver#4fe7] at AndroidUiautomator2Driver.setupNewChromedriver (/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/lib/commands/context.js:471:3)
[debug] [Chromedriver#4fe7] at AndroidUiautomator2Driver.startChromedriverProxy (/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/lib/commands/context.js:217:10)
[debug] [Chromedriver#4fe7] at AndroidUiautomator2Driver.switchContext (/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/lib/commands/context.js:124:5)
[debug] [Chromedriver#4fe7] at AndroidUiautomator2Driver.setContext (/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/lib/commands/context.js:51:3)
[Chromedriver#4fe7] Chromedriver exited unexpectedly with code null, signal SIGTERM
[debug] [Chromedriver#4fe7] Changed state to 'stopped'
[Chromedriver#4fe7] An unknown server-side error occurred while processing the command. Original error: disconnected: unable to connect to renderer
[Chromedriver#4fe7] (failed to check if window was closed: disconnected: unable to connect to renderer)
[Chromedriver#4fe7] (Session info: chrome=108.0.5359.79)
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] Encountered internal error running command: Error: An unknown server-side error occurred while processing the command. Original error: disconnected: unable to connect to renderer
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] (failed to check if window was closed: disconnected: unable to connect to renderer)
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] (Session info: chrome=108.0.5359.79)
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] at Object.errorAndThrow (/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/#appium/support/lib/logging.js:115:34)
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] at Chromedriver.start (/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver/lib/chromedriver.js:553:16)
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] at AndroidUiautomator2Driver.setupNewChromedriver (/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/lib/commands/context.js:471:3)
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] at AndroidUiautomator2Driver.startChromedriverProxy (/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/lib/commands/context.js:217:10)
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] at AndroidUiautomator2Driver.switchContext (/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/lib/commands/context.js:124:5)
[debug] [AndroidUiautomator2Driver#20f3 (0b2b612b)] at AndroidUiautomator2Driver.setContext (/Users/tech/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/lib/commands/context.js:51:3)
[HTTP] <-- POST /wd/hub/session/0b2b612b-473a-456b-a281-842d6e138aa9/context 500 720 ms - 1008

ejabberd ACME unexpected content type when it receives certificate

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.

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.

Migrated WindowsPhone8 build stuck on the Splash screen [duplicate]

Migrated worklight 6.1 project to Mobile First 7.1
Using IBM MobileFirst Platform Studio 7.1.0.00-20160801-2314
Build app to work remote Mobile First server by giving correct Server path and Context path.
For local server both Android and Iphone builds are working fine but when I build for remote server, only Android build is working. In Iphone build WL.Client.connect is failing with giving error code 403 and for some times 200
Observed below thing by making worklightSettings include="true"
All remote server entries are reflected correctly on worklight.plist file but if I see in device(app -> settings) entries in Customize URL is reflected with local server details.
Also got to know from deployment team saying while deploying app on remote server app deployed successfully with warning "recommend to use extended app security".
Not able to identify where the issue is. As because 6.1 Iphone build and 7.1 Android build also working fine. Please help me out.
Found appid, hostname, context path and all other entries are reflected correctly in device logs and rest of logs which showing failing in connection to remote server as below.
Oct 21 10:09:22 Rajendra-Prasads-iPhone SpringBoard[54] <Error>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Oct 21 10:09:22 Rajendra-Prasads-iPhone SpringBoard[54] <Error>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Oct 21 10:09:22 Rajendra-Prasads-iPhone kernel[0] <Notice>: xpcproxy[389] Container: /private/var/mobile/Containers/Data/Application/D0756EDE-2E8E-448E-BED2-9D8B3BF8A7F3 (sandbox)
Oct 21 10:09:22 Rajendra-Prasads-iPhone com.apple.xpc.launchd[1] <Error>: assertion failed: 13G34: launchd + 116796 [9F6284CF-8A17-36CC-9DB5-85D510A21F14]: 0x3
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: load
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: swizzled_init
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: didFinishLaunchingWithOptions
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_CONFIG] -[WLConfig init] in WLConfig.m:71 :: {
"application id" = "XXXXXXXXXXXXXXXXX";
"application version" = "4.0";
authenticitySharedData = "${authenticitySharedData}";
buildtime = 1477023755;
environment = iphone;
host = "XXXXXXXXXXXXXXXXX";
ignoredFileExtensions = "";
platformVersion = "7.1.0.0";
port = 443;
protocol = https;
testWebResourcesChecksum = false;
wlAppFamily = "";
wlMainFile = "index.html";
wlSecureDirectUpdatePublicKey = "";
wlServerContext = "/XXXXXXXXXXXXXXXXX/";
wlShareCookies = "";
wlShareUserCert = false;
wlUid = "w8FBWQAy5yeln7H1qfahMQ==";
}
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_SPLASH] -[WLSplashView updateImage] in WLSplashView.m:194 :: Splash screen image is Default
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_SPLASH] -[WLSplashView updateImage] in WLSplashView.m:206 :: Screen resolution of iPhone 5 is detected. Splash image name is: Default-568h
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_SPLASH] -[WLSplashView updateImage] in WLSplashView.m:194 :: Splash screen image is Default
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_SPLASH] -[WLSplashView updateImage] in WLSplashView.m:206 :: Screen resolution of iPhone 5 is detected. Splash image name is: Default-568h
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: Apache Cordova native platform version 3.7.0 is starting.
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: Multi-tasking -> Device: YES, App: YES
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: Unlimited access to network resources
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [CDVTimer][splashscreen] 12.045026ms
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [CDVTimer][wlapp] 0.349998ms
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [CDVTimer][TotalPluginStartup] 13.078034ms
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [WARN] [WORKLIGHT] -[MFPMainViewController viewDidLoad] in MFPMainViewController.m:97 :: WARNING: AutoHideSplashScreen key in Cordova.plist is missing or set to NO! SplashScreen will display indefinitley unless you manually hide it. Set value to YES to autohide.
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: Unbalanced calls to begin/end appearance transitions for <CompatibilityIOS50ViewController: 0x16dbde30>.
Oct 21 10:09:22 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: Resetting plugins due to page load.
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: Finished load of: file:///var/containers/Bundle/Application/FBB95080-9634-4419-8396-604492D04B41/RBL%20MoBank.app/www/default/index.html#menu
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [ERROR] [NONE] Tried to record an true without a starting timestamp
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [FATAL] [NONE] Uncaught Exception: ReferenceError: Can't find variable: cancelSafeDocumentLocation at (compiled_code):1
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: log1
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [WARN] [NONE] Initialization option 'connectOnStartup' is deprecated. Use WL.Client.connect() to connect to the IBM MobileFirst Platform Server.
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [NONE] ondeviceready event dispatched
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [WARN] [NONE] Initialization option 'analytics' is deprecated. Use WL.Analytics.enable/disable to set analytics data capture.
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [NONE] wlclient init started
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [NONE] Read cookies: null
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [NONE] CookieMgr read cookies: {}
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AUTH] -[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:85 :: returning UUID from the keychain
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: THREAD WARNING: ['DeviceAuth'] took '27.729980' ms. Plugin should use a background thread.
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [NONE] before: initOptions.onSuccess
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [NONE] establishSSLClientAuth
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [WARN] [USER_CERT_AUTH] +[WLUserAuthManager getCertificateIdentifier] in WLUserAuthManager.m:68 :: Certificate Identifier Key: com.worklight.userenrollment.certificate:com.rbl.mobilebankingiphone
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [NONE] after: initOptions.onSuccess
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [NONE] added onPause and onResume event handlers
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [NONE] wlclient init success
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: THREAD WARNING: ['UserAuth'] took '19.201172' ms. Plugin should use a background thread.
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: getCommandInstance
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: enabledRemoteNotificationTypes is not supported in iOS 8.0 and later.
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AUTH] -[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:85 :: returning UUID from the keychain
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [NONE] establishSSLClientAuth isCertificateExists: false
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [NONE] Request [/apps/services/api/RBL_iBank/iphone/init]
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AUTH] -[WLAuthorizationManager invokeInstanceRegistrationRequestWithCompletionHandler:] in WLAuthorizationManager.m:548 :: Call instance registration endpoint
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AUTH] -[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:85 :: returning UUID from the keychain
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager generateKeyPair:withPublicKeyLabel:withKeySize:] in WLCertManager.m:225 :: generateKeyPair generating keypair --> Success
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] +[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:51 :: Request url is https://mobankmf.rblbank.com:443/qa/authorization/v1/clients/instance
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:142 :: Request timeout is 10.000000
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AUTH] -[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:85 :: returning UUID from the keychain
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:244 :: Sending request (https://mobankmf.rblbank.com:443/qa/authorization/v1/clients/instance) with headers:
{
"Accept-Language" = en;
"User-Agent" = "XXXXXXXXXXXXXXXXX/5.5 (iPhone; iOS 9.3.3; Scale/2.00)/WLNativeAPI/7.1.0.0";
"X-Requested-With" = XMLHttpRequest;
"x-wl-app-version" = "4.0";
"x-wl-device-id" = "BADA3995-3328-45AF-AC5E-68EC987954EB";
"x-wl-platform-version" = "7.1.0.0";
}
You can see the request body in the Analytics platform logs.
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:356 :: Starting the request with URL https://mobankmf.rblbank.com:443/qa/authorization/v1/clients/instance
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:254 :: waiting for response... (Thread=<NSThread: 0x16d78e60>{number = 1, name = main})
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: THREAD WARNING: ['WLAuthorizationManagerPlugin'] took '126.935059' ms. Plugin should use a background thread.
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [NONE] establishSSLClientAuth
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [WARN] [USER_CERT_AUTH] +[WLUserAuthManager getCertificateIdentifier] in WLUserAuthManager.m:68 :: Certificate Identifier Key: com.worklight.userenrollment.certificate:com.rbl.mobilebankingiphone
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [NONE] establishSSLClientAuth isCertificateExists: false
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [NONE] Request [/apps/services/api/RBL_iBank/iphone/query]
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:388 :: Request Failed
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:389 :: Response Status Code : 401
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:390 :: Response Error : Request failed: unauthorized (401)
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] +[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:51 :: Request url is https://mobankmf.rblbank.com:443/qa/authorization/v1/clients/instance
Oct 21 10:09:24 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:142 :: Request timeout is 10.000000
Oct 21 10:09:25 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AUTH] -[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:85 :: returning UUID from the keychain
Oct 21 10:09:25 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:244 :: Sending request (https://mobankmf.rblbank.com:443/qa/authorization/v1/clients/instance) with headers:
{
"Accept-Language" = en;
Authorization = "{\"wl_authenticityRealm\":\"jHr3qLi1s9qLWIz8BTJbmfHa1bd+oJSbiDy3wxmnFsE=\"}";
"User-Agent" = "XXXXXXXXXXXXXXXXX/5.5 (iPhone; iOS 9.3.3; Scale/2.00)/WLNativeAPI/7.1.0.0";
"X-Requested-With" = XMLHttpRequest;
"x-wl-app-version" = "4.0";
"x-wl-device-id" = "BADA3995-3328-45AF-AC5E-68EC987954EB";
"x-wl-platform-version" = "7.1.0.0";
}
You can see the request body in the Analytics platform logs.
Oct 21 10:09:25 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:356 :: Starting the request with URL https://mobankmf.rblbank.com:443/qa/authorization/v1/clients/instance
Oct 21 10:09:25 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:254 :: waiting for response... (Thread=<NSThread: 0x16d78e60>{number = 1, name = main})
Oct 21 10:09:34 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:388 :: Request Failed
Oct 21 10:09:34 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:389 :: Response Status Code : 0
Oct 21 10:09:34 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:390 :: Response Error : The network connection was lost.
Oct 21 10:09:34 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
Oct 21 10:09:34 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [ERROR] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:509 :: Status code='0' error='The network connection was lost.' response='(null)'
Oct 21 10:09:34 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:512 :: Response Header: (null)
Response Data: (null)
Oct 21 10:09:34 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AUTH] -[WLAuthorizationManager failRegistratioWithResponse:] in WLAuthorizationManager.m:866 :: Response does not contain a valid certificate and client Id. device registration failed
Oct 21 10:09:34 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
Oct 21 10:09:34 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
Oct 21 10:09:34 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
Oct 21 10:09:34 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
Oct 21 10:09:34 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: THREAD WARNING: ['WLAuthorizationManagerPlugin'] took '19.790039' ms. Plugin should use a background thread.
Oct 21 10:09:34 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
Oct 21 10:09:34 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AUTH] -[WLAuthorizationManager invokeInstanceRegistrationRequestWithCompletionHandler:] in WLAuthorizationManager.m:548 :: Call instance registration endpoint
Oct 21 10:09:34 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AUTH] -[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:85 :: returning UUID from the keychain
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager generateKeyPair:withPublicKeyLabel:withKeySize:] in WLCertManager.m:225 :: generateKeyPair generating keypair --> Success
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] +[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:51 :: Request url is https://mobankmf.rblbank.com:443/qa/authorization/v1/clients/instance
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:142 :: Request timeout is 10.000000
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AUTH] -[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:85 :: returning UUID from the keychain
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:244 :: Sending request (https://mobankmf.rblbank.com:443/qa/authorization/v1/clients/instance) with headers:
{
"Accept-Language" = en;
"User-Agent" = "XXXXXXXXXXXXXXXXX/5.5 (iPhone; iOS 9.3.3; Scale/2.00)/WLNativeAPI/7.1.0.0";
"X-Requested-With" = XMLHttpRequest;
"x-wl-app-version" = "4.0";
"x-wl-device-id" = "BADA3995-3328-45AF-AC5E-68EC987954EB";
"x-wl-platform-version" = "7.1.0.0";
}
You can see the request body in the Analytics platform logs.
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:356 :: Starting the request with URL https://mobankmf.rblbank.com:443/qa/authorization/v1/clients/instance
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:254 :: waiting for response... (Thread=<NSThread: 0x16d78e60>{number = 1, name = main})
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: THREAD WARNING: ['WLAuthorizationManagerPlugin'] took '182.981934' ms. Plugin should use a background thread.
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:388 :: Request Failed
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:389 :: Response Status Code : 401
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:390 :: Response Error : Request failed: unauthorized (401)
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] +[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:51 :: Request url is https://mobankmf.rblbank.com:443/qa/authorization/v1/clients/instance
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:142 :: Request timeout is 10.000000
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AUTH] -[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:85 :: returning UUID from the keychain
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:244 :: Sending request (https://mobankmf.rblbank.com:443/qa/authorization/v1/clients/instance) with headers:
{
"Accept-Language" = en;
Authorization = "{\"wl_authenticityRealm\":\"rzZHV8nu8HEiUXKrhmAbpLniktbeFpfUTs3nb6Bjzro=\"}";
"User-Agent" = "XXXXXXXXXXXXXXXXX/5.5 (iPhone; iOS 9.3.3; Scale/2.00)/WLNativeAPI/7.1.0.0";
"X-Requested-With" = XMLHttpRequest;
"x-wl-app-version" = "4.0";
"x-wl-device-id" = "BADA3995-3328-45AF-AC5E-68EC987954EB";
"x-wl-platform-version" = "7.1.0.0";
}
You can see the request body in the Analytics platform logs.
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:356 :: Starting the request with URL https://mobankmf.rblbank.com:443/qa/authorization/v1/clients/instance
Oct 21 10:09:35 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:254 :: waiting for response... (Thread=<NSThread: 0x16d78e60>{number = 1, name = main})
Oct 21 10:09:45 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:388 :: Request Failed
Oct 21 10:09:45 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:389 :: Response Status Code : 0
Oct 21 10:09:45 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:390 :: Response Error : The network connection was lost.
Oct 21 10:09:45 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
Oct 21 10:09:45 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [ERROR] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:509 :: Status code='0' error='The network connection was lost.' response='(null)'
Oct 21 10:09:45 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:512 :: Response Header: (null)
Response Data: (null)
Oct 21 10:09:45 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WL_AUTH] -[WLAuthorizationManager failRegistratioWithResponse:] in WLAuthorizationManager.m:866 :: Response does not contain a valid certificate and client Id. device registration failed
Oct 21 10:09:45 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
Oct 21 10:09:45 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
Oct 21 10:09:45 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/08/01 23:35:44
Oct 21 10:09:47 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [NONE] Client registration failed with error: {"responseHeaders":{},"status":200,"responseText":"Invalid response when registering application","invocationContext":null}
Oct 21 10:09:47 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [ERROR] [NONE] [/apps/services/api/RBL_iBank/iphone/init] failure. state: 200, response: undefined
Oct 21 10:09:47 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [ERROR] [NONE] [/apps/services/api/RBL_iBank/iphone/query] failure. state: 200, response: undefined
Oct 21 10:09:47 Rajendra-Prasads-iPhone XXXXXXXXXXXXXXXXX[389] <Warning>: [DEBUG] [NONE] Client registration failed with error: {"responseHeaders":{},"status":200,"responseText":"Invalid response when registering application","invocationContext":null}
Here are two questions with the same errors as you, perhaps the solutions provided there will be of help:
Cannot login to app on iOS actural Device MobileFirst Project
Unable to login to app on device or simulator after upgrade to iOS 9 and MobileFirst 7.1
Additionally, have you made sure to configure your application server with TLS 1.2 support, as well as set the application plist with ATS support?
See here: https://mobilefirstplatform.ibmcloud.com/blog/2015/09/09/mobilefirst-platform-support-for-ios-9/

javax.mail.sendfailedexception sending failed nested exception is class javax.mail.MessagingException

It give error about some problem with STARTTLS command .
it gives the error like this
javax.mail.sendfailedexception sending failed nested exception is class javax.mail.MessagingException
So please help me out of it.
Java Code
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
public class MailDemo {
public static void main(String[] args) {
Properties properties=new Properties();
properties.put("mail.smtp.auth", "true");
properties.put("mail.smtp.starttls.enable","true");
properties.put("mail.smtp.host","smtp.gmail.com");
properties.put("mail.smtp.port", "587");
Scanner scn=new Scanner(System.in);
System.out.println("Username for Authentication :");
final String username=scn.nextLine();
System.out.println("Password for Authentication :");
final String password=scn.nextLine();
System.out.println("From Email..");
String fromEmailAddrs=scn.nextLine();
System.out.println("To Email..");
String toEmail=scn.nextLine();
System.out.println("Subject..");
String subject=scn.nextLine();
System.out.println("Message..");
String textMessage=scn.nextLine();
Session session=Session.getDefaultInstance(properties,new Authenticator() {
#Override
protected javax.mail.PasswordAuthentication getPasswordAuthentication(){
return new javax.mail.PasswordAuthentication(username, password);
}
});
try{
Message msg=new MimeMessage(session);
msg.setFrom(new InternetAddress(fromEmailAddrs));
msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(toEmail));
msg.setSubject(subject);
msg.setText(textMessage);
Transport.send(msg);
System.out.println("/n Your Message Delivered Succesfully");
}
catch(MessagingException m){
throw new RuntimeException(m);
}
}
}
Console
Username for Authentication :
bijaybhaskar01
Password for Authentication :
abcdef#456789
From Email..
bijaybhaskar01#gmail.com
To Email..
bbswain1001#gmail.com
Subject..
Hello
Message..
hai
Output
Exception in thread "main" java.lang.RuntimeException: javax.mail.SendFailedException: Sending failed;
nested exception is:
class javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS command first. fh14sm3131583pab.31 - gsmtp
at com.mail.bhaskar.MailDemo.main(MailDemo.java:52)
Caused by: javax.mail.SendFailedException: Sending failed;
nested exception is:
class javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS command first. fh14sm3131583pab.31 - gsmtp
at javax.mail.Transport.send0(Transport.java:218)
at javax.mail.Transport.send(Transport.java:80)
at com.mail.bhaskar.MailDemo.main(MailDemo.java:48)
Debug output
DEBUG: JavaMail version 1.3.1
DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jre1.8.0_77\lib\javamail.providers (The system cannot find the file specified)
DEBUG: URL jar:file:/E:/Study/Java/Jars/MailJars/gimap.jar!/META-INF/javamail.providers
DEBUG: successfully loaded resource: jar:file:/E:/Study/Java/Jars/MailJars/gimap.jar!/META-INF/javamail.providers
DEBUG: URL jar:file:/E:/Study/Java/Jars/MailJars/imap.jar!/META-INF/javamail.providers
DEBUG: successfully loaded resource: jar:file:/E:/Study/Java/Jars/MailJars/imap.jar!/META-INF/javamail.providers
DEBUG: URL jar:file:/E:/Study/Java/Jars/MailJars/pop3.jar!/META-INF/javamail.providers
DEBUG: successfully loaded resource: jar:file:/E:/Study/Java/Jars/MailJars/pop3.jar!/META-INF/javamail.providers
DEBUG: URL jar:file:/E:/Study/Java/Jars/MailJars/smtp.jar!/META-INF/javamail.providers
DEBUG: successfully loaded resource: jar:file:/E:/Study/Java/Jars/MailJars/smtp.jar!/META-INF/javamail.providers
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], com.sun.mail.gimap.GmailSSLStore=javax.mail.Provider[STORE,gimaps,com.sun.mail.gimap.GmailSSLStore,Oracle], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.gimap.GmailStore=javax.mail.Provider[STORE,gimap,com.sun.mail.gimap.GmailStore,Oracle], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], gimap=javax.mail.Provider[STORE,gimap,com.sun.mail.gimap.GmailStore,Oracle], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], gimaps=javax.mail.Provider[STORE,gimaps,com.sun.mail.gimap.GmailSSLStore,Oracle]}
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: URL jar:file:/E:/Study/Java/Jars/MailJars/smtp.jar!/META-INF/javamail.address.map
DEBUG: successfully loaded resource: jar:file:/E:/Study/Java/Jars/MailJars/smtp.jar!/META-INF/javamail.address.map
DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jre1.8.0_77\lib\javamail.address.map (The system cannot find the file specified)
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 587
220 smtp.gmail.com ESMTP n6sm3627811pfa.2 - gsmtp
DEBUG SMTP: connected to host "smtp.gmail.com", port: 587
EHLO Bhaskar
250-smtp.gmail.com at your service, [119.82.116.106]
250-SIZE 35882577
250-8BITMIME
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-PIPELINING
250 SMTPUTF8
DEBUG SMTP: Found extension "SIZE", arg "35882577"
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "SMTPUTF8", arg ""
DEBUG SMTP: use8bit false
MAIL FROM:<bijaybhaskar01#gmail.com>
530 5.7.0 Must issue a STARTTLS command first. n6sm3627811pfa.2 - gsmtp
QUIT
You're using JavaMail 1.3.1, which is ancient and does not support STARTTLS.
Upgrade to a newer version.