DEV Community

Juha Autero
Juha Autero

Posted on

3 2

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.

AWS Q Developer image

Your AI Code Assistant

Ask anything about your entire project, code and get answers and even architecture diagrams. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Start free in your IDE

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

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay