-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
登录失败 start login with type: QrLogin #2691
Comments
It looks like your bot is stuck in the login process, which could be due to a few different issues. Here's a more focused approach to troubleshoot and potentially resolve the problem:
By focusing on these areas, you should be able to narrow down the cause of the issue. If the problem persists, consulting the Padlocal gateway documentation or reaching out to their support might provide further guidance.
|
@dosu这是我网关的代码 这是机器人代码: os.environ['token'] = "1fe5f846-6789-401d-b20c-9089076f5-8965446" from urllib.parse import quote from wechaty import ( async def on_message(msg: Message):
async def on_scan( async def on_login(user: Contact): async def main():
asyncio.run(main()) |
It seems like the primary issue you're encountering with your bot getting stuck at the QR login step could be related to several factors, including configuration, network, or compatibility issues. Here are some targeted steps to help you troubleshoot and hopefully resolve the problem:
If after following these steps, you're still facing issues, it might be beneficial to reach out to the Wechaty community or Padlocal support for more specific guidance. The Wechaty GitHub repository is also a valuable resource for updates and information that might help address your problem.
|
我现在也是,之前还是好的,不断的循环,可以打印出状态,是 扫描,确认,然后就一直等待了,status又变为2。 |
方便留个联系方式,讨论一下吗 |
It appears that the continuous loop issue during the login process with the Padlocal gateway might be due to the service discovery mechanism not completing as expected. Implementing a retry mechanism in your code could help manage this by limiting the number of attempts to discover the service before handling it as an error or exiting the process. This approach ensures that your bot doesn't indefinitely wait for a successful connection. Here's a basic structure for adding a retry mechanism to your code. While this example is more generic, you should adapt it to fit the specific logic and language you're working with: retry_count = 0
max_retries = 5 # Set your preferred maximum number of retries
while retry_count < max_retries:
try:
# Attempt to connect or discover the service here
# If successful, break out of the loop
break
except Exception as e:
# Log the exception or handle it as needed
print(f"Attempt {retry_count + 1} failed: {str(e)}")
retry_count += 1
if retry_count >= max_retries:
print("Max retries reached. Handling failure...")
# Implement your failure handling logic here
break Ensure that your environment variables, especially those related to the Padlocal gateway, are correctly configured. Mistakes in these settings can lead to login issues. If after implementing these suggestions you're still facing difficulties, it might be beneficial to closely review your event handlers for Should the problem persist, reaching out to the Wechaty community or Padlocal support for more targeted assistance could provide further insights into resolving the issue.
|
已解决,代理关了就好了@chickenWing-ape |
代理关了是指?网络上的代理吗? |
用户不存在呀呢 |
padlocal网关一直循环输出
07:57:15 VERB StateSwitch on(pending) <- (false)
07:57:15 INFO [PuppetPadlocal] start login with type: QrLogin
07:57:30 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})
07:57:36 VERB StateSwitch off(pending) <- (false)
07:57:36 VERB StateSwitch off(true) <- (pending)
我的机器人启动后就一直在等待:
2024-05-10 15:56:04,504 - Wechaty - INFO - starting puppet ...
2024-05-10 15:56:04,504 - PuppetService - INFO - init puppet ...
2024-05-10 15:56:04,505 - PuppetService - INFO - starting the puppet ...
2024-05-10 15:56:04,589 - PuppetService - INFO - puppet has started ...
2024-05-10 15:56:04,589 - PuppetService - INFO - listening the event from the puppet ...
请问是什么原因?
The text was updated successfully, but these errors were encountered: