operation failed. appsscript.json has invalid unsaved changes
- User
operation failed. appsscript.json has invalid unsaved changes
- Assistant
operation failed. appsscript.json has invalid unsaved changes
It sounds like you're encountering an error related to the appsscript.json manifest file in your Google Apps Script project. The error message:
operation failed. appsscript.json has invalid unsaved changes
indicates that there may be issues with unsaved or improperly formatted changes in your appsscript.json file. Here's a step-by-step guide to help you resolve this issue:
Sometimes, the IDE might think there are unsaved changes due to a temporary glitch.
Save All Files:
Ctrl + S (Windows/Linux) or Cmd + S (Mac) to save all open files.Refresh the Editor:
appsscript.json SyntaxAn invalid syntax in the appsscript.json file can cause errors.
Open appsscript.json:
appsscript.json file from the left sidebar.Check for Syntax Errors:
{} or brackets [].Use a JSON Validator:
appsscript.json.Example of a Correct appsscript.json:
{
"timeZone": "America/New_York",
"dependencies": {},
"exceptionLogging": "STACKDRIVER",
"oauthScopes": [
"https://www.googleapis.com/auth/script.external_request",
"https://www.googleapis.com/auth/spreadsheets.currentonly"
]
}
If recent changes are causing the issue and you can’t identify the problem:
Access Version History:
Restore a Previous Version:
If your project relies on external libraries or APIs:
Verify Dependencies:
appsscript.json.Update OAuth Scopes:
Browser-related issues can sometimes cause the editor to behave unexpectedly.
Clear Cache:
Reopen the Editor:
To rule out browser-specific issues:
Try Another Browser:
Use Incognito/Private Mode:
If none of the above steps work, cloning the project might help:
Create a Copy:
Check the New Copy:
If you've tried all the above steps and the issue remains unresolved:
Google Workspace Support:
Google Apps Script Community:
Regularly Save and Commit Changes:
Validate JSON Before Saving:
appsscript.json with a validator after making changes.Backup Your Project:
By following these steps, you should be able to identify and resolve the issue with the appsscript.json file in your Google Apps Script project. If you need further assistance, feel free to provide more details about the changes you made or the context in which the error occurs.