forcedotcom / SalesforceMobileSDK-Package

BSD 3-Clause "New" or "Revised" License
22 stars 20 forks source link

Forcehybrid npm - hybrid_lwc - Cordova - Application error: the connection to the server was unsuccessfull #273

Closed muheeb75 closed 1 year ago

muheeb75 commented 1 year ago

I have tried to build a 'hybrid_lwc' custom salesforce mobile application using "forcehybrid create" package by refering below link: https://developer.salesforce.com/docs/atlas.en-us.mobile_sdk.meta/mobile_sdk/hybrid_lightning_web_components.htm?search_text=lwc

I am not able to run that app in the android emulator as well as in real device, as I am getting "Application Error" as shown in the attachment below.

Android_img

Please respond to this ASAP.

Thanks.

wmathurin commented 1 year ago

Can you successfully connect from a browser to the server that is indicated in the error?

arshadaxolt commented 1 year ago

Hi, I am also facing the same issue for a newly created app. do we have any workaround for this?

muheeb75 commented 1 year ago

When I tried to connect from a browser to the server It was showing me as "Page hellowWorld does not exist". Please take a look at the screen shot below.

App_Issue1

After deploying 'hellowWorld' vf page, class and LWC components to the server and also pushed to the scratch org, It shows empty page in the browser.

Please take a look at the screen shot below.

App_Issue2

for mobile still the same issue "Application Error".

Can you please help me out with this.

Thanks.

wmathurin commented 1 year ago

Does it work with the sample org we bundle in the hybrid LWC template: https://github.com/forcedotcom/SalesforceMobileSDK-Templates/tree/dev/HybridLwcTemplate/server ?

muheeb75 commented 1 year ago

I am currently using the latest forcehybrid package '10.2.0' to create hybrid_lwc. Can you please try with the same package version?

Please refer this link to create latest version forcehybrid lwc app: https://developer.salesforce.com/docs/atlas.en-us.mobile_sdk.meta/mobile_sdk/hybrid_lightning_web_components.htm?search_text=lwc

Can you please reply asap.

Thanks.

muheeb75 commented 1 year ago

Hi @wmathurin

Can you please help me on this issue, I am still stuck in this same issue.

Can you please reply asap.

Thanks.

muheeb75 commented 1 year ago

Hi @wmathurin

Can you please help me on this issue.

Can you please reply ASAP.

Thanks.

wmathurin commented 1 year ago

The page in the browser is not empty (do a "view page source"). It won't show anything in the browser because it needs to go through the container to get its data. See https://github.com/forcedotcom/SalesforceMobileSDK-Templates/blob/dev/HybridLwcTemplate/server/force-app/main/default/lwc/contactList/contactList.js

We just recently released Mobile SDK 11.0 and we tested all our apps and templates including the HybridLwcTemplate successfully on both iOS and Android.

wmathurin commented 1 year ago

Could you check also your connected app scopes? Which ones do you have configured?

muheeb75 commented 1 year ago

Hi @wmathurin

Sorry for the late reply. I just run the app after recreated the hybrid lwc app, Now it's working fine. Really appreciated for your help.

Will let you know if there is any issue.

Thank you.