4

I run a local emulator for firebase functions. When I'm executing an onCall function from the frontend side I see this message in my functions' console:

{"verifications":{"app":"VALID","auth":"MISSING"},"logging.googleapis.com/labels":{"firebase-log-type":"callable-request-verification"},"severity":"INFO","message":"Callable request verification passed"}

I followed all the instructions (activated App Check in Firebase console, connected reCaptcha, and set up the debug token), but still no success. Does anyone have an idea what's wrong here? Does the App Check work with functions using emulator at all?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • This message looks like the app check call succeeded, but there was no user auth information. Are you saying you expected to see the `auth` property to be populated too? – Frank van Puffelen Sep 15 '21 at 18:14
  • @FrankvanPuffelen indeed, it seems like the `auth` property needs to be `VALID` too. But I don't know how to achieve that. In the console output, I can see that the function is being triggered but not executed. – Yuri Drabik Sep 15 '21 at 18:54
  • Another interesting thing is that the request from the frontend returns 200 status, which means success. – Yuri Drabik Sep 15 '21 at 19:01

1 Answers1

2

I just found what was the problem. I use TypeScript and I did one trick to make path aliases to work with the emulator (by default they do not work). So I had a code explicitly compiling TS using tsconfig-paths npm package in the index file. When I removed that code and refactored my files to not use path aliases it started working for some reason.

  • what was the trick? can you show exactly what you did please! – Solomon Gbadamosi Jan 25 '23 at 10:47
  • @SolomonGbadamosi I've just checked my project. I still see this message about missing auth in the console, actually. But the project works fine, so I don't pay attention to the error. What is your issue currently? Frontend and backend can't communicate locally in the emulator mode? – Yuri Drabik Jan 26 '23 at 11:13