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.

OperationAbortedException when running autorest

See original GitHub issue

Before filling a bug

  • have you checked the faq for known issues.
  • have you checked existing issues

Seems like this went in today. We autogenerate based on our swagger in our automation. npm install -g autorest This started happening mid-day today (3/21/2022 - EDT). Looks like @autorest/core 3.8.1 was published 4 hours ago.

+ autorest --python --openapi-type=arm --add-credentials=true --title=StorageCacheManagementClient --azure-arm=true --license-header=MICROSOFT_MIT_NO_VERSION --package-name=azure-mgmt-storagecache --no-namespace-folders=true --clear-output-folder=true --basic-setup-py=true --package-version=2022.0321.202731 --tag=tag-2021-11-01-preview --input-file=/tmp/azure-rest-api-specs/specification/storagecache/resource-manager/Microsoft.StorageCache/preview/2021-11-01-preview/storagecache.json --level=DEBUG --output-folder=/tmp/pysdk/azure-mgmt-storagecache/azure/mgmt/storagecache
AutoRest code generation utility [cli version: 3.6.0; node: v16.14.1]

(C) 2018 Microsoft Corporation.
https://aka.ms/autorest

/home/cloudtest/.autorest/@autorest_core@3.8.1/node_modules/@autorest/core/dist/src_lib_autorest-core_ts.js:12508
        throw new common_1.OperationAbortedException();
              ^
Error: [OperationAbortedException] Error occurred. Exiting.
    at parseAutorestCliArgs (/home/cloudtest/.autorest/@autorest_core@3.8.1/node_modules/@autorest/core/dist/src_lib_autorest-core_ts.js:12508:15)
    at getCliArgs (/home/cloudtest/.autorest/@autorest_core@3.8.1/node_modules/@autorest/core/dist/app.js:330:53)
    at main (/home/cloudtest/.autorest/@autorest_core@3.8.1/node_modules/@autorest/core/dist/app.js:277:24)
    at Object../src/app.ts (/home/cloudtest/.autorest/@autorest_core@3.8.1/node_modules/@autorest/core/dist/app.js:333:6)
    at __webpack_require__ (/home/cloudtest/.autorest/@autorest_core@3.8.1/node_modules/@autorest/core/dist/app.js:722:42)
    at /home/cloudtest/.autorest/@autorest_core@3.8.1/node_modules/@autorest/core/dist/app.js:738:314
    at Function.__webpack_require__.O (/home/cloudtest/.autorest/@autorest_core@3.8.1/node_modules/@autorest/core/dist/app.js:768:24)
    at __webpack_require__.x (/home/cloudtest/.autorest/@autorest_core@3.8.1/node_modules/@autorest/core/dist/app.js:739:54)
    at Function.__webpack_require__.x (/home/cloudtest/.autorest/@autorest_core@3.8.1/node_modules/@autorest/core/dist/app.js:895:20)
    at /home/cloudtest/.autorest/@autorest_core@3.8.1/node_modules/@autorest/core/dist/app.js:902:57
    at Object.<anonymous> (/home/cloudtest/.autorest/@autorest_core@3.8.1/node_modules/@autorest/core/dist/app.js:905:12)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/cloudtest/.autorest/@au
torest_core@3.8.1/node_modules/@autorest/core/entrypoints/app.js:2:1)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
timotheeguerincommented, Mar 21, 2022

@rebecca-makar seems like this is due to --level=DEBUG not being a valid value. It expect debug (lowercase). It should however explain that instead of crashing like that.

1reaction
rebecca-makarcommented, Mar 22, 2022

Yup. We are on an ubuntu pipeline agent. Looks like it is an error in our swagger.

