Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please update dependency for ParseFacebookUtils #1274

Closed
markuswinkler opened this issue Mar 3, 2018 · 66 comments
Closed

Please update dependency for ParseFacebookUtils #1274

markuswinkler opened this issue Mar 3, 2018 · 66 comments

Comments

@markuswinkler
Copy link
Contributor

Hi!

ParseFacebookUtils currently is limited to a FacebookSDK '~> 4.28.0',
although 4.30 has been out for a while.
Can you please update the podspec?

Thanks!

@jeffMeador
Copy link

The latest facebook SDK is actually 4.31.1, can the podspec just get updated to that? Facebook is sending out messages to update to the latest SDK for important iOS 11 fixes.

@flovilmart
Copy link
Contributor

Can you open a PR please? don’t forget to update the Cartfile and run Carthage bootstrap so tests are run against it as well.

@tahoecoop
Copy link

I don't know how to do this PR. However, I'm getting a weird crash when a new user tries to log in with facebook. I'm seeing that new facebookutils version is 4.32 but we're only at 4.28, could this be the cause of the crash? Any help getting this resolved would be greatly appreciated, thanks!

@flovilmart
Copy link
Contributor

@tahoecoop can you provide the crash please?

@tahoecoop
Copy link

I don't have anything too specific for you. I am setting breakpoints and its not even getting inside the block on PFFacebookUtils.logInInBackground function. The user gets into the facebook app fine to do the allow access, and when they send it back to my app, it just crashes. This seems to be a new-ish crash that's happening, everything seemed to work before. Thanks for your help!

@flovilmart
Copy link
Contributor

it just crashes

When it crashes, there's a crash log, a stack trace etc... can you please gather it?

@tahoecoop
Copy link

  • thread Update coveralls integration. #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    • frame #0: 0x000000010594faa4 libswiftCore.dylibswift_getObjectType + 60 frame #1: 0x0000000104a49ec0 Likemoji Experience@objc AppDelegate.application(_:open:sourceApplication:annotation:) at AppDelegate.swift:0
      frame Combine podspecs, using platform-specific settings #2: 0x000000018eb24acc UIKit__58-[UIApplication _applicationOpenURLAction:payload:origin:]_block_invoke + 880 frame #3: 0x000000018eb24440 UIKit-[UIApplication _applicationOpenURLAction:payload:origin:] + 596
      frame Fix typo #4: 0x000000018e740e20 UIKit-[UIApplication _handleNonLaunchSpecificActions:forScene:withTransitionContext:completion:] + 5468 frame #5: 0x000000018e709f04 UIKit-[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1632
      frame Consistent error and exception reporting (PFParameterAssert usage) #6: 0x000000018f39f72c UIKit__82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 296 frame #7: 0x000000018e709268 UIKit-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 432
      frame Carthage support #8: 0x000000018f1849b8 UIKit__125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 220 frame #9: 0x000000018f2d2ae8 UIKit_performActionsWithDelayForTransitionContext + 112
      frame Disable module autolink setting for Framework targets. #10: 0x000000018e708c88 UIKit-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 248 frame #11: 0x000000018e708624 UIKit-[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 368
      frame PFFile TLS Download Support #12: 0x000000018e7463b0 UIKit-[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 468 frame #13: 0x000000018736cf24 FrontBoardServices__80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke.362 + 212
      frame Comment - Can't build framework using rakefile #14: 0x0000000106199220 libdispatch.dylib_dispatch_client_callout + 16 frame #15: 0x00000001061a5850 libdispatch.dylib_dispatch_block_invoke_direct + 232
      frame Parse for iOS v1.8.0 breaks localization #16: 0x00000001873a0878 FrontBoardServices__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36 frame #17: 0x00000001873a051c FrontBoardServices-[FBSSerialQueue _performNext] + 404
      frame PFFile Directories Need Clean Up #18: 0x00000001873a0ab8 FrontBoardServices-[FBSSerialQueue _performNextFromRunLoopSource] + 56 frame #19: 0x0000000184b17404 CoreFoundationCFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24
      frame Remove old GHUnit defines. #20: 0x0000000184b16c2c CoreFoundation__CFRunLoopDoSources0 + 276 frame #21: 0x0000000184b1479c CoreFoundation__CFRunLoopRun + 1204
      frame Cleanup assertions, convert to macros where possible. #22: 0x0000000184a34da8 CoreFoundationCFRunLoopRunSpecific + 552 frame #23: 0x0000000186a17020 GraphicsServicesGSEventRunModal + 100
      frame Remove unused PFBlockRetryer. #24: 0x000000018ea1578c UIKitUIApplicationMain + 236 frame #25: 0x0000000104a4b01c Likemoji Experiencemain at AppDelegate.swift:15
      frame Adding a property named state to a PFObject causes a crash #26: 0x00000001844c5fc0 libdyld.dylib`start + 4

