Parameters declared with defineFloat()
always evaluate as 0 at runtime regardless of the value specified in .env file
#5434
Labels
[REQUIRED] Environment info
firebase-tools: 11.20.0
firebase-functions: 4.1.1
Platform: macOS, Debian
[REQUIRED] Test case
firebase-functions
,functions/.env.<projectId>
file with the contentsRANDOM_FLOAT=0.2
,functions/index.js
contents with:[REQUIRED] Steps to reproduce
Deploy the above function.
[REQUIRED] Expected behavior
Logs should show env object with
RANDOM_FLOAT:"0.2"
and response should beRandom float: 0.2
.[REQUIRED] Actual behavior
Logs show env object with
RANDOM_FLOAT:"[\"1.0\"]"
(a JSON array instead of float) and response isRandom float: 0
.The text was updated successfully, but these errors were encountered: