Shopify Development

Shopify Custom App Installation Error: 'Server IP Address Not Found' Solved

Hey everyone,

Ever hit a wall during Shopify custom app development, especially when you're just trying to get your brilliant idea installed and talking to your store? It's a common snag, and one we recently saw pop up in the community that really highlights a crucial piece of the local development puzzle.

One of our fellow developers, usman18, ran into the dreaded "Server IP address could not be found" error when trying to install their custom Node.js + Express app. They'd done all the right things, or so it seemed: set up the app in the Partner dashboard, configured URLs and scopes, got their local server running on http://localhost:3000, and even fired up ngrok to get that public HTTPS forwarding URL. They used that ngrok URL for their App URL, Redirect URL, and Webhook URL, then released a new app version and tried reinstalling. Yet, that stubborn error persisted, blocking the OAuth authentication and API usage. Frustrating, right?

Shopify app OAuth flow with ngrok tunneling for local development
Shopify app OAuth flow with ngrok tunneling for local development

The Core Culprit: A DNS Detective Story

Thankfully, another sharp community member, youssefhe5, quickly chimed in with a spot-on diagnosis: this usually screams "DNS issue." It's not that your server isn't running, or that ngrok isn't working at all. The problem is that Shopify, when it tries to connect to your app during the installation and OAuth flow, isn't looking in the exact right place or at the exact right time.

Think of it like this: Shopify needs a public address to talk to your app. For local development, localhost:3000 isn't public, so we use tunneling services like ngrok to create a temporary, public HTTPS URL that points to your local machine. The catch? These ngrok URLs often change every time you restart ngrok.

Why Ngrok (or a Tunneling Service) is Non-Negotiable for Local App Development

Before we dive into the fix, let's address a common question: "Can this be solved without using ngrok (for example via Postman or another method)?" The answer, for local development of a Shopify app that requires OAuth, is a resounding no. Shopify's OAuth flow and subsequent API communication demand a publicly accessible HTTPS endpoint.

Your local server (e.g., http://localhost:3000) is only visible to your machine. Shopify, a remote server, cannot "see" or connect to it directly. This is where tunneling services like ngrok, Cloudflare Tunnel, or localtunnel become indispensable. They create a secure tunnel from a public HTTPS URL to your local development server, making your local app accessible to Shopify.

Tools like Postman are excellent for making API requests to an existing server, but they cannot act as the server itself that Shopify needs to redirect to during the installation and authentication handshake.

Solving the "Server IP Address Could Not Be Found" Error: A Step-by-Step Guide

Based on usman18's experience and the expert advice, here’s a comprehensive troubleshooting guide to get your custom Shopify app installed smoothly:

1. Verify Your Ngrok Tunnel is Active and Correct

  • Ensure ngrok is running and actively tunneling to the correct local port where your Node.js/Express server is listening. For example, if your server runs on port 3000, your ngrok command should be ngrok http 3000.
  • Double-check that the ngrok terminal shows an active session and a valid HTTPS forwarding URL.

2. Crucially, Update URLs in the Shopify Partner Dashboard

This is the most frequent culprit. Ngrok generates a new, unique HTTPS forwarding URL every time you restart it (unless you have a paid ngrok plan with a static domain). Shopify must have the current, active URL to communicate with your app.

  • Go to your custom app settings in the Shopify Partner dashboard.
  • Take the current HTTPS forwarding URL directly from your active ngrok terminal.
  • Update both the "App URL" and all "Redirect URLs" to match this ngrok URL exactly.
  • Important: If you restart ngrok, you must repeat this step as your ngrok URL will have changed.

Pro Tip for Shopify CLI Users: If you're developing with the Shopify CLI (e.g., using shopify app dev), the CLI often handles updating these URLs automatically. However, if you want to prevent this automatic update (perhaps for a specific testing scenario), you can add automatically_update_urls_> to your shopify.app.toml file. For manual ngrok users, this setting is not directly applicable, and manual updates remain essential.

3. Confirm Your Local Server is Running

It sounds basic, but ensure your Node.js + Express server is indeed running on http://localhost:3000 (or whatever port you've configured) before you start ngrok and attempt installation. If your local server isn't active, ngrok has nothing to tunnel to.

4. Review API Scopes

While less likely to cause a "Server IP address could not be found" error, incorrect or missing API scopes can lead to other issues during OAuth. Always ensure you've requested the necessary permissions for your app's functionality in the Partner dashboard.

5. Try a Clean Reinstallation

After making all the necessary URL updates, it's often beneficial to perform a clean reinstallation:

  • Uninstall the app from your development store.
  • Then, attempt to install it again. This ensures Shopify initiates the OAuth flow with the latest, correct URLs.

Best Practices for Seamless Shopify App Local Development

  • Always Check Ngrok: Make it a habit to copy the fresh ngrok URL every time you start it and immediately update your Shopify Partner dashboard.
  • Consider Paid Ngrok: For a more stable development experience, especially if you frequently restart ngrok or collaborate, a paid ngrok plan allows you to reserve static domains, eliminating the need for constant URL updates.
  • Use Shopify CLI: If you're not already, leverage the Shopify CLI. Its shopify app dev command streamlines local development, including automatic tunneling and URL management, reducing these common headaches.
  • Monitor Ngrok Logs: Keep an eye on your ngrok terminal for any connection errors or requests coming through. This can provide valuable debugging information.

Conclusion

The "Server IP address could not be found" error, while frustrating, is almost always a straightforward fix related to ensuring Shopify can correctly locate and communicate with your locally running app. By meticulously verifying your ngrok tunnel and, most importantly, keeping your Shopify Partner dashboard URLs perfectly synchronized with your active ngrok forwarding URL, you'll overcome this hurdle and proceed with building your innovative Shopify custom app.

At Shopping Cart Mover, we understand the intricacies of Shopify development and integrations. Whether you're building a custom app, migrating a store, or optimizing your e-commerce ecosystem, our experts are here to provide guidance and solutions. Don't let development snags slow down your e-commerce journey!

Share:

Use cases

Explore use cases

Agencies, store owners, enterprise — find the migration path that fits.

Explore use cases