Giter Site home page Giter Site logo

扫码登陆失败了 about wechat-go HOT 14 CLOSED

songtianyi avatar songtianyi commented on July 3, 2024
扫码登陆失败了

from wechat-go.

Comments (14)

lamproae avatar lamproae commented on July 3, 2024 2

换个账号试下,我微信双开,有一个是正常的,另一个有这个问题。

from wechat-go.

songtianyi avatar songtianyi commented on July 3, 2024 1

@buf1024
你的账号使用 weixinBot/微信可以登录并正常使用,但是使用wechat-go不能, 是这个意思不

from wechat-go.

wsvn53 avatar wsvn53 commented on July 3, 2024 1

我更新试了一下OK了,赞

from wechat-go.

songtianyi avatar songtianyi commented on July 3, 2024

@wsvn53
提供下编译和运行环境,复现步骤。

from wechat-go.

wsvn53 avatar wsvn53 commented on July 3, 2024
go version go1.8 darwin/amd64

重现步骤是 go run main.go,扫码完成后,出现如上错误。

main.go

package main

import (
	"github.com/songtianyi/wechat-go/wxweb"
	"log"
	"./weass"
)

func main() {
	session, err := wxweb.CreateSession(nil, nil, wxweb.TERMINAL_MODE)
	if err != nil {
		log.Fatal(err)
	}

	weass.Register(session)

	session.HandlerRegister.EnableByName("txt-helper")
	if err := session.LoginAndServe(false); err != nil {
		log.Fatal("login failed:", err)
	}
}

from wechat-go.

songtianyi avatar songtianyi commented on July 3, 2024

@wsvn53
未能重现
workdeMacBook-Pro:wechat-go work$ go version
go version go1.8 darwin/amd64

2017-05-09 3 34 11

from wechat-go.

songtianyi avatar songtianyi commented on July 3, 2024

@wsvn53
@lamproae
我刚才新注册了一个号,也遇到这种问题,旧的号是正常的,同一个binary。
我估计是你的号被腾讯认定为机器人了。

from wechat-go.

wsvn53 avatar wsvn53 commented on July 3, 2024

但奇怪的是,其他同类的库同样的账号可以登陆 https://github.com/ManiacMike/gorobot.git

from wechat-go.

songtianyi avatar songtianyi commented on July 3, 2024

@wsvn53
能正常使用?我用我新注册的号能扫描 但是无法使用。
新号结果

[*] 请在手机上点击确认以登录 ...
[*] 正在登录 ... 成功,用时1.07372秒
[*] 微信初始化 ... 成功,用时0.58658秒
[*] 开启状态通知 ... 成功,用时0.44922秒
[*] 进行同步线路测试 ... 失败
[*] 退出程序

旧号结果

[*] 请在手机上点击确认以登录 ...
[*] 正在登录 ... 成功,用时0.25227秒
[*] 微信初始化 ... 成功,用时0.55790秒
[*] 开启状态通知 ... 成功,用时0.17526秒
[*] 进行同步线路测试 ... 成功,用时0.40400秒
[*] 成功截获微信初始化消息
[*] 成功截获微信初始化消息
川菜

基本上可以肯定跟号有关系,只不过我的代码在扫描的时候就把错误抛出来了。

from wechat-go.

wsvn53 avatar wsvn53 commented on July 3, 2024

确实无法使用,显示登陆成功,但线路测试失败

from wechat-go.

buf1024 avatar buf1024 commented on July 3, 2024

@songtianyi


@wsvn53
@lamproae
我刚才新注册了一个号,也遇到这种问题,旧的号是正常的,同一个binary。
我估计是你的号被腾讯认定为机器人了。

这个回答不成立。原因如下:

  1. 用web浏览器可以登录 -- 这个没有完全模拟浏览器行为?
  2. 用这个可以登录使用 https://github.com/Urinx/WeixinBot
  3. 自己用浏览器开发者工具查看微信交互过程,设置好user-agent,refer,cookie等信息,可能登录。

归根结底,可能是没有对web浏览器行为的完全模拟……

from wechat-go.

lamproae avatar lamproae commented on July 3, 2024

这个问题和账号的注册时间有关,新注册的账号用的是wx2.qq.com,老账号用的是wx.qq.com

from wechat-go.

buf1024 avatar buf1024 commented on July 3, 2024

@songtianyi
weixinBot 可以,你这个不可以。

我的意思是说,本质上,是模拟web 浏览器进行登录微信,只要web浏览器能正常登录使用,就不存在“腾讯认定为机器人”这一说法。

from wechat-go.

songtianyi avatar songtianyi commented on July 3, 2024

@lamproae
@buf1024
已fix,感谢各位!,测试ok,麻烦告知下哈。

from wechat-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.