+ autorest --python --openapi-type=arm --add-credentials=true --title=StorageCacheManagementClient --azure-arm=true --license-header=MICROSOFT_MIT_NO_VERSION --package-name=azure-mgmt-storagecache --no-namespace-folders=true --clear-output-folder=true --basic-setup-py=true --package-version=2022.0322.172033 --tag=tag-2021-11-01-preview --input-file=/tmp/azure-rest-api-specs/specification/storagecache/resource-manager/Microsoft.StorageCache/preview/2021-11-01-preview/storagecache.json --level=debug --version:https://tinyurl.com/ybddbwzc --output-folder=/tmp/pysdk/azure-mgmt-storagecache/azure/mgmt/storagecache
AutoRest code generation utility [cli version: 3.6.0; node: v16.14.1]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
info    | AutoRest core version selected from configuration: https://tinyurl.com/ybddbwzc.
debug   | [1.17 s] No @autorest/core (or @microsoft.azure/autorest-core) is installed.
debug   | [1.17 s] https://tinyurl.com/ybddbwzc[](https://github.com/Azure/autorest/issues) was not satisfied directly by a previous installation.
info    |    Loading AutoRest core      '/home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist' (3.8.3-ci.e3e05f71e)
verbose | [0.75 s] No configuration found at 'file:///mnt/vss/_work/1/s/test/sdk/'.
verbose | [0.76 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/default-configuration.md'
verbose | [0.78 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/inspect.md'
verbose | [0.79 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/directives.md'
verbose | [0.80 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/pipeline.md'
verbose | [0.83 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/loader-openapi.md'
verbose | [0.85 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/miscellaneous.md'
verbose | [0.88 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/plugin-powershell.md'
verbose | [0.92 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/plugin-azureresourceschema.md'
verbose | [0.94 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/plugin-csharp.md'
verbose | [0.97 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/plugin-go.md'
verbose | [0.98 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/plugin-java.md'
verbose | [1.00 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/plugin-nodejs.md'
verbose | [1.02 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/plugin-php.md'
verbose | [1.03 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/plugin-python.md'
verbose | [1.05 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/plugin-ruby.md'
verbose | [1.08 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/plugin-typescript.md'
verbose | [1.10 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/plugin-validators.md'
verbose | [1.13 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/plugin-az.md'
verbose | [1.15 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/plugin-terraform.md'
verbose | [1.18 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/plugin-azure-functions.md'
verbose | [1.20 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/graphs.md'
verbose | [1.24 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestcore@3.8.3-ci.e3e05f71e/nodemodules/@autorest/core/dist/resources/help-configuration.md'
info    |    Installing AutoRest extension '@autorest/python' (latest -> 5.14.0)
info    |    Installed AutoRest extension '@autorest/python' (latest->5.14.0)
verbose | [47.50 s]    Including extension configuration file 'file:///home/cloudtest/.autorest/@autorestpython@5.14.0/nodemodules/@autorest/python/README.md'
verbose | [47.50 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestpython@5.14.0/nodemodules/@autorest/python/README.md'
info    |    Installing AutoRest extension '@autorest/modelerfour' (~4.19.1 -> 4.19.3)
info    |    Installed AutoRest extension '@autorest/modelerfour' (~4.19.1->4.19.3)
verbose | [49.20 s]    Including extension configuration file 'file:///home/cloudtest/.autorest/@autorestmodelerfour@4.19.3/nodemodules/@autorest/modelerfour/readme.md'
verbose | [49.20 s]    Including configuration file 'file:///home/cloudtest/.autorest/@autorestmodelerfour@4.19.3/nodemodules/@autorest/modelerfour/readme.md'

debug   | [50.81 s] swagger-document/individual/identity - END [0 s]
debug   | [50.81 s] openapi-document/openapi-document-converter - START inputs = 2
debug   | [50.90 s] openapi-document/openapi-document-converter - END [0.09 s]
debug   | [50.91 s] openapi-document/transform - START inputs = 2
debug   | [50.91 s] openapi-document/transform - END [0 s]
debug   | [50.92 s] openapi-document/semantic-validator - START inputs = 2
warning | IgnoredPropertyNextToRef | Semantic violation: Sibling values alongside $ref will be ignored. See https://github.com/Azure/autorest/blob/main/docs/openapi/howto/$ref-siblings.md for allowed values (components > schemas > AscOperation > properties > error)
  keys: [ 'type' ]
    - file:///tmp/azure-rest-api-specs/specification/storagecache/resource-manager/Microsoft.StorageCache/preview/2021-11-01-preview/storagecache.json:1828:9
debug   | [50.96 s] openapi-document/semantic-validator - END [0.01 s]
debug   | [50.96 s] openapi-document/allof-cleaner - START inputs = 2
debug   | [50.98 s] openapi-document/allof-cleaner - END [0.02 s]
debug   | [50.99 s] openapi-document/tree-shaker - START inputs = 2
debug   | [51.14 s] openapi-document/tree-shaker - END [0.15 s]
debug   | [51.14 s] openapi-document/multi-api-merger - START inputs = 2
debug   | [51.32 s] openapi-document/multi-api-merger - END [0.18 s]
debug   | [51.32 s] openapi-document/components-cleaner - START inputs = 1
debug   | [51.40 s] openapi-document/components-cleaner - END [0.08 s]
debug   | [51.40 s] openapi-document/component-modifiers - START inputs = 1
debug   | [51.41 s] openapi-document/component-modifiers - END [0.01 s]
debug   | [51.42 s] openapi-document/api-version-parameter-handler - START inputs = 1
debug   | [51.42 s] openapi-document/api-version-parameter-handler - END [0 s]
debug   | [51.43 s] openapi-document/profile-filter - START inputs = 1
debug   | [51.43 s] openapi-document/profile-filter - END [0 s]
debug   | [51.43 s] openapi-document/model-deduplicator - START inputs = 1
debug   | [51.43 s] openapi-document/emitter - START inputs = 1
debug   | [51.43 s] openapi-document/model-deduplicator - END [0 s]
debug   | [51.43 s] openapi-document/emitter - END [0 s]
debug   | [51.43 s] openapi-document/enum-deduplicator - START inputs = 1
debug   | [51.67 s] openapi-document/enum-deduplicator - END [0.23 s]
debug   | [51.67 s] openapi-document/subset-reducer - START inputs = 1
debug   | [51.67 s] openapi-document/subset-reducer - END [0 s]
debug   | [51.67 s] openapi-document/multi-api/reset-identity - START inputs = 1
debug   | [51.67 s] openapi-document/multi-api/reset-identity - END [0 s]
debug   | [51.67 s] openapi-document/multi-api/identity - START inputs = 1
debug   | [51.67 s] openapi-document/multi-api/identity - END [0 s]
debug   | [51.67 s] openapi-document/multi-api/emitter - START inputs = 1
debug   | [51.67 s] prechecker - START inputs = 1
debug   | [51.67 s] openapi-document/multi-api/emitter - END [0 s]
warning | PreCheck/CheckDuplicateSchemas | Checking for duplicate schemas, this could take a (long) while.  Run with --verbose for more detail.
error   | PreCheck/DuplicateSchema | Duplicate Schema named 'userAssignedIdentitiesValue' (2 differences):
  - properties.principalId.$ref: "#/components/schemas/schemas:50" => "#/components/schemas/schemas:58"
  - properties.clientId.$ref: "#/components/schemas/schemas:51" => "#/components/schemas/schemas:59"; This error can be *temporarily* avoided by using the 'modelerfour.lenient-model-deduplication' setting.  NOTE: This setting will be removed in a future version of @autorest/modelerfour; schemas should be updated to fix this issue sooner than that.
fatal   | Error: 1 errors occured -- cannot continue.
fatal   | Process() cancelled due to failure 
error   |   Error: Plugin prechecker reported failure.
error   | Autorest completed with an error. If you think the error message is unclear, or is a bug, please declare an issues at https://github.com/Azure/autorest/issues with the error message you are seeing.
debug   | [51.91 s] Shutting Down.
debug   | [51.92 s] Exiting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[THREAD] PowerShell Generator - Quick Questions · Issue #153
I would like to ask if there is a configuration I can write in my readme.md config file before running the autorest command...
Read more >
AutoRest Versioning
The Core module – when you run AutoRest, this is the component that handles all the loading of Swagger/OpenAPI files, connects the extensions...
Read more >
Data does not match any schemas from 'oneOf' - Stack Overflow
I see from the Autorest docs that this warning is because of an supported ... due to exception : [OperationAbortedException] Error occurred.
Read more >
autorest - npm
The AutoRest tool generates client libraries for accessing RESTful web services. Input to AutoRest is an OpenAPI spec that describes the ...
Read more >
How to use AutoRest with RDP - Refinitiv Developer Community
Run the following command with the modified JSON file to generate a C# client library. autorest --input-file=auth_oauth2_mod.json --csharp ...
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