docker-strapi icon indicating copy to clipboard operation
docker-strapi copied to clipboard

Warning: An error occurred while requesting the API

Open mariushosting opened this issue 3 years ago • 1 comments

@naskio Can't access serverip:1337/admin because I receive Warning: An error occurred while requesting the API

:latest tag 4.5.0

mariushosting avatar Nov 11 '22 04:11 mariushosting

api error api2

mariushosting avatar Nov 11 '22 04:11 mariushosting

Hi @mariushosting

I had the same error, long story short:

  1. exec into the strapi container : run docker exec -it <container-id> bash
  2. due to magic currently unclear to me, strapi needs a rebuild, so run : yarn build
  3. kill all node processes (this will kill the container, but since it will persist the yarn build changes, all is well) with pkill node

After a while(= successful start of the strapi container), the /admin shouldn't throw that error anymore.

I hope this helps 🍀

P.S. To be completely transparent, I have set up SSL for that container too, and I cannot confirm if that contributed to the solution or not, but after the abovementioned steps it worked for me. GL

NebojsaKrtolica avatar Jan 03 '23 16:01 NebojsaKrtolica

Hi @mariushosting

I had the same error, long story short:

  1. exec into the strapi container : run docker exec -it <container-id> bash
  2. due to magic currently unclear to me, strapi needs a rebuild, so run : yarn build
  3. kill all node processes (this will kill the container, but since it will persist the yarn build changes, all is well) with pkill node

After a while(= successful start of the strapi container), the /admin shouldn't throw that error anymore.

I hope this helps 🍀

P.S. To be completely transparent, I have set up SSL for that container too, and I cannot confirm if that contributed to the solution or not, but after the abovementioned steps it worked for me. GL

Hello I already solved the issue here: https://mariushosting.com/how-to-install-strapi-on-your-synology-nas/ using npm run build

mariushosting avatar Jan 03 '23 16:01 mariushosting