Google Sheet API Problem

I have an issue about google sheet api on vercel. I want to add a list to a sheet using with api. My function to add is async function appendRows(auth, sheetName, rows) {
try {
console.log(Appending to sheet: ${sheetName});
console.log(‘Rows to append:’, JSON.stringify(rows));

  const response = await sheets.spreadsheets.values.get({
    auth,
    spreadsheetId: 'id',
    range: `${sheetName}!A:A`,
  });
  
  const lastRow = response.data.values ? response.data.values.length : 0;
  console.log("Last Row:", lastRow);
  
  const range = `${sheetName}!A${lastRow + 1}`;
  console.log('Updating range:', range);
  
  const updateResponse = await sheets.spreadsheets.values.update({
    auth,
    spreadsheetId: 'id',
    range: range,
    valueInputOption: 'RAW',
    resource: { values: rows },
  });
  
  console.log('Update response:', JSON.stringify(updateResponse.data));
  console.log('Data successfully appended.');
} catch (error) {
  console.error('Error appending data:', error);
  console.error('Error details:', JSON.stringify(error, Object.getOwnPropertyNames(error)));
}

} It adds data to sheet in local, there is no problem with auth or function execution time on vercel. I saw some topic on stackoverflow but there is nothing to work. It is not working on both vercel dev and vercel prod.How I can solve this problem?

What error details do you see in the browser console or runtime logs?

Unfortunately, there is no error, but I can not see last row and range logs. Only I see is “Data Successfuly Appended” and endpoint returns 200. In local, I can see last row and range logs and data is really appended to my sheet. I am pretty sure, it is not about function execution time,it is 60 s, endpoint returns in 1000 ms. Also not about authentication because I get autharization completed. My running url is https://ocr-lfvcwjmh7-sudenurs-projects-bbd56ea2.vercel.app .