- changed status to resolved
Issue deploying functions to Heroku in sf functions 1.4.2: "TypeError: Cannot read property 'message' of undefined"
Issue #2034
resolved
There appears to be a regression in the sf functions
plugin 1.4.2 (released 2022-1-13) where instead of clearly stating that a functions login is required, it instead fails with:
$ sf deploy functions -o connectionName
Pushing changes to functions... failed
TypeError: Cannot read property 'message' of undefined
This manifests in IC2 when you try to push all functions into Heroku without a valid functions session. Previously IC2 would prompt you to log in, then retry the deployment, but now it just fails with the error message above.
I've communicated this to Salesforce, and I've implemented a workaround locally that I will release shortly if Salesforce does not release their own proper fix. The manual workaround in the interim is to run the following from the CLI:
$ sf login functions
Comments (1)
-
reporter - Log in to comment
Delivered in 2.2.0.3. Once these regressions have been fixed in the CLI command itself I'll remove the workarounds.