firebase-ios-sdk icon indicating copy to clipboard operation
firebase-ios-sdk copied to clipboard

Error GTMSessionFetcher unrecognized when login and sign-up

Open bank18651 opened this issue 8 years ago • 18 comments

Describe your environment

  • Swift
  • iOS version: 11.4
  • Firebase (5.6.0)
  • FirebaseAuth (5.0.3)
  • GoogleSignIn (4.1.2)

Describe the problem

Currently, The project use Firebase (5.0.1), Firebase/Auth (5.0.1), GoogleSignIn (4.1.2 and it working well but after update to Firebase (5.6.0), FirebaseAuth (5.0.3) I got the issue.

Steps to reproduce:

Auth.auth().fetchProviders(forEmail: email)

Observed Results:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GTMSessionFetcher setFetcher:forTask:]: unrecognized selector sent to instance 0x7f9952cc5410'
  *** First throw call stack:
(
	0   CoreFoundation                      0x000000010e6811e6 __exceptionPreprocess + 294
	1   libobjc.A.dylib                     0x000000010dd1e031 objc_exception_throw + 48
	2   CoreFoundation                      0x000000010e702784 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
	3   CoreFoundation                      0x000000010e603898 ___forwarding___ + 1432
	4   CoreFoundation                      0x000000010e603278 _CF_forwarding_prep_0 + 120
	5   GTMSessionFetcher                   0x0000000109966cec -[GTMSessionFetcherService fetcherDidBeginFetching:] + 396
	6   GTMSessionFetcher                   0x0000000109941d2d -[GTMSessionFetcher beginFetchMayDelay:mayAuthorize:] + 10845
	7   GTMSessionFetcher                   0x000000010993e260 -[GTMSessionFetcher beginFetchWithCompletionHandler:] + 320
	8   Pomelo                              0x0000000104478a28 -[FIRAuthBackendRPCIssuerImplementation asyncPostToURLWithRequestConfiguration:URL:body:contentType:completionHandler:] + 1000
	9   Pomelo                              0x000000010447bfae -[FIRAuthBackendRPCImplementation postWithRequest:response:callback:] + 1070
	10  Pomelo                              0x0000000104478d46 -[FIRAuthBackendRPCImplementation createAuthURI:callback:] + 294
	11  Pomelo                              0x0000000104477969 +[FIRAuthBackend createAuthURI:callback:] + 121
	12  Pomelo                              0x000000010445ed06 __45-[FIRAuth fetchProvidersForEmail:completion:]_block_invoke + 230
	13  libdispatch.dylib                   0x000000010fe747ab _dispatch_call_block_and_release + 12
	14  libdispatch.dylib                   0x000000010fe757ec _dispatch_client_callout + 8
	15  libdispatch.dylib                   0x000000010fe7dbe5 _dispatch_queue_serial_drain + 1305
	16  libdispatch.dylib                   0x000000010fe7e4fa _dispatch_queue_invoke + 328
	17  libdispatch.dylib                   0x000000010fe7a344 _dispatch_queue_override_invoke + 726
	18  libdispatch.dylib                   0x000000010fe8136c _dispatch_root_queue_drain + 664
	19  libdispatch.dylib                   0x000000010fe81076 _dispatch_worker_thread3 + 132
	20  libsystem_pthread.dylib             0x000000011039f1ca _pthread_wqthread + 1387
	21  libsystem_pthread.dylib             0x000000011039ec4d start_wqthread + 13
)

bank18651 avatar Aug 20 '18 03:08 bank18651

What version of GTMSessionFetcher are you using?

Can you share your project?

morganchen12 avatar Aug 20 '18 16:08 morganchen12

  - GTMOAuth2 (1.1.6):
    - GTMSessionFetcher (~> 1.1)
  - GTMSessionFetcher (1.2.0):
    - GTMSessionFetcher/Full (= 1.2.0)
  - GTMSessionFetcher/Core (1.2.0)
  - GTMSessionFetcher/Full (1.2.0):
    - GTMSessionFetcher/Core (= 1.2.0)

Unfortunately, I cannot share the project.

bank18651 avatar Aug 21 '18 04:08 bank18651

Can you reproduce this issue in a smaller project and share it?

morganchen12 avatar Aug 21 '18 17:08 morganchen12

I try to reproduce with other project but it's not happen. I will find out the way for reproduce it and update. Do you have anything to suggest me to do next?

bank18651 avatar Aug 29 '18 06:08 bank18651

Not sure. It's difficult to diagnose given it shouldn't be an issue in your linker flags. You can try updating your pods to see if there's a newer version of GTMSessionFetcherService or update your CocoaPods rubygem and reinstall your pods.

morganchen12 avatar Aug 29 '18 16:08 morganchen12

After updated to Firebase/Auth (5.8.0) I got stuck from this line from fetch providers. screen shot 2561-09-17 at 6 42 31 pm

bank18651 avatar Sep 17 '18 11:09 bank18651

Can you share a stack trace at the hang?

morganchen12 avatar Sep 18 '18 02:09 morganchen12

