Skip to content
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

An internal error from function to_file_box() #62

Open
markoxu opened this issue Aug 29, 2021 · 2 comments
Open

An internal error from function to_file_box() #62

markoxu opened this issue Aug 29, 2021 · 2 comments

Comments

@markoxu
Copy link

markoxu commented Aug 29, 2021

function to_file_box() internal error

  • wechaty puppet version: wechaty docker 0.65
  • wechaty version: python wechaty 0.8.24
  • token: padlocal token

Description

Sometimes internal error will occur when saving image from receiver or talker, and then download file failed. Please take a look, thanks.

Reproduce your problem

SUPPORTED_MESSAGE_FILE_TYPES: List[MessageType] = [
    MessageType.MESSAGE_TYPE_ATTACHMENT,
    MessageType.MESSAGE_TYPE_IMAGE,
    MessageType.MESSAGE_TYPE_EMOTICON,
    MessageType.MESSAGE_TYPE_VIDEO,
    MessageType.MESSAGE_TYPE_AUDIO
]

async def on_message(self, msg: Message):
    if msg.type() in SUPPORTED_MESSAGE_FILE_TYPES:
        file_box = await msg.to_file_box()
        if file_box is not None:
            await file_box.to_file(file_box.name)

Error log

2021-08-28 20:15:36,517 - Wechaty - ERROR - internal error <(<Status.UNKNOWN: 2>, '[tid:1aff233b] [11014ms] download file failed:{"host":{"host":"180.111.198.203","port":80},"payload":"qwAAA4xOIFuIHZ0AAAAAAAAAAAAAAAADcwAAAAN2ZXIAAAABMQAAAAl3ZWl4aW5udW0AAAAKMjYzNTk1ODM2MwAAAANzZXEAAAABNgAAAA1jbGllbnR2ZXJzaW9uAAAACTQwMjY1NDc1NAAAAAxjbGllbnRvc3R5cGUAAAAMaVBhZCBpT1MxNC4yAAAAB2F1dGhrZXkAAABCMEACAQEEOTA3AgEBAgEBAgSdHYhbAgM9Ef0CAQACBOg+W2UCAz0UuQIEkbISDgIE6LISDgIEYXlClgIEbVqU7AQAAAAAB25ldHR5cGUAAAABMQAAAAxhY2NlcHRkdXBhY2sAAAABMQAAAAZyc2F2ZXIAAAABMQAAAAhyc2F2YWx1ZQAAAIA5RP1WFQnG6GSt8n34g7/QrAXe0hxxrQwIahtEzJgLFjoq9bVqCIq60e7kbQcC/nFtef/f8Q3DnY647etiCSEyPPEVlQZFYo96RFj4XUH38MRkiL1GY3KNaPMfuuwtXgCYss3bshcvSoZQ//wqmBG6PiCfHoezAlT7iXGe8k4MnAAAAAhmaWxldHlwZQAAAAEyAAAACnd4Y2hhdHR5cGUAAAABMAAAAAZmaWxlaWQAAAESMzA4MTg2MDIwMTAwMDQ3YTMwNzgwMjAxMDAwMjA0NWYzMThkYmMwMjAzMmY0ZjU2MDIwNDI2N2FjMmRjMDIwNDYxMmEyOGNjMDQ1Mzc3Nzg3NTcwNmM2ZjYxNjQ1ZjMxMzgzODM1MzEzMTM4MzczNTMxMzI0MDYzNjg2MTc0NzI2ZjZmNmQzMzMwMzIzMTM0MzA1ZjMxMzYzMzMwMzEzNTMyMzkzMDM3NWY2NDM3NjI2MjY0MzEzNDY1MmQzODY1NjI2NjJkMzQ2MzMwMzQyZDYxMzUzMDM1MmQzNzM1MzgzOTM3NjYzMzMwMzI2MTYyMzgwMjA0MDEyNTBhMDIwMjAxMDAwNDA1MDA0YzRjNmUwMAAAAAtsYXN0cmV0Y29kZQAAAAEwAAAABWlwc2VxAAAAATAAAAANY2xF1aWMtZmxhZwAAAAEwAAAACXd4bXNnZmxhZwAAAAAAAAALd3hhdXRvc3RhcnQAAAABMAAAAA1kb3ducGljZm9ybWF0AAAAATEAAAAGb2Zmc2V0AAAAATAAAAALbGFyZ2VzdmlkZW8AAAABMAAAAApzb3VyY2VmbGFnAAAAATA=","unpackaeskey":"3Pa/o8iamL8Gdoq3=="}, received null response', None)>
@wj-Mcat
Copy link
Collaborator