@flovilmart
Copy link
Contributor

@markuswinkler the branch xcode-9.3 should have what you’re looking for.

@ranhsd
Copy link

ranhsd commented Apr 15, 2018

Hi @flovilmart the latest SDK version is 4.32.0 and in the xcode-9.3 branch it's 4.29

Thanks!

@flovilmart
Copy link
Contributor

flovilmart commented Apr 15, 2018

@ranhsd I used permissive semver so that value doesn't really matter. Actually, the lower the better, this way you have a way to go 'back'

Also I just tested and it properly installs 4.32:

Installing FBSDKCoreKit (4.32.0)
Installing FBSDKLoginKit (4.32.0)
Installing Parse (1.17.1)

@ranhsd
Copy link

ranhsd commented Apr 15, 2018

Hi @flovilmart you're right. didn't noticed that

thanks

@markuswinkler
Copy link
Contributor Author

@flovilmart Thank you!

@flovilmart
Copy link
Contributor

@markuswinkler let me known if everything is OK before I merge and release

@ranhsd
Copy link

ranhsd commented Apr 16, 2018

Hi @flovilmart , tested in on my side and it works as expected.

@markuswinkler
Copy link
Contributor Author

@flovilmart Please update also 'FBSDKShareKit' to '~ 4.29'. Thank you.

@flovilmart
Copy link
Contributor

FBSDKSharekit don’t build after 4.29.

@gateway
Copy link

gateway commented Apr 16, 2018

Is anyone experiencing login issue crashes with facebook by chance?

@flovilmart
Copy link
Contributor

@gateway stacktrace please

@markuswinkler
Copy link
Contributor Author

@flovilmart I can install FBSDKShareKit 4.32.0

@markuswinkler
Copy link
Contributor Author

@gateway I had a similar issues that all logins resulted in cancel. Facebook changed something. Work around was to delete the app from the account I was logging in with to get the full permission prompt again.

@gateway
Copy link

gateway commented Apr 16, 2018

@flovilmart I believe @tahoecoop did above? Also on this page https://developers.facebook.com/docs/facebook-login/access-tokens/refreshing they are stating Between April 9–21, 2018, tokens for users who have not actively logged into your app and granted consent to permissions in the last 90 days will expire. To refresh these user tokens, you must send people through the login process, and they must renew consent by clicking the Continue button. Renewal of consent is now required every 90 days.

@markuswinkler
Copy link
Contributor Author

Well, there is certainly something wrong with the native Facebook SDK then. It simply didn't show me the permissions dialogue and instead returned cancel and no token when I tried to login with it.

@flovilmart
Copy link
Contributor

@gateway the stacktrace posted doesn’t help much, another would help.

@tahoecoop
Copy link

Here is the full stack trace. It only crashes when using the native FB app rather than just inputting email/password. Thanks a lot for the assistance!!

thread #1, queue = 'com.apple.main-thread'
frame #0: 0x0000000101e83aa4 libswiftCore.dylibswift_getObjectType + 60 frame #1: 0x0000000100f4dec0 Likemoji Experience@objc AppDelegate.application(_:open:sourceApplication:annotation:) at AppDelegate.swift:0
frame #2: 0x000000018eb24acc UIKit__58-[UIApplication _applicationOpenURLAction:payload:origin:]_block_invoke + 880 frame #3: 0x000000018eb24440 UIKit-[UIApplication _applicationOpenURLAction:payload:origin:] + 596
frame #4: 0x000000018e740e20 UIKit-[UIApplication _handleNonLaunchSpecificActions:forScene:withTransitionContext:completion:] + 5468 frame #5: 0x000000018e709f04 UIKit-[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1632
frame #6: 0x000000018f39f72c UIKit__82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 296 frame #7: 0x000000018e709268 UIKit-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 432
frame #8: 0x000000018f1849b8 UIKit__125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 220 frame #9: 0x000000018f2d2ae8 UIKit_performActionsWithDelayForTransitionContext + 112
frame #10: 0x000000018e708c88 UIKit-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 248 frame #11: 0x000000018e708624 UIKit-[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 368
frame #12: 0x000000018e7463b0 UIKit-[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 468 frame #13: 0x000000018736cf24 FrontBoardServices__80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke.362 + 212
frame #14: 0x00000001026a1220 libdispatch.dylib_dispatch_client_callout + 16 frame #15: 0x00000001026ad850 libdispatch.dylib_dispatch_block_invoke_direct + 232
frame #16: 0x00000001873a0878 FrontBoardServices__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36 frame #17: 0x00000001873a051c FrontBoardServices-[FBSSerialQueue _performNext] + 404
frame #18: 0x00000001873a0ab8 FrontBoardServices-[FBSSerialQueue _performNextFromRunLoopSource] + 56 frame #19: 0x0000000184b17404 CoreFoundationCFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24
frame #20: 0x0000000184b16c2c CoreFoundation__CFRunLoopDoSources0 + 276 frame #21: 0x0000000184b1479c CoreFoundation__CFRunLoopRun + 1204
frame #22: 0x0000000184a34da8 CoreFoundationCFRunLoopRunSpecific + 552 frame #23: 0x0000000186a17020 GraphicsServicesGSEventRunModal + 100
frame #24: 0x000000018ea1578c UIKitUIApplicationMain + 236 frame #25: 0x0000000100f4f01c Likemoji Experiencemain at AppDelegate.swift:15
frame #26: 0x00000001844c5fc0 libdyld.dylib`start + 4

@flovilmart
Copy link
Contributor

@tahoecoop are you able to post your app delegate? And most precisely the methods that you implément? I’m thinking it’s possible a UIKit/Swift bug more than a Facebook SDK bug

@tahoecoop
Copy link

Here are all the funcs in my app delegate. If needed, I can sterilize some stuff and post full functions. Thank you!!

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {... }

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {...}

func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {... }

func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) {...}

func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {...}

func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {...}

func applicationWillResignActive(_ application: UIApplication) {...}

func applicationDidEnterBackground(_ application: UIApplication) {...}

func applicationWillEnterForeground(_ application: UIApplication) {...}

func applicationDidBecomeActive(_ application: UIApplication) {...}

func applicationWillTerminate(_ application: UIApplication) {...}

PLUS standard Core Data Stack.

@flovilmart
Copy link
Contributor

flovilmart commented Apr 17, 2018

There is also that method that you can override:

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options NS_AVAILABLE_IOS(9_0); // no equiv. notification. return NO if the application can't open for some reason

the one you're using

 - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(nullable NSString *)sourceApplication annotation:(id)annotation NS_DEPRECATED_IOS(4_2, 9_0, "Please use application:openURL:options:") __TVOS_PROHIBITED;

has been deprecated since iOS 9. What SDK are you targetting?

@tahoecoop
Copy link

