Don't crash when failing to contact the package server

Fixes #2713