DEV Community

Juha Autero
Juha Autero

Posted on

unexpected char: 0xFFFF

Since I didn't find anything useful Googling, I decided write this short note.

When you get "unexpected char: 0xFFFF" from your Jenkinsfile (or any Groovy script), it basically means "Parse Error: Unexpected End of File". This is because Groovy's parser is implemented with Antlr that uses Unicode noncharacter U+0FFFF (link to pdf) to signal end of file.

In my case the problem was that I hadn't quoted a string. In retrospect the issue is obvious. When specifying environment variables, the values has to follow Groovy syntax i.e. strings need quotation marks unlike in shell.

Top comments (2)

Collapse
 
ennor profile image
Enno Rehling (恩諾)

Thanks!

Collapse
 
hoseincode profile image
seyed hosein alhoseiny

hi i have not any codes in 65 line in my codes. what this error relate to this?
I uploaded my codes and that ambiguous error