Status Update
Comments
jp...@google.com <jp...@google.com> #2
Solved for now by adding @SuppressWarnings
. We'll need to revisit if this pops up again.
Ideas include:
- Whack-a-mole overrides via NullAway Library Models
- Have an custom extract_only=true on the upstream aar targets so that they cannot be accidentally used, and then use the extracted classes.jar files only in the errorprone classpath.
bl...@google.com <bl...@google.com> #3
os...@gmail.com <os...@gmail.com> #4
I'm trying call this like
function doPost() {
try {
return ContentService.createTextOutput(
SpreadsheetApp.openById('1bmPL5jkgW3Cnc6fKdguzEpadEkpX4-18KwhpDrh93v4').getName()
);
} catch (e) {
return ContentService.createTextOutput('err');
}
}
And it's works fine.
But the next code returns err
sometimes
const has = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
function doPost() {
try {
if (!has(SpreadsheetApp, 'openById')) {
throw new Error('SpreadsheetApp has not been initialized');
}
return ContentService.createTextOutput('ok');
} catch (e) {
return ContentService.createTextOutput('err');
}
}
=== UPDATED ===
I try to chenge my region via VPN and caught the err
The project
jp...@google.com <jp...@google.com> #5
I have reported this to the engineering team and future updates will be shared here. Thank you for your patience.
sa...@gmail.com <sa...@gmail.com> #6
I tried to create a new document with a new project in it. The problem is reproducible. Also, the error was reproduced on another account. You can try to see this object yourself with POST requests to the script
Once every few requests in a row you will see information like this:
{ f_trixClient__com_google_apps_maestro_server_beans_trix_impl_SpreadsheetApplicationApiAdapter_:
{ f_waitForExternals__com_google_trix_ritz_client_stubby_impl_RemoteSpreadsheetApplication_: true,
f_spreadsheetService__com_google_trix_ritz_client_stubby_impl_RemoteSpreadsheetApplication_: [Object],
f_userId__com_google_trix_ritz_client_stubby_impl_RemoteSpreadsheetApplication_: [Object],
f_aclStrategy__com_google_trix_ritz_client_stubby_impl_RemoteSpreadsheetApplication_: [Object],
f_requestingApp__com_google_trix_ritz_client_stubby_impl_RemoteSpreadsheetApplication_: [Object],
f_projectNumberProvider__com_google_trix_ritz_client_stubby_impl_RemoteSpreadsheetApplication_: [Object],
f_dataSourceUserAuthorization__com_google_trix_ritz_client_stubby_impl_RemoteSpreadsheetApplication_: [Object],
f_scriptInvocationIdProvider__com_google_trix_ritz_client_stubby_impl_RemoteSpreadsheetApplication_: [Object],
f_isExecutionRuntimeV8Provider__com_google_trix_ritz_client_stubby_impl_RemoteSpreadsheetApplication_: [Object],
f_isFromInstallableTriggerProvider__com_google_trix_ritz_client_stubby_impl_RemoteSpreadsheetApplication_: [Object],
f_activeSpreadsheet__com_google_trix_ritz_client_stubby_impl_RemoteSpreadsheetApplication_: [Object],
f_scriptLocale__com_google_trix_ritz_client_stubby_impl_RemoteSpreadsheetApplication_: {},
f_contextFactory__com_google_trix_ritz_client_stubby_impl_RemoteSpreadsheetApplication_: [Object] }
Description
Description
When handling incoming network requests, the SpreadsheetApp class sometimes returns an unexpected object. Out of 5 requests, approximately 1 to 3 end with an error, while the others execute normally. This object allows calling methods like
openById
, but the code subsequently fails with an error. The issue is observed only when the code is invoked via a URL using thedoPost
method. However, if the code is executed manually through the Apps Script interface, the problem never occurs.Code
Output
See screenshots
Steps
SpreadsheetApp
object may display unexpected properties instead of standard methods.