Me and a collegue spent like an entire day trying to get the apps to work properly my local dev machine. We always suspect that our company installed antivirus/firewall makes it really hard to get this to work. It seems to block alot of stuff. But since that day, I can get the apps to work every time on my local dev machine, this is the setup we have:
yaml file changes (works for me for direct pay, direct shipment and klarna):
- Removed/commented out the DNS-entry completely
- Changed LitiumApi__ApiUrl to use https://host.docker.internal:5001
host-file in Windows:
- Add entry for 127.0.0.1 host.docker.internal
To reinstall/install the apps when i need to i follow this order:
- Stop the apps in docker
- Clear direct-payment/config folder
- Clear direct-payment/DataProtection-key folder
- Log into backoffice, force-remove the apps i want to reinstall/install if they are installed already
- Start the apps in docker
- Visit each app metadata url (https://host.docker.internal:apport) which will rediret to http://host.docker.internal:5001 (the changed litiumapi_apiurl) where i log into backoffice and install the apps and load the configs
- Done. Now resume normal development/testning/whatever using the normal url to access Litium, project.localtest.me:5001 or whatever you’ve set up, and the apps work for me every time. Done it like 20 times or something now.