wj-Mcat commented Aug 29, 2021

What type of file do you download? Have you tried another type of file?

@markoxu
Copy link
Author

markoxu commented Aug 29, 2021

What type of file do you download? Have you tried another type of file?

Great thanks for your timely reply. 😃

  • Image message sometimes get null response from wechaty puppet, especially when the message is sent by youself. The root cause may be the padlocal puppet receive null response from unknown server.

  • For {"host":"180.111.198.201","port":80}, this IP and PORT is not mine, the padlocal puppet will download file from this unknown server?

06:38:01 ERR PuppetServiceImpl grpcError() messageImageStream() rejection: [tid:6ce7d18a] [11014ms] download file failed:{"host":{"host":"180.111.198.201","port":80},"payload":"qwAAA4xOIFuIHZ0AAAAAAAAAAAAAAAADcwAAAAN2ZXIAAAABMQAAAAl3ZWl4aW5udW0AAAAKMjYzNTk1ODM2MwAAAANzZXEAAAABNgAAAA1jbGllbnR2ZXJzaW9uAAAACTQwMjY1NDc1NAAAAAxjbGllbnRvc3R5cGUAAAAMaVBhZCBpT1MxNC4yAAAAB2F1dGhrZXkAAABCMEACAQEEOTA3AgEBAgEBAgSdHYhbAgM9Ef0CAQACBOg+W2UCAz0UuQIEkbISDgIE6LISDgIEYXlClgIEbVqU7AQAAAAAB25ldHR5cGUAAAABMQAAAAxhY2NlcHRkdXBhY2sAAAABMQAAAAZyc2F2ZXIAAAABMQAAAAhyc2F2YWx1ZQAAAIA5RP1WFQnG6GSt8n34g7/QrAXe0hxxrQwIahtEzJgLFjoq9bVqCIq60e7kbQcC/nFtef/f8Q3DnY647etiCSEyPPEVlQZFYo96RFj4XUH38MRkiL1GY3KNaPMfuuwtXgCYss3bshcvSoZQ//wqmBG6PiCfHoezAlT7iXGe8k4MnAAAAAhmaWxldHlwZQAAAAEyAAAACnd4Y2hhdHR5cGUAAAABMAAAAAZmaWxlaWQAAAESMzA4MTg2MDIwMTAwMDQ3YTMwNzgwMjAxMDAwMjA0NWYzMThkYmMwMjAzMmY0ZjU2MDIwNDI2N2FjMmRjMDIwNDYxMmEyOGNjMDQ1Mzc3Nzg3NTcwNmM2ZjYxNjQ1ZjMxMzgzODM1MzEzMTM4MzczNTMxMzI0MDYzNjg2MTc0NzI2ZjZmNmQzMzMwMzIzMTM0MzA1ZjMxMzYzMzMwMzEzNTMyMzkzMDM3NWY2NDM3NjI2MjY0MzEzNDY1MmQzODY1NjI2NjJkMzQ2MzMwMzQyZDYxMzUzMDM1MmQzNzM1MzgzOTM3NjYzMzMwMzI2MTYyMzgwMjA0MDEyNTBhMDIwMjAxMDAwNDA1MDA0YzRjNmUwMAAAAAtsYXN0cmV0Y29kZQAAAAEwAAAABWlwc2VxAAAAATAAAAANY2xF1aWMtZmxhZwAAAAEwAAAACXd4bXNnZmxhZwAAAAAAAAALd3hhdXRvc3RhcnQAAAABMAAAAA1kb3ducGljZm9ybWF0AAAAATEAAAAGb2Zmc2V0AAAAATAAAAALbGFyZ2VzdmlkZW8AAAABMAAAAApzb3VyY2VmbGFnAAAAATA="}, received null response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants