Nodejs-dialogflow: Error: 5 NOT_FOUND: Environment with id 'draft' was not found.

Created on 4 Jun 2018  路  8Comments  路  Source: googleapis/nodejs-dialogflow

Environment details

  • OS: macOS 10.13.5
  • Node.js version: v6.11.5
  • npm version: 6.1.0
  • dialogflow version: 0.5.0

Steps to reproduce

  1. Run the following code snippet
const projectId = 'foo';
const sessionId = 'bar';
const path = sessionClient.environmentSessionPath(projectId, 'draft', '-', sessionId);
// const path = 'projects/foo/agent/environments/draft/users/-/sessions/bar';
const payload = {
            queryInput: {text: {text: 'hallo', languageCode: 'de'}},
            session: path,
            queryParams:
                {
                    timeZone: 'Europe/Berlin',
                    contexts: []
                }
        };

sessionClient
            .detectIntent(payload)
            .then((responses: any) => {
                console.log('Success!');
            }).catch((error: any) => {
            console.error('Error');
            // Error: 5 NOT_FOUND: Environment with id 'draft' was not found.
        });

Based on the documentation, I would expect that the current draft version is targeted.

triage me dialogflow

Most helpful comment

Thanks for reporting this issue!
We have a proposed fix and should be on live after 6/27.

All 8 comments

Do you found a solution? I'm having the same issue.

Unfortunately not. I guess we'll need some support from @xVir , @sstepashka or somebody else from Google.

draft is not an environment.

Try : 'projects/foo/agent/sessions/bar' if you want to configure 'draft'

@premsvuppala yes, I know that solution.
If draft is not an environment, the documentation needs to be updated. The projects code says:

Required. The unique identifier of the context. Format:
projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>,
or
projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/contexts/<Context ID>. Note: Environments and
users are under construction and will be available soon. The Context ID is
always converted to lowercase. If is not specified, we
assume default 'draft' environment. If is not specified, we
assume default '-' user.

Thanks for reporting this issue!
We have a proposed fix and should be on live after 6/27.

@Jeremy-WEI is this supposed to be live yet?

Hi JohannesKuehnel,
Sorry, there was some delay in our release schedule. It should be live by EOD or by tomorrow.

I can confirm that this bug is now fixed for me. Therefore, I'll close this issue.

Was this page helpful?
0 / 5 - 0 ratings