"balena envs --application <myAppName>" throws Internal Server Error

Yes, this is a known issue we’ve been working to fix. See the following thread for more info and workaround: Support for device environment variables