I get the same error and the tips above help me. You need just go to Pub/Sub service on interface, select any topic and click in Trigger Cloud Function, if the permissions aren't ok, will look like this:
Trigger Cloud Function
https://i.sstatic.net/psAn8lfg.png