"No application encryption key found" error when calling an API
Situation: I have a point-of-sale app written in two chunks: a React-Redux front end and a PHP-Laravel back end. At certain times the back end needs to issue API calls to a separate inventory application to get lists of available products and sometimes to look up specific products. While this setup works fine in production and in a staging version, I'm trying to set up a local copy of both apps for development use. In this local version, everything runs on my PC, using an xampp server. The point-of-sale app runs off localhost . The inventory app runs on a separate url using a virtual host.
The problem: some of the API calls from point-of-sale to inventory are working, while others are returning an exception: "No application encryption key has been specified". In particular, the 'retrieve inventory' call uses a POST and works the first time it runs in a given session, but some lookups for specific products use GETs and always fail with the above exception. I can't tell where the error is actually occurring, the point-of-sale app or the inventory app. Both apps do have app_key values in their respective env files.
Where is this error coming from and how do I fix it? Is the missing app_key an issue with the point-of-sale app itself, or with the inventory app?
Your question is interesting, but it's like if you call the mechanic for your car and explain the weird sound you hear when you drive : impossible to tell you anything without having a look at your car.
It would be interesting to see how you call the GET and the POST API from React and how you handle each request in the controllers.