1

I have been using Dialogflow fulfillment inline editor for testing for more than a year. But all of a sudden since past two days, I am not able to deploy it as it is showing error 409

Function dialogflowFirebaseFulfillment in region us-central1 in project ... already exists

I have also tested using old code which was deployed months ago. but same result. I have also shifted to node 10 approximately 2 months ago. For other agents it is working fine as expected but this agent is showing issues.

I have already tried several suggestions provided most of them are not related to this issue.

Why it has started all of a sudden and how can I overcome the issue?

James Z
  • 12,209
  • 10
  • 24
  • 44
Rajkamal Mishra
  • 121
  • 1
  • 9
  • 1
    Based on your question and the nature of the issue, I think the best way to ask about this is through the GCP's [Public Issue Tracker (PIT)](https://cloud.google.com/support/docs/issue-trackers#issue_reports). Looking for the issue I found [this PIT](https://issuetracker.google.com/172305417) where it seems you have already reported this behavior, so I recommend you to follow-up your concern there. – Noe Romero Nov 24 '20 at 16:51
  • Thank you for your suggestion. This problem has been sorted now. – Rajkamal Mishra Nov 25 '20 at 09:05

2 Answers2

0

The solution which I have found is to remove firebase function of the same project and re-deploy the project in the Dialogflow. First save your code somewhere else.

A very important point is that you need to be the admin of the firebase project or ask your admin to follow following steps. Editor can do these steps but your issue will not be resolved. So make sure admin should perform this process.

To achieve this first you need to go to your firebase project. Go to Functions and in Dashboard move your cursor on the table. You can see Three dots on the right side of the row. Click on it and select Delete Function.

After that open your Dialogflow (or refresh if already open). Go to Fulfillment and deploy the code already present there. The default fulfillment code will be deployed and you can see the function in the firebase project has been created. You can now deploy your own code as well.

Rajkamal Mishra
  • 121
  • 1
  • 9
0

I had the same issue. My problem was caused by adding credentials or ServiceAccounts more than once (although i don't know where else i have included it).

Here is the Firebase Admin SDK configuration snippet:

var admin = require("firebase-admin");
var serviceAccount = require("path/to/serviceAccountKey.json");
admin.initializeApp({
  credential: admin.credential.cert(serviceAccount),
  databaseURL: "https://XXXXXXXXXXXX-rtdb.firebaseio.com"
});

when adding firebase configuration snippet in Inline Editor: I only add the following and it works.

var admin = require("firebase-admin");
admin.initializeApp({
  databaseURL: "https://XXXXXXXXXXXX-rtdb.firebaseio.com"
});
Tao
  • 366
  • 1
  • 3
  • 15
  • So you can do a simple search in your code and remove the section which are repeated. Although, I am pretty sure if it is the case, dialogflow must have shown the error and it can not be deployed. The actual issue in the thread is it is not being deployed because of issues in firebase function and not because of any syntax and logical error. Or you can explain your issue here if it is not the case – Rajkamal Mishra Oct 15 '21 at 14:10