paypal / PayPal-iOS-SDK

Accept credit cards and PayPal in your iOS app
Other
973 stars 368 forks source link

-canOpenURL: failed for URL: “org-appextension-feature-password-management://” - error: “(null)” (PayPal) #459

Closed el-fuche closed 8 years ago

el-fuche commented 8 years ago

Required Information

Please include as many details (logs, steps to reproduce, screenshots) as you can to help us reproduce this issue faster.

I dont understand why I have this error. "org-appextension-feature-password-management" is in the Property List. (http://i.stack.imgur.com/Gphcx.png)

Its just a warning but it freezes the app. I tried all environnements (Production, NoNetwork, Sandbox...), but the result is the same. Can you help me please ? Regards.

bluk commented 8 years ago

@el-fuche The "org-appextension-feature-password-management" is a misleading log message. See https://github.com/paypal/PayPal-iOS-SDK/issues/324#issuecomment-185801166 .

Can you give a code snippet or other information regarding your integration (e.g. is there anything set non-default on your phone)? Does the sample application in this repository work for you?

fizach commented 8 years ago

I am having the same issue This is my code

}

fizach commented 8 years ago

-canOpenURL: failed for URL: "org-appextension-feature-password-management://" - error: "This app is not allowed to query for scheme org-appextension-feature-password-management"

bluk commented 8 years ago

@fizach Please follow the instructions at https://github.com/paypal/PayPal-iOS-SDK#with-or-without-cocoapods to add the scheme to the allowed query list. This will then change it to a null error which is not really a concern. See https://github.com/paypal/PayPal-iOS-SDK/issues/324#issuecomment-185801166 .

fizach commented 8 years ago

-canOpenURL: failed for URL: "org-appextension-feature-password-management://" - error: "(null)"

now i am getting this but still cant login i login and cancel button looks like disabled

bluk commented 8 years ago

@fizach Given the sample code, you should also copy the sample app's viewWillAppear: method:

- (void)viewWillAppear:(BOOL)animated {
  [super viewWillAppear:YES];
  // Preconnect to PayPal early
  [self setPayPalEnvironment:self.environment];
}

The essential line is really:

[PayPalMobile preconnectWithEnvironment:environment];

which must be done.

fizach commented 8 years ago

i am having this already

fizach commented 8 years ago

simulator screen shot sep 14 2016 8 57 32 pm

I cant go anywhere from this screen

bluk commented 8 years ago

@fizach I've tried reproducing your error using the sample app in this repository (replacing the sample app's code with the code you've provided). I haven't been able to reproduce the error on an iOS 9.3.5 device or simulator.

Can you try the sample app and see if you get the same error? After presenting the view controller with credit cards disabled, I actually get automatically forwarded to the Login screen but even if you aren't, you should be able to tap the PayPal Log In table cell (anywhere on that PayPal logo's cell).

fizach commented 8 years ago

Yes its working fine in sample app but in my app i am not able to get the login screen automaticlly or by touching in cell

el-fuche commented 8 years ago

@bluk Sorry for the delay. This is my code : `- (void)viewDidLoad { [super viewDidLoad];

self.title = @"Mon solde";
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"background.jpg"]];
_secondContainer.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"bkgww.jpg"]];
_firstContainer.backgroundColor = [UIColor colorWithWhite:1.0 alpha:0.2];
_soldeContainer.backgroundColor = [UIColor clearColor];
_upperThirdView.backgroundColor = [UIColor clearColor];
_underThirdView.backgroundColor = [UIColor clearColor];
_PlusButton.backgroundColor = [UIColor colorWithWhite:1.0 alpha:0.4];
_MinusButton.backgroundColor = [UIColor colorWithWhite:1.0 alpha:0.4];
_buyButton.backgroundColor = [UIColor colorWithWhite:1.0 alpha:0.4];
_buyButton.tintColor = [UIColor whiteColor];
_bigThirdContainer.backgroundColor = [UIColor clearColor];
_buttonContainer.backgroundColor = [UIColor clearColor];
_priceContainer.backgroundColor = [UIColor colorWithWhite:1.0 alpha:0.4];
_quantiteContainer.backgroundColor = [UIColor colorWithWhite:1.0 alpha:0.4];
_quantiteNumberContainer.backgroundColor = [UIColor colorWithWhite:1.0 alpha:0.4];
_priceNumberContainer.backgroundColor = [UIColor colorWithWhite:1.0 alpha:0.4];

thePrice = 4.99;
Quantity = 1;

_PayPalConfig = [[PayPalConfiguration alloc]init];

_PayPalConfig.acceptCreditCards = YES;
_PayPalConfig.merchantName = @"Trigone Tech";
_PayPalConfig.languageOrLocale = [NSLocale preferredLanguages][0];
_PayPalConfig.payPalShippingAddressOption = PayPalShippingAddressOptionPayPal;

    [PayPalMobile preconnectWithEnvironment:PayPalEnvironmentSandbox];

}

}

` I still stuck like @fizach

el-fuche commented 8 years ago

It working fine in the sample app for me too.

fizach commented 8 years ago

it was wroking 3 days back with same code and settings but now its not working.

bluk commented 8 years ago

Have there been any changed libraries/frameworks recently? Or did you upgrade to Xcode 8? I did try both Xcode 7 and 8, but just wondering if that's what caused your issue.

