Sebastian Suchanowski Programmer's notes


Invalid length for a Base-64 char array

Lately I am working on iDoc24 stuff ( and and this is my major responsibility for the moment – but not only iOS apps but also taking care of backend system (which was originally written in – bleh! :p). I’ve encountered a lot of issues there and I’d like to share them with you.

Here is the most important line from stack trace I’ve got

at System.Convert.FromBase64String(String s)

Read from storage 0 bytes, but requested 12 bytes

From time to time this error could ocurr while force killing InteliJ process. It means that you have corrupt the caches and what you need to do is clear it (File -> Invalidate Cache). InteliJ will have to reindex all files again so reopening the projects can take a while. But if that won’t help next thing to do is delete compiler cache manually. Remove folders:

  • Users\user\.IntelliJIdea90\system\caches
  • Users\user\.IntelliJIdea90\system\compiler\project\.caches