resolve errors when distribute permission