cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BTP Cloud Foundry - Application Routes URL does not work - File not found, Internal Server Error

poornamamatha
Participant

Hello All,

1) I had taken MTA Template and created an Freestyle UI5 App with standalone Approuter in BAS.

Here is the Project Structure as shown below:

xs-app.json File code when App generated without changes

Now I manually did some changes by following some AppRouter related blogs like below:

Here is my package.json file as shown below:

Here is my mta.yaml file code

_schema-version: "3.2"
ID: Test
version: 0.0.1
modules:
- name: test-approuter
  type: approuter.nodejs
  path: test-approuter
  requires:
  - name: Test_html_repo_runtime
  parameters:
    disk-quota: 256M
    memory: 256M
- name: Test_ui_deployer
  type: com.sap.application.content
  path: .
  requires:
  - name: Test_html_repo_host
    parameters:
      content-target: true
  build-parameters:
    requires:
    - artifacts:
      - comtesttestmodule.zip
      name: comtesttestmodule
      target-path: resources/
- name: comtesttestmodule
  type: html5
  path: testmodule
  build-parameters:
    build-result: dist
    builder: custom
    commands:
    - npm install
    - npm run build:cf
    supported-platforms: []
resources:
- name: Test_html_repo_runtime
  type: org.cloudfoundry.managed-service
  parameters:
    service: html5-apps-repo
    service-plan: app-runtime
- name: Test_html_repo_host
  type: org.cloudfoundry.managed-service
  parameters:
    service: html5-apps-repo
    service-plan: app-host
parameters:
  deploy_mode: html5-repo


Now If I try to generate the MTA Project(mtar file) with mta.yml I am getting the following error in Terminal as shown below "Error at Test_ui_deployer"

removed these piece of code in mta.yaml file and tried to build the mta_archives file

- name: Test_ui_deployer
  type: com.sap.application.content
  path: .
  requires:
  - name: Test_html_repo_host
    parameters:
      content-target: true
  build-parameters:
    requires:
    - artifacts:
      - comtesttestmodule.zip
      name: comtesttestmodule
      target-path: resources/

After removing few lines of code I am able to get the "mta _Archives" file.

Now I deployed the App to Cloud Foundry to my Space in SAP BTP Cockpit.

when I click on generated URL shows like below:

2) I tried without MTA Template also by taking only UI5App in BAS (Cloud foundry) by following below URL :

SAP Help Document. By following this I deployed the App through terminal by giving commands

cf push <appname> by logging into CF login then app was started successfully but when I open the generated URL in SAP BTP it shows "Internal server error" sometimes "Not found".

I want to access the APP through the generated URL in Cockpit but not able to get it.

Could anyone please help me out this issue.

where I am missing and what I have to do to get the app displayed with URL.

mariusobert could you suggest me to solve this issue.

Thanks in Advance.

Regards

Mamatha M

Accepted Solutions (0)

Answers (2)

Answers (2)

mariusobert
Developer Advocate
Developer Advocate

Hi,

I think you are mixing a few properties in your route and don't go well together. E.g. you can either use "localDir" OR "service" OR "destination". But you cannot combine them freely. Have a look at the readme of the approuter to understand each property and how to use it.

PS: I think the route that you want to configure, is not necessary. If the standalone approuter doesn't find a matching route in the configuration, if will interpret the path as the id of an HTML5 repo application anyway.

poornamamatha
Participant
0 Kudos

Thanks for your Response Marius

I will check out the Xs-app.json file properly by following approuter parameters to be used as you suggested.

Regards,

Mamatha

krishnasiddamshetty
Discoverer
0 Kudos

Hi,

I am also facing same issue were you able to solve it?

If yes can you please share me the solution.

Thanks,

Krishna