OfficeDev / teams-toolkit

Developer tools for building Teams apps
Other
454 stars 183 forks source link

Teams App Test Tool PayloadTooLargeError #12269

Closed alyssa1303 closed 5 days ago

alyssa1303 commented 3 weeks ago

Describe the bug A clear and concise description of what the bug is. When trying to render markdown result using the Teams App Test Tool to test in web browser, I came into this issue. My guess is the response I'm trying to return includes a hard-coded image and quite a few text, which leads to this issue. Wondering if the tool can increase the payload limit to address this?

log Listening on 33797
log Teams App Test Tool is being launched for you to debug the Teams app: http://localhost:33797
debug started web socket client
debug started web socket client
error PayloadTooLargeError: request entity too large
    at readStream (/home/alyssa/.fx/bin/testTool/0.2.1/node_modules/@microsoft/teams-app-test-tool/dist/index.js:8:719939)
    at getRawBody (/home/alyssa/.fx/bin/testTool/0.2.1/node_modules/@microsoft/teams-app-test-tool/dist/index.js:8:719319)
    at read (/home/alyssa/.fx/bin/testTool/0.2.1/node_modules/@microsoft/teams-app-test-tool/dist/index.js:8:51157)
    at jsonParser (/home/alyssa/.fx/bin/testTool/0.2.1/node_modules/@microsoft/teams-app-test-tool/dist/index.js:8:54317)
    at Layer.handle [as handle_request] (/home/alyssa/.fx/bin/testTool/0.2.1/node_modules/@microsoft/teams-app-test-tool/dist/index.js:8:269610)
    at next (/home/alyssa/.fx/bin/testTool/0.2.1/node_modules/@microsoft/teams-app-test-tool/dist/index.js:8:271604)
    at Route.dispatch (/home/alyssa/.fx/bin/testTool/0.2.1/node_modules/@microsoft/teams-app-test-tool/dist/index.js:8:271640)
    at Layer.handle [as handle_request] (/home/alyssa/.fx/bin/testTool/0.2.1/node_modules/@microsoft/teams-app-test-tool/dist/index.js:8:269610)
    at /home/alyssa/.fx/bin/testTool/0.2.1/node_modules/@microsoft/teams-app-test-tool/dist/index.js:8:265170
    at param (/home/alyssa/.fx/bin/testTool/0.2.1/node_modules/@microsoft/teams-app-test-tool/dist/index.js:8:266755)

To Reproduce Steps to reproduce the behavior:

  1. Create a message with lots of text and a hard-coded image
  2. Return the message as type MessageFactory.text
    # python example
    message = MessageFactory.text(content)
    await context.send_activity(message)

Expected behavior The test tool app is able to render the message

Screenshots If applicable, add screenshots to help explain your problem.

VS Code Extension Information (please complete the following information):

CLI Information (please complete the following information):

Additional context Add any other context about the problem here.

microsoft-github-policy-service[bot] commented 3 weeks ago

Thank you for contacting us! Any issue or feedback from you is quite important to us. We will do our best to fully respond to your issue as soon as possible. Sometimes additional investigations may be needed, we will usually get back to you within 2 days by adding comments to this issue. Please stay tuned.

qinezh commented 2 weeks ago

Hi @alyssa1303 , have you tried to debug your app in Teams client, and does it work as expected?

Just tried from my side, and similar error occurs when debugging in Teams client:

microsoft-github-policy-service[bot] commented 1 week ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

microsoft-github-policy-service[bot] commented 5 days ago

Due to lack of details for further investigation, we will archive the issue for now. In case you still have following-up questions on this issue, please always feel free to reopen the issue by clicking ‘reopen issue’ button below the comment box. We will get back to you as soon as possible.