Hi everybody,
I've read every posts of this forum and every external doc before asking for your help...
I can't achieve getting data from my Web_Project.
I tried different settings for CORS (domain, localhost, *) and none of them worked.
I tried "playing" with secure, caching, .
I tried with the different "tips" for no results...
I had similar problems. Were my login action works but nothing else. My fix wasâŚ
On the CORS option I donât think the * works. I would just try and get it to work on Android first. To do this change the CORS to http://localhost . Then deploy your app.
Capacitor needs the following:-
On the mobile app make sure you have âcredentialsâ ticked. Then run the android emulator and see if this works.
I think the problem is the on the web version of the Capacitor app you also need to put the port on. Problem is the port changes each time the server restarts.
Thanks for video, lot of interesting things (browser / flow test, progress bar, etc.)
I canât get my Mobile App working. The more I try the lesss I can load SCâŚ
You must add the credentials to all Server Connects and Server Connect forms in the mobile app. Iâm not sure about the web app since that is the same host.
Also you may be putting the wrong URLs in your CORS Origin field. When you say mobile app, what do you mean? Are you emulating Android, iOS, or just launching the app to local browser while building?
If Iâm going by your screenshots above, then youâre launching the app to your local browser. In the first screenshot, you can see your URL is localhost:58552, so that is what you would need in CORS Origin field. The port will most likely change every time you restart the project, so youâll need to check for the new port and add it to the CORS origin each time.
You must add the credentials to all Server Connects and Server Connect forms in the mobile app. Iâm not sure about the web app since that is the same host.
ok, I understand.
When you say mobile app, what do you mean? Are you emulating Android, iOS
I would like to test all my App in the braowser then in the Android and iOs emulators, but Iâm to listen the better option
Browser is the easiest to start with, so just ensure you have the correct localhost+port in origin field. Android and iOS both have extra requirements that Iâve found hard to get correct with CORS, so gettting everything working via browser may be easier in the beginning.