WhatsApp / proxy

This repository contains the WhatsApp proxy implementation for users to host their own proxy infrastructure to connect to WhatsApp for chat (VoIP is not currently supported)
MIT License
1.44k stars 408 forks source link

unable to prepare context: path "/path_to_cloned_repository/proxy/" not found (please help) #34

Closed vahidlol closed 1 year ago

vahidlol commented 1 year ago

i'm keep getting this error while everything is fine on my great ocean server !

"unable to prepare context: path "/path_to_cloned_repository/proxy/" not foundآ"

please help me out guys what did do wrong to get this message or what should i do to fix it ?!

اگه فارسی هم بگید ممنون میشم رفقا

FarzadHZZ commented 1 year ago

docker build ./proxy/ -t whatsapp_proxy:1.0 اینو تست کن

localhoct commented 1 year ago

read the instruction carefuly and dont miss any thing you should get ur answer

vahidlol commented 1 year ago

docker build ./proxy/ -t whatsapp_proxy:1.0 اینو تست کن

تست کردم خطا میگیرم هنوز ! unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /root/proxy/Dockerfile: no such file or directory

vahidlol commented 1 year ago

read the instruction carefuly and dont miss any thing you should get ur answer

I did it step by step but unfortunately i get this error message , which seems to be a problem for some other users in here as well .

FarzadHZZ commented 1 year ago

docker build ./proxy/ -t whatsapp_proxy:1.0 اینو تست کن

تست کردم خطا میگیرم هنوز ! unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /root/proxy/Dockerfile: no such file or directory

docker build ./proxy/proxy/ -t whatsapp_proxy:1.0 اینو تست کن

yasershop commented 1 year ago

docker build ./proxy/ -t whatsapp_proxy:1.0

اینو تست کن

نشد من امتحان کردم

kazem3d commented 1 year ago

اصلاً کلون کردی ریپو رو روی سرورت؟!

FarzadHZZ commented 1 year ago

اصلاً کلون کردی ریپو رو روی سرورت؟!

راس میگه

vahidlol commented 1 year ago

اصلاً کلون کردی ریپو رو روی سرورت؟!

با دستور git clone https://github.com/WhatsApp/proxy.git

کلون کردم اگه اشتباه نباشه !

ehsanghaffar commented 1 year ago

Please clone this repo to your server and add its address to the docker command.

example:

cd /home
git clone https://github.com/WhatsApp/proxy/

docker build /home/proxy/proxy/ -t whatsapp_proxy:1.0
vahidlol commented 1 year ago

Please clone this repo to your server and add its address to the docker command.

example:

cd /home
git clone https://github.com/WhatsApp/proxy/

docker build /home/proxy/proxy/ -t whatsapp_proxy:1.0

Thanks a lot Ehsan it actually worked and fixed my problem, would you mind tell me to what to do next?! i followed the next

command as : docker run -it -p 80:80 -p 443:443 -p 5222:5222 -p 8080:8080 -p 8443:8443 -p 8222:8222 -p 8199:8199 whatsapp_proxy:1.0

and i get some errors like this :

/ [NOTICE] (20) : haproxy version is 2.6.7-c55bfdb [WARNING] (20) : config : log format ignored for proxy 'stats' since it has no log address. [WARNING] (20) : config : log format ignored for frontend 'haproxy_v4_http' since it has no log address. [WARNING] (20) : config : log format ignored for frontend 'haproxy_v4_https' since it has no log address. [WARNING] (20) : config : log format ignored for frontend 'haproxy_v4_xmpp' since it has no log address. [ALERT] (20) : config : [/usr/local/etc/haproxy/haproxy.cfg:84] : 'server wa/g_whatsapp_net_5222' : could not resolve address 'g.whatsapp.net'. [ALERT] (20) : config : [/usr/local/etc/haproxy/haproxy.cfg:88] : 'server wa_http/g_whatsapp_net_80' : could not resolve address 'g.whatsapp.net'. [ALERT] (20) : config : Failed to initialize server(s) addr.

ehsanghaffar commented 1 year ago

Please clone this repo to your server and add its address to the docker command. example:

cd /home
git clone https://github.com/WhatsApp/proxy/

docker build /home/proxy/proxy/ -t whatsapp_proxy:1.0

Thanks a lot Ehsan it actually worked and fixed my problem, would you mind tell me to what to do next?! i followed the next

command as : docker run -it -p 80:80 -p 443:443 -p 5222:5222 -p 8080:8080 -p 8443:8443 -p 8222:8222 -p 8199:8199 whatsapp_proxy:1.0

and i get some errors like this :

