WhatsApp / WhatsApp-Business-API-Setup-Scripts

The scripts related to setting up WhatsApp business API
MIT License
410 stars 433 forks source link

Got 403 error on docker compose #11

Closed yoesoff closed 4 years ago

yoesoff commented 4 years ago

Hi everyone, I got following error on docker-compose up -d:

ERROR: error pulling image configuration: error parsing HTTP 403 response body: invalid character 'F' looking for beginning of value: "Forbidden!" Anybody has same issue with me?

mengyiyuan commented 4 years ago

Hi,

Are you running on a Windows server?

yoesoff commented 4 years ago

Hi,

Are you running on a Windows server?

I am on Ubuntu Linux 18.04

mengyiyuan commented 4 years ago

Searching around on the internet seems to suggest that the error comes from the docker registry. Is your server behind a proxy? Can docker pull other images?

yoesoff commented 4 years ago

No proxy, I think it's becos the image is not from public registry.

wacore:
     image: docker.whatsapp.biz/coreapp:v${WA_API_VERSION:?Run docker-compose with env var WA_API_VERSION (ex. WA_API_VERSION=2.25.1 docker-compose <command> <options>)}
     command: ["/opt/whatsapp/bin/wait_on_mysql.sh", "/opt/whatsapp/bin/launch_within_docker.sh"]

It's becos I don't have access to the following private registry docker.whatsapp.biz. how to get access to that?

mengyiyuan commented 4 years ago

I don't think it's private but let me check with my team to confirm this.

Have you passed in values of WA_API_VERSION when you run docker-compose up -d? If so, what did you pass in?

Meanwhile, could you also test on other version of Linux system if possible?

Sorry for my late response too.

yoesoff commented 4 years ago

I don't think it's private but let me check with my team to confirm this.

Have you passed in values of WA_API_VERSION when you run docker-compose up -d? If so, what did you pass in?

Meanwhile, could you also test on other version of Linux system if possible?

Sorry for my late response too.

I am still working on my local laptop, do you have any recommendation for WA_API_VERSION to use for development?

yoesoff commented 4 years ago

I am using following version and still getting same error after docker-compose up -d: export WA_API_VERSION=2.23.4

ERROR: error pulling image configuration: error parsing HTTP 403 response body: invalid character 'F' looking for beginning of value: "Forbidden!"

mengyiyuan commented 4 years ago

I've just confirmed that the registry is publicly accessible and we have quite a lot of businesses using it successfully. :)

2.23.4 expired on October 24, please use the latest version 2.25.3 instead. The Changelog can be found here: https://developers.facebook.com/docs/whatsapp/changelog

As a result, can you try WA_API_VERSION=2.25.3 docker-compose up -d instead?

Meanwhile, I will also try the same on Linux 18.04 and see if I can reproduce the error. To clarify, which Linux distribution are you using? Ubuntu?

Texelik commented 4 years ago

Hi, I have same problem. I am using ubuntu server 18.04.

sudo docker-compose up -d Pulling wacore (docker.whatsapp.biz/coreapp:v2.25.3)... v2.25.3: Pulling from coreapp 16c48d79e9cc: Pulling fs layer 3c654ad3ed7d: Pulling fs layer 6276f4f9c29d: Pulling fs layer a4bd43ad48ce: Waiting 8df443291e55: Waiting be593a38840b: Waiting 9c53dfab2038: Waiting 1ea3a7507484: Waiting b60db3396da1: Waiting 270c891bf487: Waiting 6fd79d7a29fa: Waiting 0ac7f9244506: Waiting e61b381d20cb: Waiting ERROR: error pulling image configuration: error parsing HTTP 403 response body: invalid character 'F' looking for beginning of value: "Forbidden!"

mengyiyuan commented 4 years ago

@yoesoff @Texelik

Could you both try downloading other docker images like the hello-world image? Please try to run docker run hello-world and paste your result here.

Texelik commented 4 years ago

Hi @mengyiyuan . It seems everything OK!! This is the result:

sudo docker run hello-world [sudo] password for ****:

Hello from Docker! This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:

  1. The Docker client contacted the Docker daemon.
  2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64)
  3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading.
  4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.

To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/

For more examples and ideas, visit: https://docs.docker.com/get-started/

sirLoaf commented 4 years ago

