FAQ & SUPPORT

SnapShop Troubleshooting Guide

Find professional solutions to common configuration issues, server deployment errors, and platform management questions.

Q: Database Connection Failed (MongoServerSelectionError)

Cause: The SnapShop backend cannot establish a connection to your MongoDB instance due to incorrect credentials, invalid URI formatting, or restrictive firewalls.

Solutions:

  • Verify your MongoDB connection string in the .env file. Ensure the username, password, and database name are absolutely correct.
  • If utilizing MongoDB Atlas (Cloud), ensure your VPS or Hosting Server's IP address is whitelisted in the Atlas Console under Security > Network Access.
  • If hosting MongoDB locally on a VPS, verify the database service is actively running by executing:
    systemctl status mongod

Q: Firebase Authentication Errors / Social Sign-In Fails

Cause: Missing Firebase configuration keys, mismatched environmental variables, or unauthorized domain requests.

Solutions:

  • Navigate to Firebase Console > Project Settings. Ensure your Web App Configuration keys perfectly match the values entered within the SnapShop Admin Panel Auth Settings.
  • Authorize your live domain: Go to Firebase Console > Authentication > Settings > Authorized Domains, click Add Domain, and insert your website's URL (e.g., yourdomain.com).

Q: Product Images Fail to Upload / Missing Images

Cause: Incorrect folder permissions, missing upload directories on your VPS, or exceeding file size limits.

Solutions:

  • Ensure the /uploads or /public/images directory exists in your server and has the correct write permissions. If missing, create it manually.
  • If you are receiving a "Payload Too Large" error, check your Nginx configuration. You may need to increase the client_max_body_size parameter.
  • Verify that the uploaded images are in a supported web format (like JPG, PNG, or WebP) and are optimized for the web to avoid slow loading times on the storefront.

Q: Admin Panel Access Denied / Invalid Credentials

Cause: The administrator account was not successfully created during the initialization wizard, or the password was forgotten.

Solutions:

  • Ensure you have fully completed the SnapShop Platform Initialization Wizard which creates the initial administrator profile.
  • If you lost your credentials, you must access your MongoDB instance directly (via MongoDB Compass or mongosh), navigate to the users collection, and manually reset the password hash, or drop the database to re-trigger the initialization wizard.

Q: Live Site Preview Shows "502 Bad Gateway"

Cause: The Node.js application process has crashed, is not running, or the reverse proxy (Nginx/Apache) is failing to route traffic.

Solutions:

  • Check the application error logs in your hosting panel (Gadohost/cPanel) or via PM2 on your VPS to identify the root cause of the crash.
  • Ensure the application is actively listening on the correct port defined in your environment settings.
  • Try clicking the Re-launch or Restart Node.js App button within your hosting control panel to reboot the instance.