Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AOT build failing with error "Access token is required for new ApiAi.Client instance" #6

Open
xmlking opened this issue Aug 12, 2018 · 3 comments
Labels
good first issue Good for newcomers Hacktoberfest type: bug Something isn't working

Comments

@xmlking
Copy link

xmlking commented Aug 12, 2018

I am trying to configure my module using forRoot and data form environment like you did in this project. but getting following error.
Error

 Error: Uncaught (in promise): ApiAiClientConfigurationError: Access token is required for new ApiAi.Client instance

wonder if you have any workaround for AOT build to make it work with forRoot
https://github.com/sfeir-open-source/angular-search-experience/blob/master/src/app/core/core.module.ts#L19

@Haroenv
Copy link
Collaborator

Haroenv commented Aug 13, 2018

IIRC you need to create your own API key and change it here: https://github.com/sfeir-open-source/angular-search-experience/blob/master/src/environments/environment.ts#L17 but @manekinekko will know best

@manekinekko
Copy link
Owner

@Haroenv is correct, this is due to a wrong access token being used for the dialogflow client. However, I'm gonna probably remove the easter egg part from the rest of the app.

In the meantime, you may wanna create a dialogflow account and use your own token. Here is how: https://dialogflow.com/docs/reference/agent#obtaining_access_tokens

@manekinekko manekinekko self-assigned this Aug 13, 2018
@manekinekko manekinekko added the type: bug Something isn't working label Aug 13, 2018
@xmlking
Copy link
Author

xmlking commented Aug 13, 2018

I am using my own key.
If you uncomment line here , and run ng serve —aot , you can see the error.
https://github.com/xmlking/ngx-starter-kit/blob/master/libs/dashboard/src/lib/dashboard.module.ts#L24

@manekinekko manekinekko removed their assignment Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Hacktoberfest type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants