Skip to content

The method -callWithObject:completion: throws an exception when trying to encode FIRTimestamp #6979

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

Closed
PomegranateApps opened this issue Nov 17, 2020 · 2 comments

Comments

@PomegranateApps
Copy link

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12.2
  • Firebase SDK version: Latest
  • Installation method: CocoaPods
  • Firebase Component: Functions

[REQUIRED] Step 2: Describe the problem

When calling the method -callWithObject:completion: it throws an exception if the dictionary for the object contains an FIRTimestamp value.

It should be able to encode this value.

Unsupported type: FIRTimestamp for value <FIRTimestamp: seconds=1605621091 nanoseconds=0>"

Steps to reproduce:

What happened? How can we make the problem occur?

FUNThrowInvalidArgument

Relevant Code:

FIRFunctions *functions = [FIRFunctions functions];
FIRHTTPSCallable *function = [functions HTTPSCallableWithName:@"myfunction"];	
NSDictionary *object = @{@"postDate": [FIRTimestamp timestampWithDate:[NSDate now]]};
[function callWithObject:object completion:^(FIRHTTPSCallableResult * _Nullable result, NSError * _Nullable error) {

}];			
@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@paulb777
Copy link
Member

@PomegranateApps Sorry for the trouble, but FirebaseFunctions does not support the FIRTimestamp type. There is an open feature request at #1738

@firebase firebase locked and limited conversation to collaborators Dec 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants