Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There's no page at this address #1297

Open
sandeeppangeni17 opened this issue Sep 14, 2023 · 2 comments
Open

There's no page at this address #1297

sandeeppangeni17 opened this issue Sep 14, 2023 · 2 comments

Comments

@sandeeppangeni17
Copy link

sandeeppangeni17 commented Sep 14, 2023

Here is my shopify.js configs:


import { BillingInterval, LATEST_API_VERSION } from "@shopify/shopify-api";
import { shopifyApp } from "@shopify/shopify-app-express";
import { SQLiteSessionStorage } from "@shopify/shopify-app-session-storage-sqlite";
import { restResources } from "@shopify/shopify-api/rest/admin/2023-07";

const DB_PATH = `${process.cwd()}/database.sqlite`;

// The transactions with Shopify will always be marked as test transactions, unless NODE_ENV is production.
// See the ensureBilling helper to learn more about billing in this template.
const billingConfig = {
  "My Shopify One-Time Charge": {
    // This is an example configuration that would do a one-time charge for $5 (only USD is currently supported)
    amount: 5.0,
    currencyCode: "USD",
    interval: BillingInterval.OneTime,
  },
};

const scopes =
  "read_customers,read_orders,read_products,write_customers,write_products";

const hostName = "https://appname.domain.com";

const SHOPIFY_API_KEY = "#########";

const SHOPIFY_API_SECRET = "#######";

const shopify = shopifyApp({
  useOnlineTokens: true,
  api: {
    apiKey: SHOPIFY_API_KEY,
    apiSecretKey: SHOPIFY_API_SECRET,
    scopes: scopes.split(","),
    // hostName: hostName.replace(/https?:\/\//, ""),
    apiVersion: LATEST_API_VERSION,
    restResources,
    billing: undefined, // or replace with billingConfig above to enable example billing
  },
  auth: {
    path: "/api/auth",
    callbackPath: "/api/auth/callback",
  },
  webhooks: {
    path: "/api/webhooks",
  },
  // This should be replaced with your preferred storage strategy
  sessionStorage: new SQLiteSessionStorage(DB_PATH),
});

When installing the app it shows the dashboard for a second and then display the error message as There's no page at this address

URL will be like: https://admin.shopify.com/store/restockstoretesting12/apps/eebaaf49180d45a6dfd5906be615d6e6/?hmac=76cc214b26e483c267d4f0a02c95cd03ace160b2eb72a087a5573093b9fea76d&host=YWRtaW4uc2hvcGlmeS5jb20vc3RvcmUvcmVzdG9ja3N0b3JldGVzdGluZzEy&shop=restockstoretesting12.myshopify.com&timestamp=1694672075

@tobi @macournoyer @methodmissing @ericflo

@ankur6971
Copy link

ankur6971 commented Sep 18, 2023

Hello @sandeeppangeni17.

You have probably missed out on pasting the following last line:

export default shopify

Also, I see that the hostname is commented out.

However, when I put the above code to work, I was able to install the app but I simply could not see the billing page

You may go through this link which is around similar issue : #1253

@sandeeppangeni17
Copy link
Author

export default shopify

I have added the export default shopify too but still not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants