wdzeng / shopee-coins-bot

💰 蝦皮簽到機器人 💰
MIT License
444 stars 800 forks source link

Operation timeout exceeded. #28

Closed ray1025 closed 2 years ago

ray1025 commented 2 years ago
Status: Downloaded newer image for hyperbola/shopee-coins-bot:1
Start shopee coins bot v1.0.17.
Passing password from command line is considered insecure. Should use environment variable or password file.
Start to load cookies.
Failed to load cookies: EACCES: permission denied, open '/cookie'
Start to login shopee.
Try to login by username and password.
Login form submitted. Waiting for redirect.
Operation timeout exceeded.

試了好幾次,一直收不到簡訊。

我用其它電腦登入蝦皮時,在等簡訊頁面 60 秒後,再點選再次發送簡訊才馬上收到 1 封,是不是蝦皮故意的?

wdzeng commented 2 years ago

Hi,

機器人卡在寄出簡訊前的階段,所以不會收到簡訊。你可以試試看 -s 撈螢幕截圖看看是卡在哪裡。

最近生病了,沒辦法馬上研究。請稍待一段時間。

Thanks!

ray1025 commented 2 years ago
Passing password from command line is considered insecure. Should use environment variable or password file.
Start to load cookies.
Failed to load cookies: EACCES: permission denied, open '/cookie'
Start to login shopee.
Try to login by username and password.
Login form submitted. Waiting for redirect.
Failed to save screenshot: EACCES: permission denied, open '/docker/screenshot.png'
Operation timeout exceeded.

連截圖都有問題,看來是我電腦的問題?

ray1025 commented 2 years ago
Start to load cookies.
Cookies loaded.
Start to login shopee.
Already logged in.
Start to save cookie.
Cookie saved.
Coin already received.

我把 B 電腦用好的 cookie 直接複製到 A 電腦執行就好了...

wdzeng commented 2 years ago
Passing password from command line is considered insecure. Should use environment variable or password file.
Start to load cookies.
Failed to load cookies: EACCES: permission denied, open '/cookie'
Start to login shopee.
Try to login by username and password.
Login form submitted. Waiting for redirect.
Failed to save screenshot: EACCES: permission denied, open '/docker/screenshot.png'
Operation timeout exceeded.

連截圖都有問題,看來是我電腦的問題?

你沒有給指令,我怎麼幫你排查......

ray1025 commented 2 years ago

用帳號密碼登入的時候

docker run --rm -v /home/test/cookie:/cookie hyperbola/shopee-coins-bot:1 -c /cookie -u XXX -p XXX

用其它電腦複製過來的 cookie 登入時

docker run --rm -v /home/test/cookie:/cookie hyperbola/shopee-coins-bot:1 -c /cookie
ray1025 commented 2 years ago

在 A 電腦想要截圖時

docker run --rm -v /home/test/cookie:/cookie hyperbola/shopee-coins-bot:1 -c /cookie -u XXX -p XXX -s /docker
ray1025 commented 2 years ago

我左思右想應該是我 A 電腦的資料夾和 cookie 檔案權限有問題吧

wdzeng commented 2 years ago

我左思右想應該是我A電腦的資料夾和cookie檔案權限有問題吧

不是。你遇到的問題跟 #21 一模一樣。因為重複的關係我先關掉這個 issue。

在A電腦想要截圖時 docker run --rm -v /home/test/cookie:/cookie hyperbola/shopee-coins-bot:1 -c /cookie -u XXX -p XXX -s /docker

我沒看懂 -s /docker 的意思,你沒有 mount 就算成功了也撈不到截圖啊。而且你確定 /docker 資料夾存在嗎?

wdzeng commented 2 years ago
Status: Downloaded newer image for hyperbola/shopee-coins-bot:1
Start shopee coins bot v1.0.17.
Passing password from command line is considered insecure. Should use environment variable or password file.
Start to load cookies.
Failed to load cookies: EACCES: permission denied, open '/cookie'
Start to login shopee.
Try to login by username and password.
Login form submitted. Waiting for redirect.
Operation timeout exceeded.

試了好幾次,一直收不到簡訊。

我用其它電腦登入蝦皮時,在等簡訊頁面 60 秒後,再點選再次發送簡訊才馬上收到 1 封,是不是蝦皮故意的?

終歸來說這很可能還是個 bug,因為機器人不應該停在那裡。只是沒有截圖的話,要加以研究是非常困難的。

如果你覺得有需要,隨時歡迎 reopen 這個 issue。

ray1025 commented 2 years ago

-s /docker 我是想把截圖存在 docker 這個資料夾 ...

wdzeng commented 2 years ago

-s /docker 我是想把截圖存在 docker 這個資料夾 ...

對,我知道你想把截圖存在 /docker 資料夾。但存完之後你打算怎麼看截圖?你並沒有把 /docker 資料夾 mount 到本機上,這樣你是看不到的。

另外,你確定 /docker 這個資料夾存在嗎?我沒印象 alpine 容器裡有這個資料夾。不存在的話就會 permission denied 喔。

我應該要把這件事寫在 README 才對。

ray1025 commented 2 years ago

看來是我的失誤@@