You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This causes wrap() to fall back to wrapV1, which calls:
handler.run(data, context) // two args — wrong for v2
Instead of the correct v2 invocation:
handler.run(req) // single CallableRequest object
Impact
Tests using wrap() on v2 callable functions silently use
the wrong invocation path. Auth context is passed incorrectly,
causing permission-denied errors that are unrelated to actual
authorization logic.
Workaround
Bypass wrap() entirely and call handler.run({ data, auth })
directly — which is what wrapV2 does internally.
Activity
IzaakGough commentedon May 15, 2026
Linking original thread for context firebase/firebase-functions#1886.
PR open for fix: #311