Hi @mengyiyuan. I'm facing the same issue right now.... Other images and hello world are working fine. Got the same output like @Texelik

Pulling wacore (docker.whatsapp.biz/coreapp:v2.25.3)... v2.25.3: Pulling from coreapp 16c48d79e9cc: Pulling fs layer
3c654ad3ed7d: Pulling fs layer
6276f4f9c29d: Pulling fs layer
a4bd43ad48ce: Waiting
8df443291e55: Waiting
be593a38840b: Waiting
9c53dfab2038: Waiting
1ea3a7507484: Waiting
b60db3396da1: Waiting
270c891bf487: Waiting
6fd79d7a29fa: Waiting
0ac7f9244506: Waiting
e61b381d20cb: Waiting
ERROR: error pulling image configuration: error parsing HTTP 403 response body: invalid character 'F' looking for beginning of value: "Forbidden!"

Thanks

yoesoff commented 4 years ago

@mengyiyuan

╭─yoesoff@yoesoff-ThinkPad-X220 ~  
╰─➤  docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete 
Digest: sha256:c3b4ada4687bbaa170745b3e4dd8ac3f194ca95b2d0518b417fb47e5879d9b5f
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.
yoesoff commented 4 years ago

@mengyiyuan

╰─➤  WA_API_VERSION=2.25.3 docker-compose up -d                                                                                                                      1 ↵
Pulling wacore (docker.whatsapp.biz/coreapp:v2.25.3)...
v2.25.3: Pulling from coreapp
16c48d79e9cc: Pulling fs layer
3c654ad3ed7d: Pulling fs layer
6276f4f9c29d: Pulling fs layer
a4bd43ad48ce: Waiting
8df443291e55: Waiting
be593a38840b: Waiting
9c53dfab2038: Waiting
1ea3a7507484: Waiting
b60db3396da1: Waiting
270c891bf487: Waiting
6fd79d7a29fa: Waiting
0ac7f9244506: Waiting
e61b381d20cb: Waiting
ERROR: error pulling image configuration: error parsing HTTP 403 response body: invalid character 'F' looking for beginning of value: "Forbidden!"
mengyiyuan commented 4 years ago

Hi all,

Thanks for trying and your updates. Let me try to reproduce it on Ubuntu 18.04 myself and check with the team if I am able to.

@sirLoaf Are you also running Ubuntu 18.04?

mengyiyuan commented 4 years ago

I've tried by spinning up a bionic Ubuntu 18.04 using AWS EC2, and followed the instructions in these two guides and was able to download the docker images without any issues.

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04 https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-18-04

Could you try to review the docs?

Are you using docker community edition or enterprise edition?

sirLoaf commented 4 years ago

@mengyiyuan Yes, I'm also running Ubuntu 18.04

Strange thing is, that it works for me in the google cloud (exact same version) and I also followed these guides but it fails when I try to run it locally in a hyper-v vm. Same ubuntu version and same guides followed and I even enabled Set-VMProcessot -VMName $Name -ExposeVirtualizationExtensions $true in the powershell on the host.

WinVer: Win10 1903

Thanks

mengyiyuan commented 4 years ago

Ah, I didn't know you were running Ubuntu on Windows, but yeah we had issues with running these containers on Windows machines and it's probably due to hyper-v but we didn't have time to check.

Glad to know that it is working on GCP, I will close this for now as it is sort of expected until we have resources to figure out Windows support.

Thanks!

awnishs commented 4 years ago

Hi @mengyiyuan, please help I am still having the same issue as my development machine is windows and I'm currently running docker on Windows 10.

mengyiyuan commented 4 years ago

Hi @awnishs, as of now, we don't support running these containers on Windows machines (desktop or server), please use Linux based servers instead.

Thanks!

bearnard commented 4 years ago

Hi, is there perhaps some sort of IP acl on the repo? I get this from a number of non US/EU locations (South Africa for example), Using Linux

bearnard commented 4 years ago

@mengyiyuan

romeomcc commented 4 years ago

@bearnard @mengyiyuan did you guys manage to sort this out, I am having the same issue, bare metal Linux, Windows even went to docker.whatsapp.biz and it takes me to Bintray.com... also searched for whatsapp and found https://bintray.com/whatsapp but cannot pull down any content... forbidden.. any help will be appraciated.