@flovilmart You nailed it, great catch! Xcode didn't supply any warnings about that function being deprecated. I'm targeting iOS 10.0. Thanks a lot!

@logicsb
Copy link

logicsb commented May 8, 2018

@flovilmart its possible to update the 'FBSDKShareKit' to '~ 4.29'? Because the messenger sharing features is introduced on this version. Thanks.

@flovilmart
Copy link
Contributor

Just merged the xcode-9.3 branch to master, you can use the master branch with cocoapods.

@markuswinkler
Copy link
Contributor Author

@flovilmart Yes, that totally works 😊

@tahoecoop
Copy link

@flovilmart That's great, thanks a lot!!

@danielchangsoojones
Copy link

danielchangsoojones commented May 27, 2018

I was getting a Facebook login crash because I was using, in the App Delegate, a deprecated function:


` - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(nullable NSString *)sourceApplication annotation:(id)annotation NS_DEPRECATED_IOS(4_2, 9_0, "Please use application:openURL:options:") __TVOS_PROHIBITED;
`

when I needed to use:

func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
        return FBSDKApplicationDelegate.sharedInstance().application(app, open: url, options: options)
    }

This fixed the crash. I am not sure why it was working for a couple of months, and then all of a sudden it started breaking. I assume Facebook changed something, and that caused the crash now, but I am not sure. Hope this knowledge helps others.

@tahoecoop
Copy link

Hi @flovilmart ! I'm still having this issue, just tried updating cocoapods. Both loginkit and corekit are still locked to 4.28. Any assistance is greatly appreciated!

@flovilmart
Copy link
Contributor

Can you be more explicit please?

@tahoecoop
Copy link

I updated my pods, including Parse, Parse/FacebookUtils, and Parse/UI. For the Facebook utils, something is locking FBSDKCoreKit and FBSDKLoginKit to v4.28. The current version of these frameworks is 4.38. Thanks for your help!

@flovilmart
Copy link
Contributor

But parse? As mentioned in the 6 month old comments, the versions are now very permissive if uou’re Using the master branch as a dependency

@tahoecoop
Copy link

I'm not sure unfortunately, shouldn't the Parse/FacebookUtils update these Facebook frameworks to the latest versions? I'm not referencing another git branch or anything, just master branch. Any idea what would lock these FBSDK frameworks to this older version? Thanks again!

@flovilmart
Copy link
Contributor

The resolution is shared in the thread, use the master branch of this repo. If this is not a satisfactory solution, then you can probably open a PR with something more suitable to your needs

@tahoecoop
Copy link

Thanks for your reply, I am using master branch, I'm using pod 'Parse' and pod 'ParseFacebookUtils'. The FBSDK dependencies never updated for me since this thread started 6 months ago. I tried getting the FBSDKs as their own cocoapods but the version is still downgraded to 4.28 by ParseFacebookUtils. I'm down to change whatever, I am not sure why it would still be locked to 4.28 though. Any insight would be greatly appreciated. Thanks again!

@flovilmart
Copy link
Contributor

flovilmart commented Oct 23, 2018

pod 'ParseFacebookUtils'.

