Nodejs-dialogflow: Error: 3 INVALID_ARGUMENT: Read only field 'followup_intent_info' cannot be updated.

Created on 25 Jun 2018  路  11Comments  路  Source: googleapis/nodejs-dialogflow

If you updating an intent which has a follow up intent/intents using the nodejs clients - you will land up with this error.

Environment details

  • OS: Linux
  • Node.js version: LTS (8.11)
  • npm version: (6)
  • dialogflow version: (latest)

Steps to reproduce

  1. Add training example to an intent which has followup intent

Following these steps will guarantee the quickest resolution possible.

Thanks!

question needs more info dialogflow

Most helpful comment

Its seams like updating the intent displayName doesnt work when using the updateMask..

Edit: I found the solution! apparently the updateMask is using "snake_case" for the fields.
You want to define the the fields that you want to update. This seams to work without using the root_followup_intent_name as suggested by DF team. Maybe they fixed it?

intentsClient.updateIntent({
  intent,
  updateMask: {
    paths: ['display_name', 'training_phrases'],
  },
});

All 11 comments

Have confirmed this myself and have submitted a bug report from inside Dialogflow console itself. I suggest that others running into this issue do the same to increase it's visibility.

We are having the same issue. What is the bug report id?

I see forum thread here: https://productforums.google.com/forum/#!msg/dialogflow/0NakkcMnyPg/uF8G9cjaAQAJ

I got this response from the DF support team and I have tested it working. Been meaning to update this thread. Good luck!

Hi,

Thanks for reaching out to Dialogflow Support.

Our engineers are working to fix this issue. At this time, a workaround is to specify root_followup_intent_name in updateMask (and don't pass a value for root_followup_intent_name).

Regards,

Ace
Dialogflow Support Team

Excellent. Thank you for the quick response!

Is there an update to this issue?

Just to clarify updateMask field is a FieldMask.

This is an example of how to use it in order to fix the issue:


const intentsClient = new dialogflow.IntentsClient({
  credentials: {
    client_email,
    private_key,
  }
});

intentsClient.updateIntent({
  intent,
  updateMask: {
    paths: ['rootFollowupIntentName'],
  },
});

Its seams like updating the intent displayName doesnt work when using the updateMask..

Edit: I found the solution! apparently the updateMask is using "snake_case" for the fields.
You want to define the the fields that you want to update. This seams to work without using the root_followup_intent_name as suggested by DF team. Maybe they fixed it?

intentsClient.updateIntent({
  intent,
  updateMask: {
    paths: ['display_name', 'training_phrases'],
  },
});

@omfd are you still running into issues on the latest release of the library?

Looks like @Mag90's code should be the fix here. I'm going to close this issue out, but please let me know if you think that is a mistake and I'll happily re-open 馃槑

Good my people, I know this post has some time but I would like to ask if any of you have created followup with this DialogFlow API, I'm looking for a way to do it.

I think I tried it with the code:
let intent = {
displayName: dataIntent.nameIntent,
trainingPhrases: trainingPhrases,
messages: message
};

let response = await IntentsClient.createIntent( {parent:parent, intent:intent} );

But I can't find a way to create the followup, please help.

Was this page helpful?
0 / 5 - 0 ratings