on 03-17-2022 6:49 AM
I am working on BTP-Mobile service where we are building the front-end application in the Business Application studio using MDK(Mobile Development Kit) template. To test the application in BAS, we are deploying it by using Application.app-> MDK:Deploy -> Your Dev Space. After that in 'Run Configuration' we are executing the module by clicking on 'Run Module'. Then WebApplicationFactory starts running and a pop-up opens on the right bottom 'A service is listening to port 6004'. When I clicked on that it is opening a new tab and executing the application but there I am getting error on the page Failed to initialize application data service - Error: 502 (); GET /nstest22/Raj_PODEtails_Destination/ Bad Gateway. (Ref Screenshot 1)
I have already tested the OData service in Connectivity feature of Mobile Service where I am able to see the data of all entity sets. I am not able to test the application in BAS. (Ref Screenshot 2
)
How to resolve this issue or is there any other way to preview/execute the application in BAS?
I can see that Token Service URL is not correct, it should also contain /oauth/token at the end. e.g., https://1ad...hana.ondemand.com/oauth/token
I can't see the full path of the URL property but i assume it's pointing to Destination API from mobile services.
Questions - why are you configuring your BTP destination via mobile services proxy? Using what framework your OData service has been produced? e.g. SAP Gateway/CAP/mobile backend tools/others?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the answer.
Issue has been resolved by adding /oauth/token at the end of Token Service URL. Full path of URL was already pointing to the Destination API from Mobile Service.
OData service has been created using SAP Gateway. I am following this Set Up Initial Configuration for an MDK App | Tutorials for SAP Developers tutorial. That's why I have configured BTP destination via Mobile Service Proxy.
Is there any other way to do all these steps?
OData service has been created using SAP Gateway. I am following this Set Up Initial Configuration for an MDK App | Tutorials for SAP Developers tutorial. That's why I have configured BTP destination via Mobile Service Proxy. >> As the sample service is available in the mobile services , the only way to access it via mobile service proxy. Hence those additional steps are required.
Is there any other way to do all these steps? >> You can configure your BTP destination with the similar configuration as you have configure the mobile destination. (provide the same URL, authentication type etc.)
Okay. So now I have created the destination in BTP Cockpit with similar configuration as Mobile Destination. Then, while creating the application in BAS first we have to select the template as MDK and then we have to do the service configuration. Till now I have been adding the destination in Mobile Service Connectivity and then selecting the same in BAS while creating the project(i.e. Data Source as Mobile Services and then selected the application ID and destination).(ref Screenshot 1)
Even if we select the BTP Destination in the BAS, then how it will connect with the Native/Hybrid application created in the Mobile Service? and how to create the build job for that BAS application.
Till now when I have selected the Service Configuration as mobile service and deployed the application, in 'Mobile Cloud Build' feature the build was getting created successfully for the last deployed application in BAS related to that Mobile Service.
How it will work in this case? Please suggest reference blog if you have any.
That Deploy to your Dev Space option is mainly for web application only to test them before deploying to BTP. I don't suggest you to use this option if the goal is to run the app in mobile client. There are still some limitations in web runtime compared to mobile clients.
If you want to run your app locally in mobile clients, you need to create your branded client using MDK SDK, install the MDK extension in Visual studio code, open your metadata project in VSC, execute build process. See documentation. You can set up e.g. git to sync the code changes between BAS and VSC.
Hi jitendrakumar.kansal . Can you please help me to resolve this issue ->
UI created using BAS-MDK Not Getting Rendered on Mobile App | SAP Community
User | Count |
---|---|
72 | |
8 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.