ParseFacebookUtils is deprecated and you should use Parse/FacebookUtils (https://cocoapods.org/pods/ParseFacebookUtilsV4)

It is also printed in bold when you run your pod install in your console.

@flovilmart
Copy link
Contributor

I also guess you didn't take the time to have a look at the README

where we state:

If you wish to use the Facebook or Twitter utils or ParseUI, you can now leverage Cocoapods 'subspecs'

pod 'Parse/FacebookUtils'
pod 'Parse/TwitterUtils'
pod 'Parse/UI'
Note that in this case, the Parse framework will contain all headers and classes, so you just have to use:

import Parse
@import Parse;

So back to your question as for why it is locked on those versions, it's because you did not update your pods.

@tahoecoop
Copy link

Thanks for your response, I did read the docs as a matter of fact. My podfile is correct, I'm using pod 'Parse/FacebookUtils'.

@tahoecoop
Copy link

I see the podspec was updated as well, I'm just trying to figure out what's happening. Not sure why it still wants to lock it at 4.28. I'll do some more research and see if I can dig anything up. Thanks again.

@flovilmart
Copy link
Contributor

As I showed a minute ago, the parse SDK podspec will never let 4.28 as a proper version if you are using the master branch. I strongly suggest you triple check what you consider being the ‘master’ branch for your podspec.

Can you share those lines?

@tahoecoop
Copy link

These are my dependencies in my podfile, is there anything else I need to be updating? Thank you!
screen shot 2018-10-23 at 5 05 30 pm

@dplewis
Copy link
Member

dplewis commented Oct 24, 2018

@tahoecoop How about your podfile.lock?

@flovilmart
Copy link
Contributor

Those are not pointing to the master branch, but the last version.

See https://stackoverflow.com/questions/39930664/how-to-install-a-pod-from-a-specific-branch

@tahoecoop
Copy link

Awesome, everything updated properly when I explicitly point it at the master branch. When I looked at the branches for the project, it says that Master is the default branch so I assumed I was getting this. Thanks for your help, I really appreciate it!!!

@flovilmart
Copy link
Contributor

perhaps you should spend a few hours understanding your tools like cocoapods, not assume maintainers are ‘wrong’ and you did everything ‘right’.

@tahoecoop
Copy link

I didn't assume anything my friend, that is why I was coming to ask for assistance. I was merely following the docs, it says nothing about pointing to the master branch. Thanks again for your quick response.

@flovilmart
Copy link
Contributor

I am not 'your friend', I merely point out that by 2 times I repeated that you should point your pod to use the master branch in which you never asked: 'How do I point to the master branch' but always assumed that you were pointing to it already.

I'm not referencing another git branch or anything, just master branch
I am using master branch
it says that Master is the default branch so I assumed I was getting this

Yes the 'docs' don't specifically detail how to use cocoapods, this is what cocoapods docs are for (and stackoverflow).

I am just appalled, good luck!

@benpackard
Copy link

This is a really disappointing discussion. Unless I'm missing something, @tahoecoop's questions are legitimate and politely asked. @flovilmart I don't get the hostility? I'm sure you deal with a ton of low-effort/poorly researched issues (and rarely any pull requests to help contribute), and everyone here is grateful for your work on the project. But this is a poor representation of that hard work and discourages others from asking questions, discovering the platform, and sticking around long enough to contribute themselves.

@flovilmart
Copy link
Contributor

This is exactly your point, I get 100% of poorly researched issues and 0% help. Now if any one want to pick the SDK, i’m Done contributing to it.

@benpackard
Copy link

Your work would be sorely missed but I can understand why you feel that way.

@flovilmart
Copy link
Contributor

Feel free to comment here:

#1356

I'll be watching this issue and if @gateway wants to step in instead of 👎 and pointing fingers it would be about time.

@markuswinkler
Copy link
Contributor Author

@flovilmart

This is exactly your point, I get 100% of poorly researched issues and 0% help. Now if any one want to pick the SDK, i’m Done contributing to it.

@flovilmart Please keep up the great work!
I am part of a two person startup (Pretzel) and just made some long overdue contribution and signed up as a monthly backer. (sorry for taking this long, we are bootstrapped 😅)

@flovilmart
Copy link
Contributor

@markuswinkler thanks for the contribution, this means a lot. Money has never been an issue. Time and commitment however have always lacked in this community.

I don’t personally know what to to with the money given on open collective, but I would know how to leverage motivated contributors and maintainers.
In any case, thanks again for your commitment, this means a lot

@markuswinkler
Copy link
Contributor Author

@flovilmart You are very very welcome!
You have been nothing but friendly and supportive whenever I asked a question and helped me out of a pickle or two. I know this must have felt thankless sometimes, but there is no way we would have been able to build our product without your constant fixes, contributions and maintenance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants