Sebastian Suchanowski Programmer's notes

20Apr/130

Invalid length for a Base-64 char array

Lately I am working on iDoc24 stuff (www.iDoc24.com and www.stdtriage.com) 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 asp.net – 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

1
at System.Convert.FromBase64String(String s)
20Aug/110

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