Nice to meet you.
I am using this page as a reference to create a login function with MetaMask.
It was working fine until a few hours ago, but then an error occurred and I could not log in.
export default async function handler(req, res) {
console.log("req.body", req.body);
const { address, chain, network } = req.body;
await Moralis.start({ apiKey: process.env.MORALIS_API_KEY });
console.log("request-message.js -->", 1);
try {
console.log("request-message.js -->", 2);
console.log("request-message.js -->", config);
const message = await Moralis.Auth.requestMessage({
address,
chain,
network,
...config,
});
console.log("request-message.js -->", 3);
res.status(200).json(message);
console.log("request-message.js -->", 4);
} catch (error) {
console.log("request-message.js -->", 5);
console.log("request-message.js -->", error);
res.status(400).json({ error });
console.log("request-message.js -->", 6);
console.error(error);
}
}
Error Description
MoralisError [Moralis SDK Core Error]: [C0006] Request failed with status undefined: timeout of 10000ms exceeded
at RequestController.makeError (/Users/home/git/mkdao/node_modules/@moralisweb3/core/lib/controllers/RequestController.js:137:20)
at RequestController.<anonymous> (/Users/home/git/mkdao/node_modules/@moralisweb3/core/lib/controllers/RequestController.js:118:38)
at step (/Users/home/git/mkdao/node_modules/@moralisweb3/core/lib/controllers/RequestController.js:44:23)
at Object.throw (/Users/home/git/mkdao/node_modules/@moralisweb3/core/lib/controllers/RequestController.js:25:53)
at rejected (/Users/home/git/mkdao/node_modules/@moralisweb3/core/lib/controllers/RequestController.js:17:65)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {