This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3220SF: CCS Cloud request: Request Entity Too Large

Part Number: CC3220SF

Hello,

We are having trouble making a request to CCS Cloud to upload files into a workspace. The error that we see in the browser is:

Request Entity Too Large
The requested resource
/ide/api/ccsserver/createProject
does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.

Uploads were working fine recently. I've tried clearing my cache and cookies, but this did not help.

Are there any suggested fixes for this issue?

Thank you very much.

  • Hello,

    What types of files are being uploaded? And how large are they? Does the issue happen when trying to upload any file?

    Also, which cloud IDE are you using? the classic (current) one or the next gen (beta) one?

    thanks

    ki

  • Hello,

    Thank you for the response. My request contains 14 files. The files have extensions such as: .h, .c, .projectspec, .cmd, .txt. The file names and content are just sent as text in a JSON request payload that is around 115 KB. I believe I'm seeing the issue with the CCS Cloud (https://dev.ti.com/ide) IDE - both legacy and beta versions.

    I haven't seen a problem yet uploading manually in CCS Cloud using the UI (upload file option), but see the issue when making an HTTP request with my JSON payload to:

    dev.ti.com/.../createProject

    I hope this is helpful. Any advice that you have is much appreciated.

    Thanks

  • Uploads were working fine recently.

    Just to confirm, you had everything working previously (making http request with your json payload) until recently when you started to get that error? And nothing changed at all (the payload, etc)?

    I am working with the GC engineers and there is a bit of confusion on what is being done. We see that you are using the createProject API. We are still fuzzy on the details of how you are making the request to upload the files via http request. Can you provide more details?

  • What is the exact command used to make the HTTP request?

  • Yes, the request was working recently. It was last test successfully about 27 days ago. The request is similar to this, though the json payload is larger (115 KB) since it contains actual code.

    curl 'https://dev.ti.com/ide/api/ccsserver/createProject?projectSpec=temboodemo.projectspec&projectName=uploadtest1&deviceId=CC3220SF' \
      -H 'authority: dev.ti.com' \
      -H 'cache-control: max-age=0' \
      -H 'sec-ch-ua: "Google Chrome";v="95", "Chromium";v="95", ";Not A Brand";v="99"' \
      -H 'sec-ch-ua-mobile: ?0' \
      -H 'sec-ch-ua-platform: "macOS"' \
      -H 'origin: https://temboo.com' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'upgrade-insecure-requests: 1' \
      -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36' \
      -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
      -H 'sec-fetch-site: cross-site' \
      -H 'sec-fetch-mode: navigate' \
      -H 'sec-fetch-dest: document' \
      -H 'referer: https://temboo.com/' \
      -H 'accept-language: en-US,en;q=0.9' \
      -H 'cookie: user_pref_currency="USD"; pf-accept-language=en-US; user_pref_language="en-US"; ti_ai=5552999%7Cnews%7C%7C3937783; user_pref_givenName=Aaron; login-check=true; ABTasty=uid=93wd1kj4wjx3ce3z&fst=1635454844508&pst=-1&cst=1635454844508&ns=1&pvt=3&pvis=3&th=; ABTastySession=mrasn=&sen=2&lp=https%253A%252F%252Fdev.ti.com%252F' \
      --data-raw 'json=%7B%22files%22%3A%5B%7B%22name%22%3A%22Board.h%22%2C%22content%22%3A%22hello%22%7D%2C%7B%22name%22%3A%22CC3220SF_LAUNCHXL.c%22%2C%22content%22%3A%22hello%22%7D%2C%7B%22name%22%3A%22CC3220SF_LAUNCHXL.h%22%2C%22content%22%3A%22hello%22%7D%2C%7B%22name%22%3A%22CC3220sf.cmd%22%2C%22content%22%3A%22hello%22%7D%2C%7B%22name%22%3A%22TembooCert.h%22%2C%22content%22%3A%22hello%22%7D%2C%7B%22name%22%3A%22mainRTOS.c%22%2C%22content%22%3A%22hello%22%7D%2C%7B%22name%22%3A%22network_if.c%22%2C%22content%22%3A%22hello%22%7D%2C%7B%22name%22%3A%22network_if.h%22%2C%22content%22%3A%22hello%22%7D%2C%7B%22name%22%3A%22temboodemo.projectspec%22%2C%22content%22%3A%22hello%22%7D%2C%7B%22name%22%3A%22uart_term.c%22%2C%22content%22%3A%22hello%22%7D%2C%7B%22name%22%3A%22uart_term.h%22%2C%22content%22%3A%22hello%22%7D%2C%7B%22name%22%3A%22instructions.txt%22%2C%22content%22%3A%22hello%22%7D%2C%7B%22name%22%3A%22TembooMain.c%22%2C%22content%22%3A%22hello%22%7D%2C%7B%22name%22%3A%22TembooAccount.h%22%2C%22content%22%3A%22hello%22%7D%5D%7D' \
      --compressed

    I hope this is helpful. Thank you again for investigating. If you have any clues about what changed, and could point me to any documentation, we can look on our end to see if any changes are necessary.

  • Thank Aaron,

    The GC engineers are investigating. Thank you for your patience.

    ki

  • Hi Aaron,

    I was able to successfully create projects with files as large as 127,000 UTF-8 characters, which seems huge to me.  But yes, I was able to reproduce this issue once a file has exceeded approximately 130,000 characters in length.  I will check with our infrastructure team if any server configuration settings have been changed recently, but I expect these limits are set for good reasons.

    Could you also double-check if anything has changed on your end?  As I mentioned, I was able to create projects with requests that exceed 115KB in size.  Maybe you're sending Unicode text in your requests?

    Thanks,

    - Baltasar

  • Hi Baltasar,

    Thank you for looking into this. I don't see anything that has changed on our end since the last time we saw the request succeed. I've taken a quick look at the file content of the files that are being specified in the request, and none of them seem that large so far. I'm also not seeing any Unicode. There is a root ca certificate being uploaded, and this is a hexdump of a crt file. Could such a file trigger this problem? To try a file like this, you could download the DigiCert High Assurance EV Root CA from digicert, and run a command like:

    xxd -i DigiCertHighAssuranceEVRootCA.crt > cacert.h

    Aside from that, I believe the character count of all files together might reach that limit. If you think some rules on the server have changed and now require files to be uploaded in separate requests...that might be something for us to look at.

    I will keep look on our end. Please feel free to reply with any other clues or updates.

    Thanks again

  • Hi Aaron,

    Just following up to see what the current status of this issue is. Any luck on your end?

    Thanks

    ki

  • Hello,

    Thanks for following-up. I've been experimenting with reducing the size of the request by removing some content in one of the files. When I do this, I stop getting a "Request Entity Too Large" error, but instead get a 503 "Not Implemented, POST to /ide/api/ccsserver/createProject not supported."

    Do you have any ideas about this?

    Thanks,

    Aaron

  • Hi Aaron,

    FYI, there is an origin filter on these APIs - among a few others, calls from domain 'temboo.com' are accepted.  Unknown origins are rejected.

    Thanks,

    Baltasar

  • Thanks for the info Baltasar,

    I was able to reproduce the 503 "Not Implemented" when executing from the temboo.com domain after reducing the request size. Some of my previous tests were actually originating from {subdomain}.temboo.com - not sure if the subdomain triggers the origin filter on the API?

    The tests that I've run so far indicate that requests from temboo.com or subdomain.temboo.com can both lead to "Request Entity Too Large", and if I reduce the size of the request, the result is "Not Implemented".

    If you have any additional clues, please let me know.

    Thanks again for the help,

    Aaron

  • Hi Aaron,

    Our nightly tests are passing for these APIs, and the code has not changed in the past few years.  

    I have a simple test page that might be helpful for you to compare your API calls against - https://dev.ti.com/test .  It links to four simple test-pages.  You can view the source of each page, and also view the api/ccscloud.js script which wraps the actual API calls.

    Let me know if you find out what the issue is.

    Baltasar

  • Hello Baltasar,

    Thank you for sending the testing link. It helped a lot. I wanted to give you an update because I've isolated these issue more now. It appears that there are multiple issues preventing the uploads from succeeding.

    1. I am able to get past the "Request Entity Too Large" error now by removing comments in the code, so this is ok for now.

    2. After reducing the size of the request, I get "403 Forbidden" that appears to be caused by this line in our .projectspec file:

    <import spec="${com.ti.SIMPLELINK_CC32XX_SDK:3.40}/kernel/tirtos/builds/CC3220SF_LAUNCHXL/release/ccs/tirtos_builds_CC3220SF_LAUNCHXL_release_ccs.projectspec"/>

    I'm wondering if you can help me understand what needs to change about this line?

    3. If I remove that line from the projectspec file, I also hit a next error which is the "503, Not Implemented" error.  This appears to me to be caused by including the network_if.c file which can be found here: /simplelink_cc32xx_sdk_5_20_00_06/examples/rtos/CC3220SF_LAUNCHXL/demos/mqtt_client/network_if.c. I believe if I remove the Network_IF_ConnectAP() function I can get around the problem, but it's not clear to me what the real issue here is. I've been able to reproduce this including that file using the test tool (dev.ti.com/.../createProjectFromSpec.html).

    Can you offer us any additional guidance about this?

    Thank you for the help,

    Aaron

  • Hi Aaron,

    Thanks for the analysis.  I am now able to reproduce both the 403 and the 501 errors on dev.ti.com.  I am able to only reproduce it on dev.ti.com, and not on our internal test server.  So, I have a feeling that our production server might have some kind of additional network layer that pre-filters incoming requests.  I will talk with one of the infrastructure engineers to see if they have any advice.

    Baltasar

  • Hi Aaron,

    A big as been filed for this issue. The tracking link is: https://sir.ext.ti.com/jira/browse/EXT_EP-10655

    Thanks

    ki

  • Hi Aaron,

    The firewall layer has now been adjusted to allow both character sequences which were preventing your requests from completing.  Also, the size limit on POST requests has been increased to 200Kb.  Please give it a try and let us know if you experience any other issues.

    Thanks,

    Baltasar

  • Hi Baltasar,

    Thanks so much for looking into this. I can confirm that the issue with the character sequence is resolved for us now. The only problem we're facing now is the request size. When I try to measure the size of the requests that we make, I'm calculating between 115kb (content-length=137234) to 170kb (content-length=168277). However, we're still hitting request limit. Perhaps there is some overhead from TLS connection that I'm not counting. The only solution I have been able to find so far is to remove nearly all comments from our code.

    Is there any chance the size limit can still be increased for requests originating from temboo.com? Or, do you have any other suggestion?

    Thanks again,

    Aaron

  • Hi Aaron,

    Our infrastructure engineers made some additional adjustments.  Give it a try now...

    Thanks!

    Baltasar

  • Hi Baltasar,

    Yes, that worked! Thanks so much. We really appreciate the help.

    - Aaron