Skip to content

[help][functions] Calling HTTP Functions from Android is failing [Error: Response is not valid JSON object.] #5439

Answered by mikehardy
nertilzhuri asked this question in Q&A
Discussion options

You must be logged in to vote

This is a function problem. Not sure why the web SDK doesn't flag it, but your function is not returning JSON in the way we expect.
In particuar, double-quotes are not actually valid JSON are they? I wonder if it works with single quotes.
Here's a testing library of functions we know work, from the related FlutterFire project

https://github.com/FirebaseExtended/flutterfire/blob/master/.github/workflows/scripts/functions/src/index.ts

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@nertilzhuri
Comment options

@mikehardy
Comment options

@nertilzhuri
Comment options

@mikehardy
Comment options

@nertilzhuri
Comment options

Answer selected by nertilzhuri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants