If you keep getting errors when trying to set a custom page tab icon when adding an app to a page – make sure that the application is actually published. You can add it – and the icon will change, but will still generate an error – if the application isn’t published yet. No idea why it’d give an error like that, but hey.
There’s quite a few other reasons for the error as well, but Google have probably already told you about those.