cancel
Showing results for 
Search instead for 
Did you mean: 

VS Code SAPUI5 Adaptation project error - Request failed with status code 401

ScottZheng
Discoverer

When I create the SAPUI5 Adaptation project, I got the error: Request failed with status code 401

1.png

2.png

3.png

I checked my SAP system setting, it's working fine for connection of SAP backend system.

4.png

I turned on Trace mode for extension Application Wizard in VS Code to track the log when I process the same above-mentioned steps.

5.png

6.png

In the output screen, it showed error

7.png8.png9.png

My error message is like below:

2024-05-08T08:18:44.267Z [ADP Creation] [INFO] : Response status = 401

2024-05-08T08:18:44.267Z [ADP Creation] [INFO] : END - system response error result.

2024-05-08T08:18:44.269Z [ADP Creation] [INFO] : AxiosError: Request failed with status code 401

 

Compared to the log from my colleague with no such issue, he got bellow log message. For the 404 error, it should not be a problem, because he didn't select the version. In his case, the system connection is fine from his side by using SAPUI5 Adaptation project.

2024-05-08T08:49:49.499Z [ADP Creation] [INFO] : Basic information: {"projectName":"app.variant1","applicationTitle":"App Variant Title","namespace":"customer.app.variant1"}

2024-05-08T08:49:51.872Z [ADP Creation] [INFO] : Base URL = [SAP URL]
2024-05-08T08:49:51.872Z [ADP Creation] [INFO] : client = 100
2024-05-08T08:49:53.150Z [ADP Creation] [INFO] : OnPremise dta_folder = true
2024-05-08T08:49:53.150Z [ADP Creation] [INFO] : UI Flex = true
2024-05-08T08:49:53.653Z [ADP Creation] [INFO] : Base URL = [SAP URL]
2024-05-08T08:49:53.653Z [ADP Creation] [INFO] : client = 100
2024-05-08T08:50:12.120Z [ADP Creation] [INFO] : [ADP Creation] Error on validating ui5 version: AxiosError: Request failed with status code 404

I also checked with authorization colleague, and my SAP account got no authorization issue for system connection. It might be something wrong for my local setting. Does anyone can help me with this issue?

Thanks in advance.

junwu
Active Contributor
0 Kudos
are you able to connect to abap system from ADT with your account?
View Entire Topic
saccamor
Explorer
0 Kudos

Hi Scott,
I had the same problem as you and I managed to solve it.

Running the command

C:\Windows\System32> npm install -g @Sap/generator-adaptation-project 


I received this response:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@sap-ux/axios-extension@1.7.3',
npm WARN EBADENGINE   required: { pnpm: '>=6.26.1 < 7.0.0 || >=7.1.0', node: '>=18.x' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@sap-ux/btp-utils@0.12.1',
npm WARN EBADENGINE   required: { pnpm: '>=6.26.1 < 7.0.0 || >=7.1.0', node: '>=18.x' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@sap-ux/logger@0.4.0',
npm WARN EBADENGINE   required: { pnpm: '>=6.26.1 < 7.0.0 || >=7.1.0', node: '>=18.x' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.1' }
npm WARN EBADENGINE }
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

once I updated nodejs to version 18 I was able to install the latest version of the generator @Sap/generator-adaptation-project

If I now run this command 

C:\Users\username>npm list


I get this response

username@ C:\Users\username
`-- @Sap/generator-adaptation-project@1.1.58

I didn't understand why in "Explore and Install Generators" I still see version 1.1.40 but now it works...

saccamor_0-1715696107757.png

https://www.npmjs.com/package/@sap/generator-adaptation-project/v/1.1.58

I hope will help you.

Regards,
Moreno