"Uncaught (in promise)" is a JavaScript error that usually occurs when a Promise is fulfilled. There are several possible solutions:
- Handle errors in a catch block. For example:
somePromise()
.then(function(result) {
// 处理结果
})
.catch(function(error) {
// 处理错误
});