question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Export command error: getaddrinfo EAI_AGAIN null

See original GitHub issue

Please do not report security vulnerabilities here. The Responsible Disclosure Program details the procedure for disclosing security issues.

Thank you in advance for helping us to improve this library! Please read through the template below and answer all relevant questions. Your additional work here is greatly appreciated and will help us respond as quickly as possible. For general support or usage questions, use the Auth0 Community or Auth0 Support. Finally, to avoid duplicates, please search existing Issues before submitting one here.

By submitting an Issue to this repository, you agree to the terms within the Auth0 Code of Conduct.

Description

When executing:

a0deploy export --debug --format directory --config_file config.json --output_folder .

I get the error:

2022-05-04T16:17:51.079Z - error: Problem running command export
2022-05-04T16:17:51.080Z - error: getaddrinfo EAI_AGAIN null

N.B.: What’s really strange is that, with the exact same configuration, the import command works perfectly!

Reproduction

  • created config.json as explained at Configure the Deploy CLI Tool
  • run
    a0deploy export --debug --format directory --config_file config.json --output_folder .
    
  • get the error

Environment

  • Version of this library used: 7.3.7
  • Version of the platform or framework used, if applicable:
  • Other relevant versions (language, server software, OS, browser): Ubuntu 20.04.4 LTS 64 bit
  • Other modules/plugins/libraries that might be involved:

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
willveddcommented, May 10, 2022

@Luca8991 Thanks for opening this ticket. I can understand how you triggered this bug and would like to prevent it from happening to other folks in the future. We’re in the process of revamping our documentation so my hope is to make it more clear about how to inject environment variables and leverage the keyword mappings. However, because you were able to resolve this ticket and there are no other action items, I’m opting to close this ticket.

1reaction
willveddcommented, May 6, 2022

Ok great I’m glad you figured it out. If you intend to pass in environment variables for the authentication details, I advise you to explicitly enable that with the --env=true flag for both import and export. You also do not need to create the environment variable mapping in the config.json file. Instead, you can omit entirely and the tool will automatically apply those environment variables. Example:

config.json

{
  "AUTH0_ALLOW_DELETE": false
}
AUTH0_DOMAIN=<your domain> AUTH0_CLIENT_SECRET=<your client secret> AUTH0_CLIENT_ID=<your client ID> a0deploy export --env=true --output_folder=local --format=directory -c=config.json

The weird thing is that running the import command works even without --env=true flag.

This is because the env flag defaults to true for the import command whereas it defaults to false for export. I know it sounds absurd, but this was just the result of maintaining backwards compatibility and poor forward thinking. I intend to solve this in the next major release, but no timetable on that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's the cause of the error 'getaddrinfo EAI_AGAIN'?
EAI_AGAIN is a DNS lookup timed out error, means it is a network connectivity error or proxy related error.
Read more >
mongooseserverselectionerror: getaddrinfo eai_again mongodb
The error getaddrinfo EAI_AGAIN suggests that your docker environment is unable to reach the internet. Hence the call to an external API is...
Read more >
Node.js Error Message “getaddrinfo ENOTFOUND localhost ...
Here's what you need to do to get that server up and running! First enter this command in the terminal. sudo nano /etc/hosts....
Read more >
How to Send e-mail using Node.js - CodeForGeek
Switch to that folder using Command prompt or Terminal and type npm ... at Object.module.exports. ... { Error: getaddrinfo EAI_AGAIN smtp.gmail.com:465
Read more >
What's the source of Error: getaddrinfo EAI_AGAIN? - SyntaxFix
EAI_AGAIN is a DNS lookup timed out error, means it is a network connectivity error or proxy related error. My main question is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found