I think that the culprit is the metadata error. This variant wraps Box<dyn Error> which cannot be sent across threads.