I would also check if there are any different build settings or code differences between the sample application and yours. Then Reset the Content and Settings in the simulator menu, clean the target entirely, and run again.

fizach commented 8 years ago

i didnt upgrade to xcode 8 yet and didnt added new framework but updated my pods after getting this issue but no hope i will try reset the content and setting

el-fuche commented 8 years ago

@bluk I didnt upgrade to xcode 8 too. The problem appeared after severals git merges. I tried to reset the content on the simulator, I also tried to remove the app from different physicals devices, with no result.

fizach commented 8 years ago

yeah i also reset simulator but nothing helped

bluk commented 8 years ago

At this point, given that the sample app works for both of you, there may be a conflict with another library/framework. One way to test is if you can start a new project and add libraries/frameworks with the minimal code to initialize them until you get an error. Or if you are willing to provide the list of CocoaPods that you use, we can try to debug that way.

fizach commented 8 years ago

Here is my pods List

    pod 'IQKeyboardManager'
pod ‘CalendarLib’
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'FileBrowser', '~> 0.1'
pod 'BFPaperCheckbox'
pod 'PayPal-iOS-SDK'
el-fuche commented 8 years ago

@bluk and this is mine, a bit longer 😅

pod 'AFNetworking', '~> 3.0'
pod 'FastttCamera', '~> 0.3'
pod 'RegExCategories'
pod 'RandomUtils'
pod 'JSQMessagesViewController'
pod 'MLPAutoCompleteTextField', '~> 1.5'
pod 'AMPopTip'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'Google/SignIn'
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'BEMCheckBox'
pod 'SHEmailValidator', '~> 1.0'
pod 'SVProgressHUD', :git => 'https://github.com/SVProgressHUD/SVProgressHUD.git'
pod 'SAMKeychain'
pod 'LMGeocoder'
pod 'InAppSettingsKit', '~> 2.7'
pod 'PDTSimpleCalendar', '~> 0.9'
pod 'SFZoomView'
pod 'CHDropDownTextField'
pod 'SWRevealViewController'
pod 'KLCPopup'
#    pod 'PermissionScope'
pod 'IQKeyboardManager'
pod 'MCSwipeTableViewCell', '~> 2.1'
pod 'PayPal-iOS-SDK', '~> 2.14'
pod 'RateView', '~> 1.2'
pod 'HCSStarRatingView', '~> 1.4'
el-fuche commented 8 years ago

@bluk ok, I created another project, and when I added all my pods, same error. But When I removed all pod excepted PayPal, it works. So I guess you were right, there is a conflict with a pod.

el-fuche commented 8 years ago

@bluk Ok, I think that the problem come from IQKeyboardManager. PayPal works like a charm when I remove it. @fizach, try to remove this pod.

fizach commented 8 years ago

but i am using this pod when i started project and added paypal recently paypal was working fine when i added at first

eolverabea commented 8 years ago

I have the same error, and the application locks does not allow me close

-canOpenURL: failed for URL: "org-appextension-feature-password-management://" - error: "This app is not allowed to query for scheme org-appextension-feature-password-management"

paypal[46145:369555] -canOpenURL: failed for URL: "org-appextension-feature-password-management://" - error: "(null)"

hansemannn commented 8 years ago

Same issue for Appcelerator Titanium developers using Ti.PayPal. A workaround or fix would be appreciated by the community :-)

bluk commented 8 years ago

For the IQKeyboardManager, you can try disabling IQKeyboardManager before presenting the PayPal view controller.

- (IBAction)pay:(id)sender {
    // setup your PayPalPayment and PayPalConfiguration
    PayPalPaymentViewController *paymentViewController = [[PayPalPaymentViewController alloc] initWithPayment:payment configuration:self.paypalConfiguration delegate:self];

    // temporarily disable the keyboard manager
    [[IQKeyboardManager sharedManager] setEnable:NO];
    [self presentViewController:paymentViewController animated:YES completion:nil];
}

#pragma  mark - PayPalPaymentDelegate methods

- (void)payPalPaymentViewController:(PayPalPaymentViewController *)paymentViewController didCompletePayment:(PayPalPayment *)completedPayment {
    [self dismissViewControllerAnimated:YES completion:^{
        // re-enable the keyboard manager
        [[IQKeyboardManager sharedManager] setEnable:YES];
    }];
}

- (void)payPalPaymentDidCancel:(PayPalPaymentViewController *)paymentViewController {
    [self dismissViewControllerAnimated:YES completion:^{
        // re-enable the keyboard manager
        [[IQKeyboardManager sharedManager] setEnable:YES];
    }];
}
leoparro-tribalddb commented 8 years ago

hi,

I've also encountered this issue.

Error log:

-canOpenURL: failed for URL: "org-appextension-feature-password-management://" - error: "(null)"

I've already set this: let environment: String = PayPalEnvironmentSandbox

Any thoughts?

bluk commented 8 years ago

Regarding the original error with IQKeyboardManager, I believe the code workaround works and is the best path moving forward due to requirements in the PayPal SDK to control the presentation experience.

@leoparro-tribalddb Please see https://github.com/paypal/PayPal-iOS-SDK/issues/324#issuecomment-185801166 regarding the canOpenURL error message (it doesn't really matter). Your original message with the PayPal-Debug-ID ( 4c4345cbbf386 ) pointed to an error with a sandbox service which is being investigated with https://github.com/paypal/PayPal-Android-SDK/issues/361 .