I downloaded skpsmtpmessage code from Github and ran it on my iphone, it is unable to send any e-mails through my yahoo account. I set
testMsg.relayHost=#"smtp.mail.yahoo.com"
but it always fail with "Unsupported login mechanism." or something like that even though I have the right login and password on there. see console log below.
Has anybody tried sending mail thru yahoo with this program?
SKPSMTPMessage *testMsg = [[SKPSMTPMessage alloc] init];
testMsg.fromEmail = #"mylogin#yahoo.com";
testMsg.toEmail = #"mylogin#yahoo.com";
testMsg.relayHost = #"smtp.mail.yahoo.com";
testMsg.requiresAuth = YES;
testMsg.login = #"mylogin";
testMsg.pass = #"mypassword";
testMsg.subject = #"test message";
testMsg.wantsSecure = NO; // I tried both YES and NO, neither works
Log as follows
2014-04-25 17:10:08.748 SMTPSender[14408:60b] C: Attempting to connect to server at: smtp.mail.yahoo.com:25
2014-04-25 17:10:08.774 SMTPSender[14408:60b] Application windows are expected to have a root view controller at the end of application launch
2014-04-25 17:10:09.010 SMTPSender[14408:60b] *** stopping watchdog ***
2014-04-25 17:10:09.011 SMTPSender[14408:60b] S: 220 smtp.mail.yahoo.com ESMTP ready
2014-04-25 17:10:09.011 SMTPSender[14408:60b] C: EHLO localhost
2014-04-25 17:10:09.012 SMTPSender[14408:60b] *** starting short watchdog ***
2014-04-25 17:10:09.070 SMTPSender[14408:60b] *** stopping watchdog ***
2014-04-25 17:10:09.071 SMTPSender[14408:60b] S: 250-smtp.mail.yahoo.com
2014-04-25 17:10:09.071 SMTPSender[14408:60b] *** stopping watchdog ***
2014-04-25 17:10:09.071 SMTPSender[14408:60b] S: 250-PIPELINING
2014-04-25 17:10:09.072 SMTPSender[14408:60b] *** stopping watchdog ***
2014-04-25 17:10:09.072 SMTPSender[14408:60b] S: 250-SIZE 41697280
2014-04-25 17:10:09.072 SMTPSender[14408:60b] *** stopping watchdog ***
2014-04-25 17:10:09.072 SMTPSender[14408:60b] S: 250-8 BITMIME
2014-04-25 17:10:09.073 SMTPSender[14408:60b] *** stopping watchdog ***
2014-04-25 17:10:09.073 SMTPSender[14408:60b] S: 250 STARTTLS
2014-04-25 17:10:09.074 SMTPSender[14408:60b] delegate - error(-2): Unsupported login mechanism.
Any ideas?
Related
I am new to the objective-c realm and I am encountering a EXC_BAD_ACCESS. I know there are many forums and related content on stackoverflow - however I have still been unable to locate the source of my crash.
I have code to a game and when I exit a level and renter - the app crashes. Here are the steps that I have competed to try and located the source of the crash and the content that is displayed:
Image 1:
Here are the associated messages respectively:
Image 2:
Image 3:
Image 4:
Image 5:
Image 6:
I have enabled NSZombies and get this log when the app crashes:
Journey[76657:4493989] *** -[UILabel isKindOfClass:]: message sent to deallocated instance 0x60030b4d0d80.
I have looked up this type of error but I am still unsure how to read it. Next I tried:
(lldb) command script import lldb.macosx.heap
"malloc_info", "ptr_refs", "cstr_refs", "find_variable", and "objc_refs" commands have been installed, use the "--help" options on these commands for detailed help.
(lldb) malloc_info --stack-history 0x60030b4d0d80
I read that this would help me determine the exact line in my code where the crash could be happening but the output didn't seem to match what I had in my code:
2016-11-02 19:47:47.338190 Casino Journey[76657:4498737] [] nw_socket_handle_socket_event Event mask: 0x4
2016-11-02 19:47:47.339741 Casino Journey[76657:4494204] [] tcp_connection_cancel 17
2016-11-02 19:47:47.346972 Casino Journey[76657:4498737] [] nw_socket_handle_socket_event Socket received WRITE_CLOSE event
2016-11-02 19:47:47.351492 Casino Journey[76657:4498737] [] nw_endpoint_handler_cancel [17 live.chartboost.com:443 ready resolver (satisfied)]
2016-11-02 19:47:47.358787 Casino Journey[76657:4498737] [] nw_endpoint_handler_cancel [17.1 54.236.125.98:443 ready socket-flow (satisfied)]
2016-11-02 19:47:47.366406 Casino Journey[76657:4498737] [] __nw_socket_service_writes_block_invoke sendmsg(fd 13, 31 bytes): socket has been closed
2016-11-02 19:47:47.370392 Casino Journey[76657:4498737] [] nw_endpoint_flow_protocol_error [17.1 54.236.125.98:443 cancelled socket-flow (null)] Socket protocol sent error: [32] Broken pipe
2016-11-02 19:47:47.373586 Casino Journey[76657:4498737] [] nw_endpoint_flow_protocol_disconnected [17.1 54.236.125.98:443 cancelled socket-flow (null)] Output protocol disconnected
2016-11-02 19:47:47.376552 Casino Journey[76657:4498737] [] nw_endpoint_handler_cancel [17.2 107.23.51.227:443 initial path (null)]
2016-11-02 19:47:47.380708 Casino Journey[76657:4498737] [] nw_endpoint_handler_cancel [17.3 54.85.200.4:443 initial path (null)]
2016-11-02 19:47:47.383242 Casino Journey[76657:4498737] [] nw_endpoint_handler_cancel [17.4 54.86.68.178:443 initial path (null)]
2016-11-02 19:47:47.385251 Casino Journey[76657:4498737] [] nw_endpoint_handler_cancel [17.5 54.85.112.211:443 initial path (null)]
2016-11-02 19:47:47.387182 Casino Journey[76657:4498737] [] nw_endpoint_handler_cancel [17.6 107.23.150.89:443 initial path (null)]
2016-11-02 19:47:47.388414 Casino Journey[76657:4498737] [] nw_endpoint_handler_cancel [17.7 107.21.6.246:443 initial path (null)]
2016-11-02 19:47:47.389678 Casino Journey[76657:4498737] [] nw_endpoint_handler_cancel [17.8 54.210.97.43:443 initial path (null)]
2016-11-02 19:47:47.394671 Casino Journey[76657:4498737] [] nw_resolver_cancel_on_queue 0x6005eb89df70
2016-11-02 19:47:47.399258 Casino Journey[76657:4498737] [] -[NWConcrete_tcp_connection dealloc] 17
GuardMalloc[Casino Journey-76657]: Attempting excessively large memory allocation: 268435456 bytes
GuardMalloc[Casino Journey-76657]: If you really wanted to allocate so much memory, launch your executable with the environment variable MALLOC_PERMIT_INSANE_REQUESTS set to any value to circumvent this check.
GuardMalloc[Casino Journey-76657]: Explicitly trapping into debugger!!!
0x000060030b4d0d80: malloc( 640) -> 0x60030b4d0d80 _NSZombie_UILabel
error: expression failed "
typedef int kern_return_t;
typedef unsigned task_t;
#define MAX_FRAMES 128
#define MAX_HISTORY 16
typedef struct mach_stack_logging_record_t {
uint32_t type_flags;
uint64_t stack_identifier;
uint64_t argument;
uint64_t address;
} mach_stack_logging_record_t;
typedef void (*enumerate_callback_t)(mach_stack_logging_record_t, void *);
typedef struct malloc_stack_entry {
uint64_t address;
uint64_t argument;
uint32_t type_flags;
uint32_t num_frames;
uint64_t frames[MAX_FRAMES];
kern_return_t frames_err;
} malloc_stack_entry;
typedef struct $malloc_stack_history {
task_t task;
unsigned idx;
malloc_stack_entry entries[MAX_HISTORY];
} $malloc_stack_history;
$malloc_stack_history info = { (task_t)mach_task_self(), 0 };
uint32_t max_stack_frames = MAX_FRAMES;
enumerate_callback_t callback = [] (mach_stack_logging_record_t stack_record, void *baton) -> void {
$malloc_stack_history *info = ($malloc_stack_history *)baton;
if (info->idx < MAX_HISTORY) {
malloc_stack_entry *stack_entry = &(info->entries[info->idx]);
stack_entry->address = stack_record.address;
stack_entry->type_flags = stack_record.type_flags;
stack_entry->argument = stack_record.argument;
stack_entry->num_frames = 0;
stack_entry->frames[0] = 0;
stack_entry->frames_err = (kern_return_t)__mach_stack_logging_frames_for_uniqued_stack (
info->task,
stack_record.stack_identifier,
stack_entry->frames,
(uint32_t)MAX_FRAMES,
&stack_entry->num_frames);
// Terminate the frames with zero if there is room
if (stack_entry->num_frames < MAX_FRAMES)
stack_entry->frames[stack_entry->num_frames] = 0;
}
++info->idx;
};
(kern_return_t)__mach_stack_logging_enumerate_records (info.task, (uint64_t)0x60030b4d0d80, callback, &info);
info" => error: error: Execution was interrupted, reason: EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0).
The process has been returned to the state before expression evaluation.
If anyone could help me determine the possible source of this error I would really appreciate it! Any help or comments in general when trying to debug an error like this.
I am also using the newest version of xcode: Version 8.0
EDIT:
I am adding the code for the BaseViewController - I do understand this might be hard to read and complex there are a lot of files with the actual code:
//
//
//
#import <UIKit/UIKit.h>
#import <StoreKit/StoreKit.h>
#import "PHPublisherContentRequest.h"
#import <Foundation/Foundation.h>
#import "PHAPIRequest.h"
#import "PHContentView.h"
#import "AppController.h"
#import "Define.h"
#interface BaseViewController : UIViewController <SKProductsRequestDelegate, SKPaymentTransactionObserver, PHAPIRequestDelegate, PHPublisherContentRequestDelegate> {
IBOutlet UIActivityIndicatorView *activityIndicator;
BaseViewController *superClassDelegate;
}
- (void)exitIAP;
-(void) buyProductWithIdentifier:(NSString *) productIdentifier;
-(void) sendVgpCallToPlayHavenForPlacement:(NSString *) placementTag;
#end
I am new to the objective-c realm
Welcome to Objective-C. Here's the best advice you'll ever get:
USE ARC!!!
Really. The compiler knows much more about memory management than you do. Use ARC and lose all those retains, releases, and deallocs. Do it now.
Please check once below things:-
Go to TARGETS
Select Build Phases
Select Compile Sources
Select your file/Class name
Double click on Compiler Flags
Enter one word in box -fno-objc-arc
After enter -fno-objc-arc once clean & build your application.
As #New16 said, variables should be released before setting to nil.
If I were you, I would have a look UILabel in your BaseViewController.
My hybrid app built using Ionic and IBM MobileFirst is unable to login after the upgrade to iOS 9 and MF 7.1 when built via XCode and deployed to a device or through iOS simulator.
I am running this on my local WebSphere Liberty server within Eclipse so there is no SSH involved, so have followed instructions to disable bitcode and ATS from the link below with no effect.
https://developer.ibm.com/mobilefirstplatform/2015/09/09/ats-and-bitcode-in-ios9/
However the app is able to be logged in using the MF Mobile Browser Simulator, it only fails when attempting a login on the device or iOS simulator, so I'm sure this is something to do with the build process rather than an app error.
Here's the log trace I get, seems to be not finding the server IP (which I've obscured), but that is the correct IP for my local Liberty Server
Anyone else having a similar issue? Any help would be much appreciated!
2015-10-20 14:01:02.269 WorkManagement[26452:2390658] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/Eugene/Library/Developer/CoreSimulator/Devices/49A9535D-0085-4FD6-A57F-A45D0F7E7819/data/Containers/Data/Application/86E6CEFF-F2E5-4523-9763-A421A1A64659/Library/Cookies/com.WorkManagement.binarycookies
2015-10-20 14:01:02.427 WorkManagement[26452:2390658] [DEBUG] [WL_SPLASH] -[WLSplashView updateImage] in WLSplashView.m:189 :: Splash screen image is taken from UILaunchImages: Default-667h
2015-10-20 14:01:02.453 WorkManagement[26452:2390658] [DEBUG] [WL_SPLASH] -[WLSplashView updateImage] in WLSplashView.m:189 :: Splash screen image is taken from UILaunchImages: Default-667 h
2015-10-20 14:01:02.455 WorkManagement[26452:2390658] Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x7f91936521e0>.
2015-10-20 14:01:02.494 WorkManagement[26452:2391815] [DEBUG] [WL_CONFIG] -[WLConfig init] in WLConfig.m:71 :: {
"application id" = WorkManagement;
"application version" = "1.0";
authenticitySharedData = "${authenticitySharedData}";
buildtime = 1445346036;
environment = iphone;
host = "ip-XXX-XX-X-XX.eu-west-1.compute.internal";
ignoredFileExtensions = "";
platformVersion = "7.1.0.0";
port = 10080;
protocol = http;
testWebResourcesChecksum = false;
wlAppFamily = "";
wlMainFile = "index.html";
wlSecureDirectUpdatePublicKey = "";
wlServerContext = "/dlr-mxr-mobile-wm/";
wlShareCookies = "";
wlShareUserCert = false;
wlUid = "JIl9TfKyrbvMt7TN91OoYw==";
}
2015-10-20 14:01:02.496 WorkManagement[26452:2391815] [DEBUG] [WL_INIT] -[WLImpl initWL] in WLImpl.m:127 :: At first launch
2015-10-20 14:01:02.501 WorkManagement[26452:2391815] [DEBUG] [WL_INIT] -[WLImpl initWL] in WLImpl.m:153 :: Web resources should not be extracted.
2015-10-20 14:01:03.750 WorkManagement[26452:2390658] Apache Cordova native platform version 3.7.0 is starting.
2015-10-20 14:01:03.750 WorkManagement[26452:2390658] Multi-tasking -> Device: YES, App: YES
2015-10-20 14:01:03.756 WorkManagement[26452:2390658] Unlimited access to network resources
2015-10-20 14:01:03.757 WorkManagement[26452:2390658]
Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
https://developer.apple.com/icloud/documentation/data-storage/
To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file
2015-10-20 14:01:03.762 WorkManagement[26452:2390658] [CDVTimer][wlapp] 1.286030ms
2015-10-20 14:01:03.763 WorkManagement[26452:2390658] [CDVTimer][push] 1.507044ms
2015-10-20 14:01:03.764 WorkManagement[26452:2390658] [CDVTimer][TotalPluginStartup] 3.289998ms
2015-10-20 14:01:03.806 WorkManagement[26452:2390658] Resetting plugins due to page load.
2015-10-20 14:01:04.178 WorkManagement[26452:2390658] Finished load of: file:///Users/Eugene/Library/Developer/CoreSimulator/Devices/49A9535D-0085-4FD6-A57F-A45D0F7E7819/data/Containers/Bundle/Application/B76AFE6B-15B9-4651-9230-30123351DB91/WorkManagement.app/www/default/index.html#/login
2015-10-20 14:01:06.407 WorkManagement[26452:2391782] [DEBUG] [NONE] ondeviceready event dispatched
2015-10-20 14:01:06.411 WorkManagement[26452:2391782] [DEBUG] [NONE] wlclient init started
2015-10-20 14:01:06.412 WorkManagement[26452:2391754] [DEBUG] [NONE] Read cookies: null
2015-10-20 14:01:06.413 WorkManagement[26452:2390658] log1
2015-10-20 14:01:06.413 WorkManagement[26452:2391755] [DEBUG] [NONE] CookieMgr read cookies: {}
2015-10-20 14:01:06.422 WorkManagement[26452:2391755] [DEBUG] [NONE] before: initOptions.onSuccess
2015-10-20 14:01:06.424 WorkManagement[26452:2391755] [DEBUG] [NONE] after: initOptions.onSuccess
2015-10-20 14:01:06.424 WorkManagement[26452:2391782] [DEBUG] [NONE] added onPause and onResume event handlers
2015-10-20 14:01:06.425 WorkManagement[26452:2392040] [DEBUG] [NONE] wlclient init success
2015-10-20 14:01:06.434 WorkManagement[26452:2391754] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
2015-10-20 14:01:07.600 WorkManagement[26452:2390658] In $auth factory - authString : QkxMT1lEOm1heGltbw==
2015-10-20 14:01:07.600 WorkManagement[26452:2390658] username : BLLOYD
2015-10-20 14:01:07.601 WorkManagement[26452:2390658] password : maximo
2015-10-20 14:01:07.659 WorkManagement[26452:2392040] [DEBUG] [NONE] establishSSLClientAuth
2015-10-20 14:01:07.662 WorkManagement[26452:2390658] [WARN] [USER_CERT_AUTH] +[WLUserAuthManager getCertificateIdentifier] in WLUserAuthManager.m:68 :: Certificate Identifier Key: com.worklight.userenrollment.certificate:com.WorkManagement
2015-10-20 14:01:07.671 WorkManagement[26452:2390658] THREAD WARNING: ['UserAuth'] took '10.719238' ms. Plugin should use a background thread.
2015-10-20 14:01:07.672 WorkManagement[26452:2392040] [DEBUG] [NONE] establishSSLClientAuth isCertificateExists: false
2015-10-20 14:01:07.673 WorkManagement[26452:2391782] [DEBUG] [NONE] Request [/apps/services/api/WorkManagement/iphone/query]
2015-10-20 14:01:07.673 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
2015-10-20 14:01:07.677 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
2015-10-20 14:01:07.678 WorkManagement[26452:2390658] [DEBUG] [WL_AUTH] -[WLAuthorizationManager invokeInstanceRegistrationRequestWithCompletionHandler:] in WLAuthorizationManager.m:548 :: Call instance registration endpoint
2015-10-20 14:01:07.710 WorkManagement[26452:2390658] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager generateKeyPair:withPublicKeyLabel:withKeySize:] in WLCertManager.m:225 :: generateKeyPair generating keypair --> Success
2015-10-20 14:01:07.719 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
2015-10-20 14:01:07.720 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] +[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:52 :: Request url is http://ip-XXX-XX-X-XX.eu-west-1.compute.internal:10080/dlr-mxr-mobile-wm/authorization/v1/clients/instance
2015-10-20 14:01:07.722 WorkManagement[26452:2390658] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:142 :: Request timeout is 10.000000
2015-10-20 14:01:07.723 WorkManagement[26452:2390658] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:221 :: Sending request (http://ip-XXX-XX-X-XX.eu-west-1.compute.internal:10080/dlr-mxr-mobile-wm/authorization/v1/clients/instance) with headers:
{
"Accept-Language" = "en-US";
"User-Agent" = "WorkManagement/1.0 (iPhone; iOS 9.0; Scale/2.00)/WLNativeAPI/7.1.0.0";
"X-Requested-With" = XMLHttpRequest;
"x-wl-app-version" = "1.0";
"x-wl-device-id" = "9263C520-E277-4D6B-A076-1D68915D78E3";
"x-wl-platform-version" = "7.1.0.0";
}
You can see the request body in the Analytics platform logs.
2015-10-20 14:01:07.731 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:320 :: Starting the request with URL http://ip-XXX-XX-X-XX.eu-west-1.compute.internal:10080/dlr-mxr-mobile-wm/authorization/v1/clients/instance
2015-10-20 14:01:07.732 WorkManagement[26452:2390658] [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:231 :: waiting for response... (Thread=<NSThread: 0x7f919340bb50>{number = 1, name = main})
2015-10-20 14:01:07.733 WorkManagement[26452:2390658] THREAD WARNING: ['WLAuthorizationManagerPlugin'] took '61.285889' ms. Plugin should use a background thread.
2015-10-20 14:01:07.744 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:352 :: Request Failed
2015-10-20 14:01:07.744 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:353 :: Response Status Code : 0
2015-10-20 14:01:07.746 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:354 :: Response Error : A server with the specified hostname could not be found.
2015-10-20 14:01:07.748 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
2015-10-20 14:01:07.748 WorkManagement[26452:2390658] [ERROR] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:486 :: Status code='0' error='A server with the specified hostname could not be found.' response='(null)'
2015-10-20 14:01:07.749 WorkManagement[26452:2390658] [DEBUG] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:489 :: Response Header: (null)
Response Data: (null)
2015-10-20 14:01:07.749 WorkManagement[26452:2390658] [DEBUG] [WL_AUTH] -[WLAuthorizationManager failRegistratioWithResponse:] in WLAuthorizationManager.m:866 :: Response does not contain a valid certificate and client Id. device registration failed
2015-10-20 14:01:07.753 WorkManagement[26452:2390658] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
2015-10-20 14:01:07.759 WorkManagement[26452:2390658] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
2015-10-20 14:01:07.762 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
2015-10-20 14:01:07.774 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
2015-10-20 14:01:07.781 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
2015-10-20 14:01:07.781 WorkManagement[26452:2390658] [DEBUG] [WL_AUTH] -[WLAuthorizationManager invokeInstanceRegistrationRequestWithCompletionHandler:] in WLAuthorizationManager.m:548 :: Call instance registration endpoint
2015-10-20 14:01:07.812 WorkManagement[26452:2390658] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager generateKeyPair:withPublicKeyLabel:withKeySize:] in WLCertManager.m:225 :: generateKeyPair generating keypair --> Success
2015-10-20 14:01:07.818 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
2015-10-20 14:01:07.819 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] +[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:52 :: Request url is http://ip-XXX-XX-X-XX.eu-west-1.compute.internal:10080/dlr-mxr-mobile-wm/authorization/v1/clients/instance
2015-10-20 14:01:07.820 WorkManagement[26452:2390658] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:142 :: Request timeout is 10.000000
2015-10-20 14:01:07.821 WorkManagement[26452:2390658] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:221 :: Sending request (http://ip-XXX-XX-X-XX.eu-west-1.compute.internal:10080/dlr-mxr-mobile-wm/authorization/v1/clients/instance) with headers:
{
"Accept-Language" = "en-US";
"User-Agent" = "WorkManagement/1.0 (iPhone; iOS 9.0; Scale/2.00)/WLNativeAPI/7.1.0.0";
"X-Requested-With" = XMLHttpRequest;
"x-wl-app-version" = "1.0";
"x-wl-device-id" = "9263C520-E277-4D6B-A076-1D68915D78E3";
"x-wl-platform-version" = "7.1.0.0";
}
You can see the request body in the Analytics platform logs.
2015-10-20 14:01:07.822 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:320 :: Starting the request with URL http://ip-XXX-XX-X-XX.eu-west-1.compute.internal:10080/dlr-mxr-mobile-wm/authorization/v1/clients/instance
2015-10-20 14:01:07.822 WorkManagement[26452:2390658] [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:231 :: waiting for response... (Thread=<NSThread: 0x7f919340bb50>{number = 1, name = main})
2015-10-20 14:01:07.823 WorkManagement[26452:2390658] THREAD WARNING: ['WLAuthorizationManagerPlugin'] took '47.751953' ms. Plugin should use a background thread.
2015-10-20 14:01:07.829 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:352 :: Request Failed
2015-10-20 14:01:07.830 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:353 :: Response Status Code : 0
2015-10-20 14:01:07.831 WorkManagement[26452:2390658] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:354 :: Response Error : A server with the specified hostname could not be found.
2015-10-20 14:01:07.832 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
2015-10-20 14:01:07.833 WorkManagement[26452:2390658] [ERROR] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:486 :: Status code='0' error='A server with the specified hostname could not be found.' response='(null)'
2015-10-20 14:01:07.834 WorkManagement[26452:2390658] [DEBUG] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:489 :: Response Header: (null)
Response Data: (null)
2015-10-20 14:01:07.834 WorkManagement[26452:2390658] [DEBUG] [WL_AUTH] -[WLAuthorizationManager failRegistratioWithResponse:] in WLAuthorizationManager.m:866 :: Response does not contain a valid certificate and client Id. device registration failed
2015-10-20 14:01:07.859 WorkManagement[26452:2390658] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
2015-10-20 14:01:07.864 WorkManagement[26452:2390658] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed.
2015-10-20 14:01:07.872 WorkManagement[26452:2390658] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/10/12 16:16:07
When using the MBS, you are basically being served directly by the server. The MBS is inside the server and you open the server IP or localhost.
When using a physical device or the iOS Simulator you are connecting to a "remote" hostname. It could be that the value mentioned is not being translated correctly by DNS.
You can try two things, by editing the worklight.plist file in your Xcode project:
Empty the host property; this usually then allows it to pick a value on its own and seems to work, in iOS
Replace the existing host value with the IP address instead of a hostname
I can't connect to my MobileFirst server from my iOS native app.
I change the host, wlServerContext and port in my worklight.plist.
I upload the .wlapp and .adapter in the console of the server.
This is the log in my app:
2015-03-30 14:34:31.119 El_Universal_Demo[696:146217] Connecting to server and initializing push notification ...
2015-03-30 14:34:31.125 El_Universal_Demo[696:146217] [DEBUG] [WL_CONFIG] -[WLConfig init] in WLConfig.m:69 :: {
"application id" = "El_Universal_Demo";
"application version" = "1.0";
environment = iOSnative;
host = "198.11.212.197";
platformVersion = "7.0.0.0";
port = 8080;
protocol = http;
wlServerContext = "/wladmin";
wlUid = "wY/mbnwKTDDYQUvuQCdSgg==";
}
2015-03-30 14:34:31.160 El_Universal_Demo[696:146217] [WARN] [USER_CERT_AUTH] + [WLUserAuthManager getCertificateIdentifier] in WLUserAuthManager.m:68 :: Certificate Identifier Key: com.worklight.userenrollment.certificate:com.eluniversal.El-Universal-Demo
2015-03-30 14:34:31.173 El_Universal_Demo[696:146217] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] +[WLAFHTTPClientWrapper requestWithURL:] in WLAFHTTPClientWrapper.m:46 :: Request url is http://198.11.212.197:8080/wladmin/apps/services/api/El_Universal_Demo/iOSnative/init
2015-03-30 14:34:31.202 El_Universal_Demo[696:146217] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:141 :: Request timeout is 60.000000
2015-03-30 14:34:31.206 El_Universal_Demo[696:146217] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:220 :: Sending request (http://198.11.212.197:8080/wladmin/apps/services/api/El_Universal_Demo/iOSnative/init) with headers:
{
"Accept-Language" = es;
"User-Agent" = "El_Universal_Demo/1 (iPhone; iOS 8.1.2; Scale/2.00)/WLNativeAPI/7.0.0.0";
"X-Requested-With" = XMLHttpRequest;
"x-wl-app-version" = "1.0";
"x-wl-clientlog-appname" = "El_Universal_Demo";
"x-wl-clientlog-appversion" = "1.0";
"x-wl-clientlog-deviceId" = "A6042553-8580-4365-A69C-6731388D6A56";
"x-wl-clientlog-env" = iOSnative;
"x-wl-clientlog-model" = "iPhone6,1";
"x-wl-clientlog-osversion" = "8.1.2";
"x-wl-device-id" = "A6042553-8580-4365-A69C-6731388D6A56";
"x-wl-platform-version" = "7.0.0.0";
}
You can see the request body in the Analytics platform logs.
2015-03-30 14:34:31.219 El_Universal_Demo[696:146217] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper start] in WLAFHTTPClientWrapper.m:297 :: Starting the request with URL http://198.11.212.197:8080/wladmin/apps/services/api/El_Universal_Demo/iOSnative/i nit
2015-03-30 14:34:31.225 El_Universal_Demo[696:146217] [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:230 :: waiting for response... (Thread=<NSThread: 0x17007f3c0>{number = 1, name = main})
2015-03-30 14:34:31.231 El_Universal_Demo[696:146217] url a cargar (null)
2015-03-30 14:34:31.288 El_Universal_Demo[696:146217] APNS Token : <9f662f33 5de5971b 5371851e 7d91fc17 f6f83d55 a9c913f6 973eec67 2e10c365>
2015-03-30 14:34:31.289 El_Universal_Demo[696:146217] APNS Token : <9f662f33 5de5971b 5371851e 7d91fc17 f6f83d55 a9c913f6 973eec67 2e10c365>
2015-03-30 14:34:31.476 El_Universal_Demo[696:146217] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:324 :: Request Failed
2015-03-30 14:34:31.480 El_Universal_Demo[696:146217] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:325 :: Response Status Code : 404
2015-03-30 14:34:31.484 El_Universal_Demo[696:146217] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:326 :: Response Error : Expected status code in (200-299), got 404
2015-03-30 14:34:31.501 El_Universal_Demo[696:146217] [ERROR] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:466 :: Status code='404' error='Expected status code in (200-299), got 404' response=''
2015-03-30 14:34:31.508 El_Universal_Demo[696:146217] [DEBUG] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:469 :: Response Header: {
Connection = "Keep-Alive";
"Content-Language" = "en-US";
"Content-Length" = 0;
Date = "Mon, 30 Mar 2015 20:34:44 GMT";
"Keep-Alive" = "timeout=10, max=100";
"X-Powered-By" = "Servlet/3.0";
}
Response Data:
2015-03-30 14:34:31.514 El_Universal_Demo[696:146217] [ERROR] [WL_CLIENT] - [WLClient onInitRequestFailure:userInfo:] in WLClient.m:1060 :: onInitRequestFailure
I need to test an example with notifications based on tags. My example works locally but I want to test it with the development server in the cloud and I cannot do that if my app doesn't connect.
I'm using MobileFirst 7.0
Regards.
You say it's working locally. Can you expend on that?
Are you sure in the settings you've placed in worklight.plist?
http://198.11.212.197:8080/wladmin/apps/services/api/El_Universal_Demo/iOSnative/init
That IP address looks local to me rather than remote ("in the cloud"). Verify your settings.
Thanks, this problem was resolved.
I had to reinstall all the configuration of installation in my server and again upload the run time (.war), wlapp and adapter.
Also in the moment when I did the deploy of my native app in eclipse some times appeared an error in the console about a problem in the file .war.
So I had to make other workspace and verify settings of my native app. (worklight.plist)
My problem now is that I don´t receive any notification in my iPhone when I run a notification of my adapter but is other topic.
[1] How to invoke the url or link of an adapter
Regards
Ok for the life of me I cannot figure this problem out. I am utilizing a SMTPsender to send a email without going through the user mail UI. What I cannot understand is when I run my application in the simulator, it shoots out a email without any issues when the function "sendemail" gets called at runtime. Now when I run the test on the physical iPhone, it gets held up and stops the connection. Here is the log I am getting:
2014-06-09 05:59:11.601 MCDemo[916:60b] in send
2014-06-09 05:59:11.606 MCDemo[916:60b] C: Attempting to connect to server at: smtp.gmail.com:25
2014-06-09 05:59:11.920 MCDemo[916:60b] in applicationDidBecomeActive:
2014-06-09 05:59:13.723 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.725 MCDemo[916:60b] S: 220 mx.google.com ESMTP r132sm217421oib.11 - gsmtp
2014-06-09 05:59:13.726 MCDemo[916:60b] C: EHLO localhost
2014-06-09 05:59:13.728 MCDemo[916:60b] *** starting short watchdog ***
2014-06-09 05:59:13.801 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.806 MCDemo[916:60b] S: 250-mx.google.com at your service, [2602:252:d3a:ca70:cd5d:c927:578f:cc91]
2014-06-09 05:59:13.809 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.811 MCDemo[916:60b] S: 250-SIZE 35882577
2014-06-09 05:59:13.812 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.814 MCDemo[916:60b] S: 250-8BITMIME
2014-06-09 05:59:13.815 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.817 MCDemo[916:60b] S: 250-STARTTLS
2014-06-09 05:59:13.818 MCDemo[916:60b] C: STARTTLS
2014-06-09 05:59:13.820 MCDemo[916:60b] *** starting short watchdog ***
2014-06-09 05:59:13.822 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.824 MCDemo[916:60b] S: 250-ENHANCEDSTATUSCODES
2014-06-09 05:59:13.825 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.827 MCDemo[916:60b] S: 250-PIPELINING
2014-06-09 05:59:13.828 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.829 MCDemo[916:60b] S: 250-CHUNKING
2014-06-09 05:59:13.831 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.832 MCDemo[916:60b] S: 250 SMTPUTF8
2014-06-09 05:59:13.920 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.922 MCDemo[916:60b] S: 220 2.0.0 Ready to start TLS
2014-06-09 05:59:13.931 MCDemo[916:60b] Beginning TLSv1...
2014-06-09 05:59:13.933 MCDemo[916:60b] C: EHLO localhost
2014-06-09 05:59:14.164 MCDemo[916:60b] CFNetwork SSLHandshake failed (-9807)
2014-06-09 05:59:14.264 MCDemo[916:60b] delegate - error(-9807): The operation couldn’t be completed. (OSStatus error -9807.)
2014-06-09 05:59:19.611 MCDemo[916:60b] *** stopping watchdog ***
This is the code regarding the log:
-(void)sendEmail
{
SKPSMTPMessage *testMsg = [[SKPSMTPMessage alloc] init];
testMsg.fromEmail = #"test#test.com";
testMsg.toEmail = #"*********"; //left blank for this example
testMsg.relayHost = #"smtp.gmail.com";//smtp.mac.com";
testMsg.requiresAuth = YES;
testMsg.login = #"*******"; //left blank
testMsg.pass = #"*****";
testMsg.subject = #"test message";
testMsg.bccEmail = #"test#test.com";
testMsg.wantsSecure = YES; // smtp.gmail.com doesn't work without TLS!
// Only do this for self-signed certs!
//testMsg.validateSSLChain = YES;
testMsg.delegate = self;
NSDictionary *plainPart = [NSDictionary dictionaryWithObjectsAndKeys:#"text/plain",kSKPSMTPPartContentTypeKey,
#"This is a tést messåge.",kSKPSMTPPartMessageKey,#"8bit",kSKPSMTPPartContentTransferEncodingKey,nil];
testMsg.parts = [NSArray arrayWithObjects:plainPart,nil];
[testMsg send];
}
Is there a reason why it will not work on my iPhone but works for the simulator?
The status -9807 means that the certificate chain couldn't be validated. This can be caused by an incorrect time/date on the device.
Import CFNetwork framework in your project
I'm trying to use forge.event.connectionStateChange.addListener from the docs. I've create and entirely empty application, added "event":true to the config.json configuration and added the following bit to the main.js:
forge.logging.info("Add JavaScript to js/main.js!");
forge.event.connectionStateChange.addListener(
function() {
alert('Device ' + (forge.is.connection.connect() ? "is" : "is not") + 'connected.');
},
function(){
alert('Erorr');
}
);
When I run the application and turn off my machine's wifi, the application crashes. I can provide more log if needed.
[DEBUG] Native call: {
[DEBUG] callid = "9B3DBB44-870E-438B-8128-07E88474DDAB";
[DEBUG] method = "launchimage.hide";
[DEBUG] params = {
[DEBUG] };
[DEBUG] }
[DEBUG] Returning to javascript: {
[DEBUG] callid = "9B3DBB44-870E-438B-8128-07E88474DDAB";
[DEBUG] content = "<null>";
[DEBUG] status = success;
[DEBUG] }
[INFO] No reload update available.
[INFO] 2013-03-04 16:59:54.725 Forge[68603:c07] +[BorderControl returnResult:]: unrecognized selector sent to class 0x2fb4a4
[INFO] 2013-03-04 16:59:54.725 Forge[68603:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[BorderControl returnResult:]: unrecognized selector sent to class 0x2fb4a4'
[INFO] *** First throw call stack:
[INFO] (0x33b6012 0x2e55e7e 0x34412ad 0x33a5bbc 0x33a594e 0x2e695c8 0x2895765 0x3339f3f 0x333996f 0x335c734 0x335bf44 0x335be1b 0x33107e3 0x3310668 0x1d99ffc 0x26e6 0x2625)
[INFO] libc++abi.dylib: terminate called throwing an exception
Sorry - our bad: this is a symptom of the same problem which was causing problems with Reload in v1.4.32.
There's a fix in v1.4.33 - please do give it a try and let me know if that works for you.