*** First throw call stack:
(
	0   CoreFoundation                      0x0000000110d0a1e6 __exceptionPreprocess + 294
	1   libobjc.A.dylib                     0x000000011026d031 objc_exception_throw + 48
	2   CoreFoundation                      0x0000000110d8b784 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
	3   CoreFoundation                      0x0000000110c8c898 ___forwarding___ + 1432
	4   CoreFoundation                      0x0000000110c8c278 _CF_forwarding_prep_0 + 120
	5   GTMSessionFetcher                   0x000000010c3fccec -[GTMSessionFetcherService fetcherDidBeginFetching:] + 396
	6   GTMSessionFetcher                   0x000000010c3d7d2d -[GTMSessionFetcher beginFetchMayDelay:mayAuthorize:] + 10845
	7   GTMSessionFetcher                   0x000000010c3d4260 -[GTMSessionFetcher beginFetchWithCompletionHandler:] + 320
	8   Pomelo                              0x0000000106e1e3b8 -[FIRAuthBackendRPCIssuerImplementation asyncPostToURLWithRequestConfiguration:URL:body:contentType:completionHandler:] + 1000
	9   Pomelo                              0x0000000106e2193e -[FIRAuthBackendRPCImplementation postWithRequest:response:callback:] + 1070
	10  Pomelo                              0x0000000106e1e6d6 -[FIRAuthBackendRPCImplementation createAuthURI:callback:] + 294
	11  Pomelo                              0x0000000106e1d2f9 +[FIRAuthBackend createAuthURI:callback:] + 121
	12  Pomelo                              0x0000000106e04686 __45-[FIRAuth fetchProvidersForEmail:completion:]_block_invoke + 230
	13  libdispatch.dylib                   0x000000011271a7ab _dispatch_call_block_and_release + 12
	14  libdispatch.dylib                   0x000000011271b7ec _dispatch_client_callout + 8
	15  libdispatch.dylib                   0x0000000112723be5 _dispatch_queue_serial_drain + 1305
	16  libdispatch.dylib                   0x00000001127244fa _dispatch_queue_invoke + 328
	17  libdispatch.dylib                   0x0000000112720344 _dispatch_queue_override_invoke + 726
	18  libdispatch.dylib                   0x000000011272736c _dispatch_root_queue_drain + 664
	19  libdispatch.dylib                   0x0000000112727076 _dispatch_worker_thread3 + 132
	20  libsystem_pthread.dylib             0x0000000112c451ca _pthread_wqthread + 1387
	21  libsystem_pthread.dylib             0x0000000112c44c4d start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException

screen shot 2561-09-18 at 10 27 55 am

bank18651 avatar Sep 18 '18 03:09 bank18651

I also got this issue.

nonesc avatar Sep 27 '18 05:09 nonesc

After update library I got error at GTMSessionFetcherService.m line number 438

Using FirebaseABTesting (2.0.0)
Using FirebaseAnalytics (5.2.0)
Using FirebaseAuth (5.0.4)
Using FirebaseAuthInterop (1.0.0)
Using FirebaseCore (5.1.4)
Using GTMOAuth2 (1.1.6)
Using GTMSessionFetcher (1.2.0)
screen shot 2561-10-03 at 11 28 58

bank18651 avatar Oct 03 '18 04:10 bank18651

I got the same error @bank18651. The main difference is that I have 1 target with 2 different Build configurations, it falls only in one configuration. Could it be a Google configuration error?

nicopuri avatar Oct 09 '18 02:10 nicopuri

@nicopuri can you share a project where it crashes?

morganchen12 avatar Nov 07 '18 23:11 morganchen12

Please comment when you have more information.

morganchen12 avatar Nov 12 '18 18:11 morganchen12

I just had the exact same error, it turns out the NewRelic sdk was the culprit. After removing the NewRelic pod I was able to login using Firebase without crashing.

otiasj avatar Feb 20 '19 07:02 otiasj

Thanks @otiasj , the latest version of NewRelic fixed the issue. Sorry @morganchen12 for the really late response.

nicopuri avatar Mar 07 '19 20:03 nicopuri

Thanks @otiasj , the latest version of NewRelic fixed the issue. Sorry @morganchen12 for the really late response. I am facing the exact same error, it turns out the NewRelic sdk was the culprit. After removing the below line I was able to login using Firebase without crashing. [NewRelicAgent startWithApplicationToken:@""];

Nishant-goibibo avatar Apr 25 '19 07:04 Nishant-goibibo

The issue still exist in the latest version of NewRelic (6.6.0) and Firebase (6.1.0) and FirebaseStorage (3.2.1)

Screen Shot 2019-06-11 at 11 53 41 AM

siliconprime-manhnguyen avatar Jun 11 '19 04:06 siliconprime-manhnguyen

I'm getting the same problem, it seemed to be resolved by using this dependencies as a workaround:

  pod 'Firebase/Core', '~> 5.2.0'
  pod 'Firebase/Auth', '~> 5.2.0'
  pod 'Firebase/Messaging', '~> 5.2.0'
  pod 'Firebase/Database', '~> 5.2.0'

This is until the NewRelic stuff gets fixed 👎

CodingAleCR avatar Sep 13 '19 01:09 CodingAleCR