Dialogflow Client Library: FormatException: "Name does not match template: incorrect number of segments"
See original GitHub issueWe are encountering a problem with the “Google.Cloud.Dialogflow.V2.ContextName.Parse” method. The full stacktrace can be found at the end of this issue. It seems like the method is completely fine with contexts such as: projects/{project-id}/agent/sessions/{sessionId}/contexts/{context-name} but fails at contexts in the following format: projects/{project-id}/agent/environments/{environment-id}/users/{user-id}/sessions/{sessionId}/contexts/{context-name}
We currently can not reproduce when a request session is in the former or in the latter format. Both behaviors are currently observed with two different google users testing an action-on-google with dialogflow which is currently in Alpha phase.
Environment details
- OS: Windows 10
- .NET version: Net Standard (2.0.3)
- Package name and version: Google.Cloud.Dialogflow.V2 (1.0.0-beta02)
Steps to reproduce
- Build an action-on-google with dialogflow and put it into alpha
- Try get a specific context by name such as in the folling code:
webhookRequest.QueryResult.OutputContexts.SingleOrDefault(context => context.ContextName.ContextId == "some-context-i-need-to-read")
- If your session contains the /environment path it will fire the exception of the title.
Stacktrace:
System.FormatException:
at Google.Api.Gax.PathTemplate.ParseName (Google.Api.Gax, Version=2.5.0.0, Culture=neutral, PublicKeyToken=3ec5ea7f18953e47)
at Google.Cloud.Dialogflow.V2.ContextName.Parse (Google.Cloud.Dialogflow.V2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=185c282632e132a0)
at Google.Cloud.Dialogflow.V2.Context.get_ContextName (Google.Cloud.Dialogflow.V2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=185c282632e132a0)
...
Issue Analytics
- State:
- Created 4 years ago
- Comments:23
Top Results From Across the Web
DialogFlow v2 Error: [ResourceName error] Path '' does not ...
It looks like your connection request is failing (first error says ... the URI you are attempting to request from to ensure the...
Read more >Troubleshooting | Dialogflow Documentation
The requests are handled as no input or no match. Listen to the audio recording to confirm that it contains speech.
Read more >PeopleSoft CRM 9.2: PeopleSoft Online Marketing
This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for...
Read more >Troubleshoot Google Cloud Dialogflow CX and ES integrations
I have an agreement with Genesys for my Google Cloud Dialogflow service. Open a Genesys Cloud Customer Care case in My Support Portal....
Read more >Build fulfillment (Dialogflow)
Fulfillment defines the conversational interface for your Action to obtain user input and the logic to process the input and eventually fulfill the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Great - glad you’ve got something for now. I’ve created #4665 to handle this “new and slightly different but with the same cause” breakage. I suggest you subscribe to that issue, and I’ll close it when I publish 3.0.0-beta01.
Thanks. On the move right now, but will look when I’m back at a laptop