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

[BUG] 504 error downloading openapi-generator-cli #9349

Closed
4 of 6 tasks
robertmassaioli opened this issue Apr 27, 2021 · 5 comments
Closed
4 of 6 tasks

[BUG] 504 error downloading openapi-generator-cli #9349

robertmassaioli opened this issue Apr 27, 2021 · 5 comments

Comments

@robertmassaioli
Copy link

robertmassaioli commented Apr 27, 2021

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

I get the following output from my builds and running locally:

$ yarn gen-fetch
yarn run v1.22.10
$ openapi-generator-cli generate -i ../openapi.yaml -g typescript-fetch -o src/reminders-client
Unable to query repository, because of: "Request failed with status code 504"

Response:
server awselb/2.0
date Tue, 27 Apr 2021 04:27:08 GMT
content-type text/html
content-length 132
connection close

(node:19114) UnhandledPromiseRejectionWarning: TypeError: error.response.data.on is not a function
    at VersionManagerService.printResponseError (/Users/rmassaioli/Code/my-reminders/frontend/node_modules/@openapitools/openapi-generator-cli/main.js:914:33)
    at CatchSubscriber.selector (/Users/rmassaioli/Code/my-reminders/frontend/node_modules/@openapitools/openapi-generator-cli/main.js:820:18)
    at CatchSubscriber.error (/Users/rmassaioli/Code/my-reminders/frontend/node_modules/rxjs/internal/operators/catchError.js:46:31)
    at MapSubscriber.Subscriber._error (/Users/rmassaioli/Code/my-reminders/frontend/node_modules/rxjs/internal/Subscriber.js:92:26)
    at MapSubscriber.Subscriber.error (/Users/rmassaioli/Code/my-reminders/frontend/node_modules/rxjs/internal/Subscriber.js:72:18)
    at MapSubscriber.Subscriber._error (/Users/rmassaioli/Code/my-reminders/frontend/node_modules/rxjs/internal/Subscriber.js:92:26)
    at MapSubscriber.Subscriber.error (/Users/rmassaioli/Code/my-reminders/frontend/node_modules/rxjs/internal/Subscriber.js:72:18)
    at MapSubscriber.Subscriber._error (/Users/rmassaioli/Code/my-reminders/frontend/node_modules/rxjs/internal/Subscriber.js:92:26)
    at MapSubscriber.Subscriber.error (/Users/rmassaioli/Code/my-reminders/frontend/node_modules/rxjs/internal/Subscriber.js:72:18)
    at /Users/rmassaioli/Code/my-reminders/frontend/node_modules/@nestjs/common/http/http.service.js:51:28
(Use `node --trace-warnings ...` to show where the warning was created)
(node:19114) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:19114) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
✨  Done in 62.60s.
$
openapi-generator version

According to my yarn.lock:

"@openapitools/openapi-generator-cli@^2.0.0":
  version "2.2.5"
  resolved "https://registry.yarnpkg.com/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.2.5.tgz#363611ae37d21fabf15ed297dfd5fe82a013faba"
  integrity sha512-8eTiw9U5PWYZx41RDIrJ6iZ4XCteD6ljupbJS6/ichZEUwa1Pv78y14QSLVfky+1KpJsq/RlqrgjnPm6yMHo6g==
  dependencies:
    "@nestjs/common" "7.6.15"
    "@nestjs/core" "7.6.15"
    "@nuxtjs/opencollective" "0.3.2"
    chalk "4.1.0"
    commander "6.2.1"
    compare-versions "3.6.0"
    concurrently "5.3.0"
    console.table "0.10.0"
    fs-extra "9.1.0"
    glob "7.1.6"
    inquirer "7.3.3"
    lodash "4.17.21"
    reflect-metadata "0.1.13"
    rxjs "6.6.7"
    tslib "1.13.0"
Generation Details

You should be able to run a similar command to the one to reproduce it.

Steps to reproduce

You should be able to run a similar command to the one to reproduce it.

Related issues/PRs

I could not find any similar issues. It was not happening yesterday. The last time that I modified this yarn.lock file according to my git history was the 6th of Apr:

commit 47635fe72671eccfeb0e36c44506adc2c734ddd6
Author: Renovate Bot <renovate@whitesourcesoftware.com>
Date:   Tue Apr 6 10:35:11 2021 +0000

    Update dependency @openapitools/openapi-generator-cli to v2

:100644 100644 7eb2ccf d4068f3 M        frontend/package.json
:100644 100644 5c6f0b5 a327f47 M        frontend/yarn.lock
Suggest a fix

Looks like something is wrong in AWS land.

