Editor fails to Verify or Upload

After minor mods to my code, click on Verify gives error: A network error occurred, please retry later [400]
This same code, Thing and Device have been running fine for weeks now and even now continues to report data to Cloud and update on Dashboard. It has never failed to at least run Verify. How can it be a Network error if data is being sent to Cloud?

Hi @dbfenner. Does the problem still occur if you try again now?

This type of problem might be caused by a transient network outage. These usually resolve themselves after a matter of minutes; hours at worst. If so in this case, I would expect you would no longer experience the problem now.

Thanks for your help. I agree with that suggestion,but this problem has persisted for the past 24 hours. Odd too since I can open the Serial Monitor and get all the usual messages of connection, data reads, etc.
Maybe my Win 10 PC has decided to start blocking your Editor??

It might be. You can check your firewall software to see if there is any indication it is interfering.

Arduino Change Agent has access through the Firewall, so that would seem to be okay.
Also, it's still quite irregular in connecting and running the existing code. If I open the Serial Monitor that alone stops data flow to Cloud, turns off the Online button, and then it freezes and refuses to restart. Power down/up ESP8266 hardware, or re-login to the Cloud have no effect improvement on Online button or code initiation and run. This has been an ongoing issue since I started with A Cloud. Studying your instruction manuals gave no clue, that I could find. Sometimes it starts and sometimes it doesn't.
Perhaps I'm missing some critical item. Thanks for your continued patience.

I'm going to ask you to post some additional information that might help us to identify the problem.


:exclamation: NOTE: These instructions will not solve the problem. They are only intended to gather more information which might provide a clue that eventually leads to a solution.


Please do this:

  1. When you encounter an error, you'll see a button that looks like two pieces of paper at the top right corner of the black console panel below the editor sketch panel. Click that button.
    image
    :exclamation:If you can't see the console panel, use your mouse to click and drag the orange bar upward to reveal it.
  2. Open a forum reply here by clicking the Reply button.
  3. Click the </> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  4. Press Ctrl+V.
    This will paste the compilation output into the code block.
  5. Move the cursor outside of the code tags before you add any additional text to your reply.
  6. Click the Reply button to post the output.

In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here:

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a forum reply here by clicking the Reply button.
  5. Click the "Upload" icon (image) on the post composer toolbar:
    image
  6. Select the .txt file you saved.
  7. Click the Open button.
  8. Click the Reply button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.

Start verifying
{"message":"\"{\\\"id\\\":\\\"Dp2npRWD\\\",\\\"code\\\":\\\"bad_request\\\",\\\"status\\\":400,\\\"detail\\\":\\\"[7Sy6Cr4f] 400 invalid_request: request.name must match the regexp \\\\\\\"^[\\\\\\\\\\\\\\\\w\\\\\\\\\\\\\\\\.]+$\\\\\\\" but got value \\\\\\\"Test-P-and-T_dec05a.ino\\\\\\\"; request.name must match the regexp \\\\\\\"^[\\\\\\\\\\\\\\\\w\\\\\\\\\\\\\\\\.]+$\\\\\\\" but got value \\\\\\\"Test-P-and-T_dec05a\\\\\\\", regexp: ^[\\\\\\\\w\\\\\\\\.]+$, attribute: request.name, value: Test-P-and-T_dec05a\\\"}\\n\"","status":400,"optionalParameters":{}}

Thanks again for your help. I'll check back in tomorrow afternoon.

I see the problem now. Increased restrictions were recently placed on the sketch name and filenames in Arduino Cloud. One of the characters that are now prohibited is -. The presence of this character in your Thing name is the cause of the error.

I'll provide instructions to fix this:

  1. Open your Thing in Arduino IoT Cloud.
  2. Click on the Thing name on the Arduino IoT Cloud toolbar:
    image
  3. Remove all the - characters from the name (e.g., changing it to Test_P_and_T).
    The name must contain only letters (a-z, A-Z), numbers, and _.
  4. Press Enter.

You should now be able to verify and upload your Thing sketch without getting that 400 error.


Please let me know if you have any questions or problems while following those instructions.

That did it! Made those minor changes and all seems to be working fine now.
Many, many thanks for your help.

You are welcome. I'm glad it is working now.

Regards,
Per

I'm having a similar issue but it's happening all over the IoT manager. I changed all my names to be within the character specifications that were mentioned earlier in this and yet still having the 401 error appear at the bottom of the screen.

Hi @devilryascended. I think it is a completely different cause. See the discussion here:

Hello there,

The issue you reported should now be solved and fully recovered. Please refresh the page and try again now.

We apologize for any inconvenience this may have caused and appreciate your patience and understanding.

If you have any other problem, please let us know.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.