firebase-ios-sdk: NSInvalidArgumentException, reason: 'data parameter is nil' when parsing FIRUser IDToken
[READ] Step 1: Are you in the right place?
- For issues or feature requests related to the code in this repository
file a Github issue.
- If this is a feature request make sure the issue title starts with “FR:”.
- For general technical questions, post a question on StackOverflow with the firebase tag.
- For general Firebase discussion, use the firebase-talk google group.
- For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel.
[REQUIRED] Step 2: Describe your environment
- Xcode version: 9.3
- Firebase SDK version: 4.12.0
- Firebase Component: Auth
- Component version: 4.6.0
[REQUIRED] Step 3: Describe the problem
When trying to retrieve a user’s firebase id token using .getIdToken(), this call stack is thrown:
0 CoreFoundation 0x00000001176b51e6 __exceptionPreprocess + 294
1 libobjc.A.dylib 0x00000001162c4031 objc_exception_throw + 48
2 CoreFoundation 0x000000011772a975 +[NSException raise:format:] + 197
3 Foundation 0x0000000115d05cf0 +[NSJSONSerialization JSONObjectWithData:options:error:] + 67
4 eulerity-ios dev 0x000000010dc2cd4c -[FIRUser parseIDToken:error:] + 261
5 eulerity-ios dev 0x000000010dc2ca3d __53-[FIRUser getIDTokenResultForcingRefresh:completion:]_block_invoke_2 + 82
6 eulerity-ios dev 0x000000010dc2d0c4 __51-[FIRUser internalGetTokenForcingRefresh:callback:]_block_invoke + 183
7 eulerity-ios dev 0x000000010dc27a97 __65-[FIRSecureTokenService fetchAccessTokenForcingRefresh:callback:]_block_invoke + 93
8 eulerity-ios dev 0x000000010dc2531e __38-[FIRAuthSerialTaskQueue enqueueTask:]_block_invoke + 114
9 libdispatch.dylib 0x0000000118b7c807 _dispatch_call_block_and_release + 12
10 libdispatch.dylib 0x0000000118b7d848 _dispatch_client_callout + 8
11 libdispatch.dylib 0x0000000118b85c41 _dispatch_queue_serial_drain + 1305
12 libdispatch.dylib 0x0000000118b86556 _dispatch_queue_invoke + 328
13 libdispatch.dylib 0x0000000118b8592d _dispatch_queue_serial_drain + 517
14 libdispatch.dylib 0x0000000118b86556 _dispatch_queue_invoke + 328
15 libdispatch.dylib 0x0000000118b823a0 _dispatch_queue_override_invoke + 726
16 libdispatch.dylib 0x0000000118b893c8 _dispatch_root_queue_drain + 664
17 libdispatch.dylib 0x0000000118b890d2 _dispatch_worker_thread3 + 132
18 libsystem_pthread.dylib 0x00000001190a71ca _pthread_wqthread + 1387
19 libsystem_pthread.dylib 0x00000001190a6c4d start_wqthread + 13
I did not experience this error prior to updating my pod file from 4.4.4 to 4.6.0. I am getting the same error when I use the preferred method .getIdTokenForcingRefresh(Bool).
Steps to reproduce:
What happened? How can we make the problem occur? This could be a description, log/console output, etc.
Using FirebaseAuth pod 4.6.0, call the instance method getIdToken() on the current firebase user.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 6
- Comments: 20 (6 by maintainers)
The fix has been pushed to master from #1076 and we’re working to get a 4.12.1 release deployed.
See the instructions here and use the ‘master’ tag if you’d like to try out the fix earlier.
Downgrading the library gives me the following linker error:
Undefined symbols for architecture arm64: “_kFIRLoggerSwizzler”, referenced from: ___63+[FIRSwizzler swizzleClass:selector:isClassSelector:withBlock:]_block_invoke in FirebaseMethodSwizzler(FIRSwizzler_360b26e2244d68994ab8f6788d06111b.o) ld: symbol(s) not found for architecture arm64
EDIT: Had to revert to an older podfile.lock that seemed to work. Must have been some weird dependency stuff going on.
4.13.0 is now published to CocoaPods with fix.
We’re working on a fix. In the meantime, you can workaround by rolling Firebase back to 4.11.0 with FirebaseAuth 4.5.0.
@JaredHalpern Yep. Just rolled back to 4.11.0 and everything is back to normal. Thanks.
@bryanbartow try rolling back in the interim. Worked for us and we’re able to keep moving forward.
It seems like Firebase found a workaround. If you run
pod installa few library are downgraded:After that it’s working again.