DEV Community

loading...

unexpected char: 0xFFFF

jautero profile image Juha Autero ・1 min read

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.

Discussion (1)

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

Forem Open with the Forem app