romeomcc commented 4 years ago

@bearnard used a vpn and installed from the USA, all sorted. now I just need someone at whatsapp to help setup my account as its in public preview

reimondepic commented 4 years ago

Hello, I'm triying with ubuntu server and get the same error, my public address is from Spain

bearnard commented 4 years ago

@reimondepic see also: https://github.com/WhatsApp/WhatsApp-Business-API-Setup-Scripts/issues/23

JusticeMuch commented 3 years ago

@bearnard used a vpn and installed from the USA, all sorted. now I just need someone at whatsapp to help setup my account as its in public preview

This works , I'm using docker in RSA on windows.

Rajamohanreddyai commented 3 years ago

Hello,

I was created the whole setup at that time I got the same error, but at the next second I was fixed the same. Mainly because of 2 reasons you may get the URL not found errors.

Containers are not up (db, coreapp, webapp). You might be calling the wrong URL. Please check the below link if do you want any clarity. https://youtu.be/hYO32rQQ9Pc

caiokawasaki commented 3 years ago

Screenshot 2021-04-26 125554

We are presenting the same problem from time to time ...

This error gets in the way of our server creation script and we have to start the whole process over again.

Our servers are created at Digital Ocean NY1.

StasDomanskyi commented 3 years ago

Just now also had the same issue

MNS003 commented 3 years ago

Having the same issue now as well. In RSA using MacOS (Catalina). I'm only able to pull db. Out of docker-compose up -d db waweb master1 master2 wacore1 wacore2

nathanaelsousa commented 3 years ago

Guys I solved this problem by upgrading my docker version! From: Docker version 19.03.13, build 4484c46d9d To: Docker version 20.10.7, build f0df350

rogerweb commented 3 years ago

I don't think it is related to the Docker version as I'm also on Docker 20.10.7 and I am getting the same error.

Also, it was working fine 3 weeks ago, so it looks it is related to the registry itself.

caiokawasaki commented 3 years ago

It's totally related to registry, my solution was create a ubuntu image with the image already downloaded.

AleksandrSidorin37 commented 2 years ago

Good afternoon. I have a Macbook air on m1 Monterey, I can't install it the same way. When installing, it gives an error

use:

docker run -d \ --name kb-container \ --net es-net \ -p 5601:5601 \ -e ELASTICSEARCH_HOSTS=http://es-container:9200 \ docker.elastic.co/kibana/kibana:7.11.0

docker: error pulling image configuration: download failed after attempts=1: error parsing HTTP 403 response body: invalid character '<' looking for beginning of value: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<HTML><HEAD><META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n<TITLE>ERROR: The request could not be satisfied</TITLE>\n</HEAD><BODY>\n<H1>403 ERROR</H1>\n<H2>The request could not be satisfied.</H2>\n<HR noshade size=\"1px\">\nThe Amazon CloudFront distribution is configured to block access from your country.\nWe can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.\n<BR clear=\"all\">\nIf you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.\n<BR clear=\"all\">\n<HR noshade size=\"1px\">\n<PRE>\nGenerated by cloudfront (CloudFront)\nRequest ID: uHjc3f9Nk4yDYcLqTntXvjhu5yN0znNO1LN_YysK7WN697-14xqQLQ==\n</PRE>\n<ADDRESS>\n</ADDRESS>\n</BODY></HTML>". See 'docker run --help'.

estebanquito266 commented 1 year ago

Hi everyone, I got following error on docker-compose up -d:

ERROR: error pulling image configuration: error parsing HTTP 403 response body: invalid character 'F' looking for beginning of value: "Forbidden!" Anybody has same issue with me?

In case setting the environment variable do not work, you can try to change the WA_API_VERSION manually inside docker-compose.yml.

Change these lines

wacore: image: docker.whatsapp.biz/coreapp:v${WA_API_VERSION:?Run docker-compose...)}

...

waweb: image: docker.whatsapp.biz/web:v${WA_API_VERSION:?Run docker-compose...)} into

wacore: image: docker.whatsapp.biz/coreapp:v2.23.4

...

waweb: image: docker.whatsapp.biz/web:v2.23.4 for the version number, you can refer this link

credits: https://stackoverflow.com/questions/55650848/how-do-i-solve-missing-mandatory-value-for-image-option-in-service-wacore-in