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.