Compilation error: grpc: error while marshaling: string field contains invalid UTF-8

I'm using Arduino IDE 2.3.3 and I got this error after compiling code that already worked before the upgrade
Compilation error: grpc: error while marshaling: string field contains invalid UTF-8

You need to post the source code using code tags and the verbose error log using code tags, then someone can look at it. We don't chase links.

Same issue here, I can't compile anything with the IDE (2.3.3) after this update so I think the source code doesn't really matter. Web editor compiles just fine.

Update: downgrading to IDE 2.3.2 seems to fix the problem for me.

Its work! I downgrading tô arduino ide 2.3.2 too and compile normal.

I have also updated to IDE 2.3.3 and it gives the same error and sometimes compile error. For simple code that does not use external libraries, the compile error did not occur. For sketches that use external libraries, such as Adafruit's AMG88xx library, the error occurs. It appears that the external library (part of?) It appears that there has been a change in the UTF handling of (some?) external libraries. My countermeasure is also downgraded to 2.3.2.

There was a bug that caused a problem like this a while back:

However, that has been fixed for a couple of years now. I checked to see if I could reproduce the fault by setting up the specific conditions that caused it before that that specific bug was fixed, but the fault does not occur under those conditions.

So it must be some different conditions that are required to produce the fault. If we could figure out what those conditions are, it would greatly facilitate the investigation and fix. As it is now where nobody from Arduino is able to reproduce the fault, there isn't really anything we can do about it.

So if anyone can figure out the specific cause of the fault, please let us know and we'll proceed. From what @covuza_5050 said, it seems likely it is caused by one of the libraries you have installed. Unfortunately the error message doesn't give us any clue about which library it might be.

en mi caso es esta libreria>
c:\Users\Hern�n Camusso\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp: In member function 'MFRC522::StatusCode MFRC522Extended::TCL_Transceive(TagInfo*, byte*, byte, byte*, byte*)':
c:\Users\Hern�n Camusso\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:824:34: error: ordered comparison of pointer with integer zero ('byte*' {aka 'unsigned char*'} and 'int')

Create a new sketch.
Add the LyquidCrystal_I2C library.
Let's try to compile.
We get a compilation error: grpc: marshaling error: string field contains invalid UTF-8 code.

Try GitHub - arkhipenko/TaskScheduler: Cooperative multitasking for Arduino, ESPx, STM32, nRF and other microcontrollers library.

I have the same message

Looks like I have to downgrade to 2.3.2

Interesting. I just uploaded my library to Arduino Library manager and got this error.

Let me clarify: I use latest IDE and library compiles just fine. But after I uploaded it to the Library Manager and then Installed it I got the same "marshalling" error.

Why?

It compiles, links, and then it shows me this. Have no idea why this happens and what file is the problem.. What string? I don't have any UTF-8, only ASCII characters in my code.

That is really upsetting. What I did - is just published my code and imediately installed it to check if it compiles. Seems like it doesn't

Ooohhh..... I found the reason. Cyrillic letters strike again.

With latest update of Arduino IDE (2.3.4) for some reason my sketchbook location was reset from E:/Arduino to "C/Users/Вячеслав/Documents/blah-blah-blah"

Defenitely that was not me, who changed the sketchbook location.

So, cyrillic (non-latin1) symbols in the path again.

BTW, what is this grpc tool for? It was working good enough when we didn't use it..

When was that? It has always been in IDE 2.x.

Communication between all processes of the IDE.

gRPC is not a tool, but rather a communication framework. gRPC is used for communication between the Arduino IDE application, which is primarily only a graphical user interface, and the Arduino CLI tool, which provides the underlying functionality (e.g., installing libraries and platforms, compiling sketches, uploading).

There is more information on the subject here:

https://arduino.github.io/arduino-cli/latest/integration-options/#the-second-pillar-grpc-interface

Okay.. But how we can make that grpc output be more informative?

BTW, the workaround for this "marshalling" bug is to change Arduino sketchbook location.

I have the same problem when using Blinker.h library.
But when I rollback to Arduino IDE 2.3.2, everything is OK wihout error.

The thing that fixes that such a problem with my libraries was re-downloading from the repositories where I found them, in my case I need the old versions that was using for a various specific projects…

I think it’s because of the folder location, as there’s some “not standard” english characters in the sketchbook path, still bugged on 2.3.6 (the current latest version).