cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to initialize application data service - Error 0 (Unknown); GET https://webclient

boolan79
Explorer
0 Kudos
1,129

Hello,

when I deploy the MDK app to Cloud Foundry Trial account or try to run it locally from BAS, the app is started, but it does not retrieve data from the destination - I get the following error:

But it works fine on mobile device.

I found the following hint in the DEV162 training materials from Teched 2021:

but it does not say where to check the number of user registrations and how to delete them.

In the Mobile Services I have registered only 1 app and cannot see any config option for user registrations:

Any hints?

With best regards,

Krzysztof.

Accepted Solutions (1)

Accepted Solutions (1)

boolan79
Explorer
0 Kudos

Hello Jitendra,

I found the reason. It was missing options in the service definition - see screenshot.

On the right there is the correct file with missing lines underlined.

I have generated a new MDK app and compared the .service files.

Several lines were missing in the first app. When I copied the .service file from the new app to the old one, it started to work.

It looks like the .service file is not correctly regenerated or synced when you perform some changes.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

boolan

Those highlighted options are optional.

I think, the issue was with correct PathSuffix value. On left side, you provided ZKBU_CS_WS_MAKE but on right side, you corrected it to zkbu_cs_ws_make.

PathSuffix (case-sensitive) should match exact path value to your backend.

yavuzasik
Participant
0 Kudos
Hi Jitendra , Any other possible recommendations with this issue. I tried all the steps you mentioned in the replies. For me it does not even work for a new application that I kick started with a template project. I choose MDK project and a custom destination from the Mobile services. Any insight would be helpful. Thanks.

Answers (2)

Answers (2)

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert

boolan

I see you have defined the relative path /sap..../.._MAKE in your mobile destination. MDK mobile client connects to this destination at runtime, it works for you as you mentioned.

Where do you define that relative path for your web app?
MDK web application connects to the data source via BTP destination. I assume the URL configuration in your BTP destination is just point to the host without relative path.

Either, you define the relative path at the service level OR in your .service file part of MDK project.

Option1: Remove relative service path from mobile services destination and append it in your BTP destination URL

Option2: Remove relative service path from mobile services destination and add it in your .service file (Services>.service>Path Suffix)

boolan79
Explorer
0 Kudos

Hello Jitendra,

I have removed the relative path from the mobile destination:

and defined it in the .service file - see screenshot.

I rebuilt and redeployed the app to Web, CF and mobile.

It works on mobile device, but I get the same error on CF or when I start the app from the local space on SAP BAS.

I also tried changing the Service Source Type to SAP BTP destination in the .service file, then rebuiling and redeploy, but same effect.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

boolan

Are you connecting to your BTP destination Carshare via mobile services proxy?

To see the user registrations, click on the Carshare application id in your mobile services cockpit > Mobile Settings Exchange > User Registrations

boolan79
Explorer
0 Kudos

Hello Jitendra,

Regarding registered users - there is only one entry here:

I have rebuilt and redeployed the app to CF, but still getting the same error.

I am connecting to OData service through mobile services.

I have a destination on SAP BTP to OData service:

and this destination I have created also in Mobile Services under the same name:

In the debugger console I can see the following errors: