# Troubleshooting
These are some troubleshooting tips for more common issues people might run into while developing, including more information on what might be happening and how to fix the problem.
# User has reported an error
For specific errors, go to Sentry and check both japanrabbit-frontend
and japanrabbit-backend
projects (filter by production
environment). A list of new and past errors can be found there with plenty of information. You will be able to see the email address of the user affected in the error details, a timestamp and stack trace.
Apart from that, Stackdriver will often contain complementary information about the error context and logs around it.
# 404 - This page does not exist or you don't have permissions to see it
If you are redirected to a 404 view showing this, make sure that:
You are trying to see a valid route. See
src/router/routes
for all the possible routes.You are logged in with the correct user. This route could appear if a customer tries to see an admin route or something similar. Logout and login with the correct user. See development docs to learn how to mock authentication during development.
Your session is clean. If you had run the server previously or made certain modifications, you might have an outdated access token in localStorage. Go to
/logout
route manually to make sure the session is clean.You are connected to the right database. This can be changed by modifying the corresponding environment variable. See environment docs for more information.
# Errors running scripts (e.g. yarn dev
)
Make sure you've followed the instructions for Setup and development. If you already have, try deleting the node_modules
folder and installing fresh:
# 1. Delete all previously-installed dependencies.
rm -rf node_modules
# 2. Install dependencies fresh.
yarn install
If that doesn't work, it's possible that a newer version of a dependency is creating a problem. If this is the problem, you can work around it by installing dependencies from the yarn.lock
file of a previously working branch or commit.
# 1. Delete all previously-installed dependencies.
rm -rf node_modules
# 2. Use the same yarn.lock as the `origin/master` branch. If the problem
# exists on the `origin/master` as well, instead use the last-known
# working branch or commit.
git checkout origin/master -- yarn.lock
# 2. Install dependencies fresh, using only the exact versions specified
# in the `yarn.lock` file.
yarn install --frozen-lockfile
If this solves your problem, you can use yarn outdated
to see the packages that may have received updates, then upgrade them one at a time with yarn upgrade the-package-name
to see which upgrade introduces the problem.
# Visual Studio (VS) Code formatting issues
If you're using VS Code and notice that some files are being formatted incorrectly on save, the source is probably a formatter extension you've installed. The reason you're seeing it now is that this project enables the editor.formatOnSave
setting. Previously, that extension was probably just doing nothing. To fix the problem, you'll need to either properly configure the extension or, if it's simply broken, uninstall it.
Extensions with known issues include: