Blank output and Serial monitor panel

Using 2.0.3 on Windows 10 I have a problem with the Output and Serial monitor panel at the bottom of the screen sometimes being empty. I have not been able to reproduce the problem on demand but it seems to be associated with using "Save As" and changing the default new filename that is offered

When the problem occurs it is always immediately after using "Save As" during which the IDE window is blanked then repainted with the sketch. At that point there is no bottom panel and the sketch is in a panel that is the full depth of the IDE window. Verifying or uploading the sketch causes the Output panel to open but no progress information is displayed. Opening the Serial monitor resets the board as usual but no output is displayed although the sketch runs as normal. Once in this state then selecting Preferences from the menu shows a similarly blank window

The only way out of this situation that I have found is to close the IDE, restart it and reload the sketch or if another sketch is already open in the IDE, to close the renamed sketch and open it again

I am using the Theia High Contrast Theme which I believe may be a factor in the problem, but as the problem does not occur regularly it is difficult to be sure. I have not seen the problem when using the Dark Arduino theme but I have seen it with the Dark Theia theme

My conclusion would be that there are problems with the 2 dark Theia themes, which is a shame because I prefer the dark themes, but the cursor position is practically invisible in the Arduino dark theme. I have looked at the possibility of creating my own theme using VS Code Theme Studio but cannot see how to make the cursor current insertion point more prominent

Thanks for your report @UKHeliBob. The next time the problem occurs, please do this as soon as possible:

The IDE automatically writes log files while it is running. I think these logs might contain some information that will allow us to identify the problem so I'm going to ask you to provide the latest log file from your computer.

Please do this:

  1. Open a forum reply here by clicking the Reply button.
  2. Click the "Upload" icon (image) on the post composer toolbar:
    image
  3. Select the latest .log file from this folder (the files are named according to the date):
    C:\Users\<username>\AppData\Roaming\Arduino IDE\
    
    (where <username> is your Windows username)
    Note that the C:\Users\<username>\AppData folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".
  4. Add the log file as an attachment to a reply in this topic

The reason I say "as soon as possible" is because the IDE generates a lot of log content and it can be difficult to find the useful information in a log file. If you grab the log file soon after the problem occurs, then the relevant section will be near the end of the file instead of somewhere in the middle of a huge mass of text. But it's not super time critical; more just a matter of getting the file before restarting the IDE and doing a bunch of other normal stuff that generates additional irrelevant log content.


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

The designers worked on that bug last week and there is a now PR to fix it:

We only need one of the team members to do a quick review and then it will be merged in. So I expect the bug will be fixed in the nightly build version of Arduino IDE sometime this week.

Thanks for the quick response

As there were 267 log files in C:\Users\Bob2\AppData\Roaming\Arduino IDE I started by closing the IDE and deleting the log files

Then I opened the IDE, used Save As to save the file and then a Verify followed by an Upload (which worked) with the output window empty for both of them. Then I closed the IDE

The log file for this series of events is attached
2023-01-29_log.log (177.0 KB)

Unfortunately I have not made much progress. I think this part of your logs is significant:

2023-01-29 17:21:16 2023-01-29T17:21:16.705Z root ERROR Unexpected error when firing event on build did complete. file:///c%3A/Users/Bob2/AppData/Local/Temp/arduino-sketch-D9FBEEC0EA425D97E67DD50D19412CA4
2023-01-29 17:21:16 2023-01-29T17:21:16.705Z root ERROR Request executeCommand failed with error: command 'arduino.languageserver.notifyBuildDidComplete' not found

I did manage to reproduce the problem once and sure enough I had the same message.

However, my hypothesis is this error message is a symptom rather than the cause. The reason I think this is because this arduino.languageserver.notifyBuildDidComplete command runs at the end of the compilation process. But from your description, it seems the IDE is already in a bad state before the compilation process even starts. So the error is only the result of the IDE trying to run that command while already in the bad state. I didn't find anything in the logs to give an idea of the cause of the bad state.

Unfortunately I only had that one lucky reproduction out of dozens of attempts so I don't have any idea of what the required conditions are to reproduce it.

What I think would be interesting is to see the Arduino Language Server logs from an IDE session when this fault occurs. There is an advanced option to enable this type of logging. Unfortunately the language server produces a huge quantity of logs, so this is not really the sort of thing you would want to leave running while you used the Arduino IDE normally. It is more suited to enabling just before running a minimal procedure to reproduce a fault, then immediately grabbing the log files before they grow into many megabytes of difficult to interpret content.

In case you want to give it a try, or are just interested in knowing about this feature for your own support work, I'll share my stock instructions for enabling and accessing these logs:


Arduino IDE has an advanced option for enabling logging by the Arduino Language Server tool that proves the code-aware features in Arduino IDE such as problem detection, code information on mouse hover, Go to..., code suggestions, and auto format. Although these logs are not of value for regular usage of Arduino IDE, they can be helpful for troubleshooting problems with the language server.

These are the instructions for generating the log files:

Enable Language Server Logging

  1. Use the Ctrl/+Shift+P keyboard shortcut to open the "Command Palette" in Arduino IDE.
  2. Select the "Preferences: Open Settings (UI)" command from the "Command Palette".
    The "Preferences" tab will now open in the editor panel.
  3. In the "Search Settings" field, type arduino.language.log
  4. Under the "Arduino > Language: Log", section, check the box next to "☐ True if the Arduino Language Server should generate log files into the sketch folder. Otherwise, false. It's false by default."
  5. Close the Preferences tab by clicking its X icon.

Gather Logs

  1. Perform the procedure that caused the problem.
  2. Select Sketch > Show Sketch Folder from the Arduino IDE menus.
    The folder containing the sketch will open in your file browser.
  3. ZIP the entire sketch folder.
    • Instructions for Windows:
      1. Right click the sketch folder.
      2. From the context menu that opens, select "Send to".
      3. Select "Compressed (zipped) folder" from the "Send to" menu.
    • Instructions for Linux:
      1. Right click the sketch folder.
      2. From the context menu that opens, select "Compress...".
      3. In the "Create Archive" dialog that opens, click the Create button.
    • Instructions for macOS:
      1. Control-click the sketch folder.
      2. From the shortcut menu that opens, select "Compress"
  4. Attach the "ZIP" file that was created to a reply here on this forum thread.
    You can do this by drag and dropping the file onto a reply, copy/pasting the file, or by clicking the upward pointing arrow icon ("Upload") on the post composer toolbar.
  5. Close the Preferences tab by clicking its X icon.

Disable Language Server Logging

When language server logging is enabled, log files are saved to every sketch you open in Arduino IDE and they steadily grow in size whenever you are editing the sketch. So the logging is something you would usually want to disable whenever generation of logs is not needed.

  1. Use the Ctrl/+Shift+P keyboard shortcut to open the "Command Palette" in Arduino IDE.
  2. Select the "Preferences: Open Settings (UI)" command from the "Command Palette".
    The "Preferences" tab will now open in the editor panel.
  3. In the "Search Settings" field, type arduino.language.log
  4. Under the "Arduino > Language: Log", section, uncheck the box next to " True if the Arduino Language Server should generate log files into the sketch folder. Otherwise, false. It's false by default."
  5. Close the Preferences tab by clicking its X icon.

You are now welcome to delete the .log files that were added to the sketch folder.

I looked into the log, and the only suspicious entry I found was this:

2023-01-29 17:20:02 2023-01-29T17:20:02.612Z sketches-service WARN Warning! The request sketch path was different than the response sketch path from the CLI. This could be a potential bug. Request: <c:\Users\Bob2\Documents\Arduino\__MQTT\_relay control mqtt\_io_adafruit_(mqtt)\adafruit library\AF_mqtt_AF_lib_2023_test save as 2_copy_20230129170152\AF_mqtt_AF_lib_2023_test save as 2_copy_20230129170152.ino>, response: <c:\Users\Bob2\Documents\Arduino\__MQTT\_relay control mqtt\_io_adafruit_(mqtt)\adafruit library\AF_mqtt_AF_lib_2023_test save as 2_copy_20230129170152>.

I will take a look in the next few days :point_up_2:

I have seen other bug reports using another theme with the blank Preferences dialog. I think it's unrelated to the selected theme.

Next time, when the Preferences page does not load, please check what's in the browser's Console and share it with us. On Windows, you can open the DevTools with Ctrl+Alt+I, locate the Console, right-click in it and select Save as.... See the example:

1 Like

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