skip to Main Content

I am having an issue where I try and run "npm run dev" and it tells me the callback urls need to be changed to the values presented, then run "npm run shopify app config push" which I do.

When I run the command, however, I get the error "Command no longer supported" and instead tells me to run "npm run shopify app deploy", which I do.

After running the deploy command, I try running "npm run dev" again, but when I do, it tells me the callback urls need to be changed again, and the loop keeps going.

Is there something I am doing wrong? Why does the application url change every time I run "npm run dev"?

I’ve also tried running dev, then in a separate cli tab, change the callback urls and run the deploy command. I have also changed the urls in the partners page while dev was still running, but none of that works. Every time I run dev and click on the ‘Preview Url", the app page errors out saying it can’t find the page.

2

Answers


  1. It sounds like you might be encountering a configuration issue with your Shopify app setup. Here are some steps you can take to troubleshoot and resolve the problem:

    Check Your App Configuration: Make sure that your Shopify app configuration is correctly set up with the appropriate callback URLs. These URLs should match the URLs provided by the npm run dev command.

    Verify Environment Variables: Ensure that your environment variables are correctly configured. Sometimes, changes made in the Shopify Partner Dashboard may not reflect in your local environment if the environment variables are not properly set.

    Review the App Setup Process: Double-check the steps you’re following to set up your app. Ensure that you’re following Shopify’s recommended process for deploying and configuring your app.

    Check for Errors: Look for any error messages or warnings that are displayed when you run npm run dev or npm run shopify app deploy. These messages can often provide clues about what might be going wrong.

    Consult Shopify Documentation: Shopify provides comprehensive documentation for app development. Review their documentation to ensure you’re following best practices and recommended workflows.

    Reach Out to Shopify Support: If you’re still experiencing issues, don’t hesitate to reach out to Shopify Support for assistance. They can provide guidance and help troubleshoot any problems you’re encountering with your app setup.

    By following these steps and carefully reviewing your app configuration and setup process, you should be able to identify and resolve any issues causing your app’s URL to change unexpectedly.

    Login or Signup to reply.
  2. You would need to update your config file to prevent this from happening.

    In your shopify.app.toml simply change the following.

    [build]
    automatically_update_urls_on_dev = false
    

    enter image description here

    You can find the reference to that in the doc https://shopify.dev/docs/apps/tools/cli/configuration

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search