@robertmassaioli
Copy link
Author

This issue may have resolved itself without me doing anything:

$ yarn gen-fetch  
yarn run v1.22.10
$ openapi-generator-cli generate -i ../openapi.yaml -g typescript-fetch -o src/reminders-client
Download 5.1.0 ...
Downloaded 5.1.0
Did set selected version to 5.1.0
[main] INFO  o.o.codegen.DefaultGenerator - Generating with dryRun=false
[main] INFO  o.o.codegen.DefaultGenerator - OpenAPI Generator: typescript-fetch (client)
[main] INFO  o.o.codegen.DefaultGenerator - Generator 'typescript-fetch' is considered stable.
[main] INFO  o.o.c.l.AbstractTypeScriptClientCodegen - Hint: Environment variable 'TS_POST_PROCESS_FILE' (optional) not defined. E.g. to format the source code, please try 'export TS_POST_PROCESS_FILE="/usr/local/bin/prettier --write"' (Linux/Mac)
[main] INFO  o.o.c.l.AbstractTypeScriptClientCodegen - Note: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI).
[main] INFO  o.o.codegen.DefaultGenerator - Model ReminderResponseList not generated since it's an alias to array (without property) and `generateAliasAsModel` is set to false (default)
[main] INFO  o.o.codegen.TemplateManager - writing file /Users/rmassaioli/Code/my-reminders/frontend/src/reminders-client/models/ErrorResponse.ts
[main] INFO  o.o.codegen.TemplateManager - writing file /Users/rmassaioli/Code/my-reminders/frontend/src/reminders-client/models/IssueDetails.ts
[main] INFO  o.o.codegen.TemplateManager - writing file /Users/rmassaioli/Code/my-reminders/frontend/src/reminders-client/models/ReminderIdList.ts
[main] INFO  o.o.codegen.TemplateManager - writing file /Users/rmassaioli/Code/my-reminders/frontend/src/reminders-client/models/ReminderRequest.ts
[main] INFO  o.o.codegen.TemplateManager - writing file /Users/rmassaioli/Code/my-reminders/frontend/src/reminders-client/models/ReminderResponse.ts
[main] INFO  o.o.codegen.TemplateManager - writing file /Users/rmassaioli/Code/my-reminders/frontend/src/reminders-client/apis/IndividualReminderApi.ts
[main] INFO  o.o.codegen.TemplateManager - writing file /Users/rmassaioli/Code/my-reminders/frontend/src/reminders-client/apis/IssueRemindersApi.ts
[main] INFO  o.o.codegen.TemplateManager - writing file /Users/rmassaioli/Code/my-reminders/frontend/src/reminders-client/apis/UserRemindersApi.ts
[main] INFO  o.o.codegen.TemplateManager - writing file /Users/rmassaioli/Code/my-reminders/frontend/src/reminders-client/index.ts
[main] INFO  o.o.codegen.TemplateManager - writing file /Users/rmassaioli/Code/my-reminders/frontend/src/reminders-client/runtime.ts
[main] INFO  o.o.codegen.TemplateManager - writing file /Users/rmassaioli/Code/my-reminders/frontend/src/reminders-client/apis/index.ts
[main] INFO  o.o.codegen.TemplateManager - writing file /Users/rmassaioli/Code/my-reminders/frontend/src/reminders-client/models/index.ts
[main] INFO  o.o.codegen.TemplateManager - Skipped /Users/rmassaioli/Code/my-reminders/frontend/src/reminders-client/.openapi-generator-ignore (Skipped by supportingFiles options supplied by user.)
[main] INFO  o.o.codegen.TemplateManager - writing file /Users/rmassaioli/Code/my-reminders/frontend/src/reminders-client/.openapi-generator/VERSION
[main] INFO  o.o.codegen.TemplateManager - writing file /Users/rmassaioli/Code/my-reminders/frontend/src/reminders-client/.openapi-generator/FILES
################################################################################
# Thanks for using OpenAPI Generator.                                          #
# Please consider donation to help us maintain this project 🙏                 #
# https://opencollective.com/openapi_generator/donate                          #
################################################################################
✨  Done in 13.87s.
$ 

@michelmattos
Copy link

I'm having this same issue right now.

@robertmassaioli
Copy link
Author

This issue seems to have fixed itself and I have not seen it since.

@omer-za
Copy link
Contributor

omer-za commented Oct 12, 2021

This error happens to me now

@dougkeen
Copy link
Contributor

This issue still exists due to coupling to search.maven.org, and the above issues correlated to outages of that service.
OpenAPITools/openapi-generator-cli#680

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants