View the original community article here
Last tested: Aug 31, 2020
When attempting to save a LookML file, the save button will turn red when you click it:
There are several possible causes.
Expecting 'end_of_file', 'keyword', got '}'
There are a couple things that could trigger this error message:
- The most common trigger for this is a syntax problem, such as a missing or extra end curly brace. To check this, we can fold all the LookML objects in the file to see if everything folds as expected.
- We have 2+ IDE tabs open and we are trying to save in the tab that is not as updated as the other(s).
- There are two people making changes to the same file and when one saves first, the other gets the save error when trying to save their changes.
400 Error in the JS console
We have seen this with LookML dashboards with missing or mis-aligned syntax. In this case there was no other indication in the IDE, and there is an error 400 in the console. Please reach out to Looker Support if you are seeing this behavior.
403 error in the js console
If you self-host, this could be due to permissions on the file system. Verify the permissions on the LookML folder and files in question in that users models directory using
ls -lah . They should all be owned by the user running Looker.
If you self-host OR are Looker-hosted with a custom domain, you might have Cloudflare security settings set up to block saving files with certain strings. We have seen this occur on files with comment characters
# and with particular keywords like
COALESCE , and
404 error in the js console
If this happens specifically with files in folders, this is likely due to reverse proxy settings. Check if your proxy is blocking encoded '/' (%2F) from the URL
Two things that could be going on:
- The reverse proxy is denying URL's that had an encoded slash (%2F)
- The proxy is encoding slashes when proxying
Final solution: Require a combination of AllowEncodedSlashes and nocanon on the Proxy statement.
Workaround while investigating: Create a blank project and manually create and edit the files outside of any folders. This will help you keep developing while you work on isolating the issue.