/ [NOTICE] (20) : haproxy version is 2.6.7-c55bfdb [WARNING] (20) : config : log format ignored for proxy 'stats' since it has no log address. [WARNING] (20) : config : log format ignored for frontend 'haproxy_v4_http' since it has no log address. [WARNING] (20) : config : log format ignored for frontend 'haproxy_v4_https' since it has no log address. [WARNING] (20) : config : log format ignored for frontend 'haproxy_v4_xmpp' since it has no log address. [ALERT] (20) : config : [/usr/local/etc/haproxy/haproxy.cfg:84] : 'server wa/g_whatsapp_net_5222' : could not resolve address 'g.whatsapp.net'. [ALERT] (20) : config : [/usr/local/etc/haproxy/haproxy.cfg:88] : 'server wa_http/g_whatsapp_net_80' : could not resolve address 'g.whatsapp.net'. [ALERT] (20) : config : Failed to initialize server(s) addr.

Hi Vahid 👋🏻 Are you running this on a server in Iran?

vahidlol commented 1 year ago

Please clone this repo to your server and add its address to the docker command. example:

cd /home
git clone https://github.com/WhatsApp/proxy/

docker build /home/proxy/proxy/ -t whatsapp_proxy:1.0

Thanks a lot Ehsan it actually worked and fixed my problem, would you mind tell me to what to do next?! i followed the next command as : docker run -it -p 80:80 -p 443:443 -p 5222:5222 -p 8080:8080 -p 8443:8443 -p 8222:8222 -p 8199:8199 whatsapp_proxy:1.0 and i get some errors like this : / [NOTICE] (20) : haproxy version is 2.6.7-c55bfdb [WARNING] (20) : config : log format ignored for proxy 'stats' since it has no log address. [WARNING] (20) : config : log format ignored for frontend 'haproxy_v4_http' since it has no log address. [WARNING] (20) : config : log format ignored for frontend 'haproxy_v4_https' since it has no log address. [WARNING] (20) : config : log format ignored for frontend 'haproxy_v4_xmpp' since it has no log address. [ALERT] (20) : config : [/usr/local/etc/haproxy/haproxy.cfg:84] : 'server wa/g_whatsapp_net_5222' : could not resolve address 'g.whatsapp.net'. [ALERT] (20) : config : [/usr/local/etc/haproxy/haproxy.cfg:88] : 'server wa_http/g_whatsapp_net_80' : could not resolve address 'g.whatsapp.net'. [ALERT] (20) : config : Failed to initialize server(s) addr.

Hi Vahid 👋🏻 Are you running this on a server in Iran?

Hi , no i'm running this on one of digitalocean servers!

ehsanghaffar commented 1 year ago

I think try another way. Use Docker-compose like this

cd /home
git clone https://github.com/WhatsApp/proxy/
cd /home/proxy/proxy/ops
docker compose up -d

for see logs

docker compose logs
vahidlol commented 1 year ago

I think try another way. Use Docker-compose like this

cd /home
git clone https://github.com/WhatsApp/proxy/
cd /home/proxy/proxy/ops
docker compose up -d

for see logs

docker compose logs

you are champion man !! it works finally ! i really appreciate you taking time to solve this.

slawlor commented 1 year ago

Closing issue as it looks like it's resolve. Thanks!

Mamadgij commented 1 year ago

Please clone this repo to your server and add its address to the docker command.

example:

cd /home
git clone https://github.com/WhatsApp/proxy/

docker build /home/proxy/proxy/ -t whatsapp_proxy:1.0

hi dear Ehsan and slawlor first i don't have any idea about servers and proxy but i want to make this for my family in iran. i tried a lot and used this one but unfortunately i got this msg : fatal: destination path 'proxy' already exists and is not an empty directory. Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg. Error: unknown shorthand flag: 'd' in -d

could you please tell me how can i fix it?

alimousavi21 commented 1 year ago

Error response from daemon: driver failed programming external connectivity on endpoint whatsapp_proxy (986c58c4969826e992b34da7035185f23567d4eee4ee9476fdadf6073682ec76): Bind for 0.0.0.0:80 failed: port is already allocated من با این ارور مواجه شدم ، ممکنه کمک کنید؟

فکر کنم یه راه دیگه رو امتحان کن از Docker-compose به این صورت استفاده کنید

cd /home
git clone https://github.com/WhatsApp/proxy/
cd /home/proxy/proxy/ops
docker compose up -d

برای مشاهده سیاهههای مربوط

docker compose logs
ehsanghaffar commented 1 year ago

Error response from daemon: driver failed programming external connectivity on endpoint whatsapp_proxy (986c58c4969826e992b34da7035185f23567d4eee4ee9476fdadf6073682ec76): Bind for 0.0.0.0:80 failed: port is already allocated من با این ارور مواجه شدم ، ممکنه کمک کنید؟

خیلی واضح گفته که پورت 80 شما قبلا توسط یه سرویس دیگه داره استفاده میشه، شما هر پورت رو فقط به یه سرویس میتونین اختصاص بدین. (احتمالا سایت روی سرور دارین یا یه سرویسی که پورت 80 رو استفاده میکنه)

Sorry @slawlor, You closed this issue but we continued it.