Cannot install app from Shopify App Store

Highlighted
Shopify Partner
7 0 1

On chrome, when i click 'Install', it redirect me to a page said "The page you’re looking for could not be found, Please make sure the web address is correct." There's no error in console.

 

On Safari, it will first ask me to enable the cookies, and then redirect me to the same Not Found page.

 

Im using React + Node, and my koa-shopify-auth is 3.1.56

 

server.use(
    createShopifyAuth({
      apiKey: SHOPIFY_API_KEY,
      secret: SHOPIFY_API_SECRET_KEY,
      scopes: ['read_products','read_script_tags','write_script_tags','read_orders','write_discounts'],
      async afterAuth(ctx) {
        const { shop, accessToken } = ctx.session;
        ctx.cookies.set('shopOrigin', shop, { httpOnly: false });
        const dd = await getDataExist(ctx, accessToken, shop);
        dd === 0 ? ctx.redirect('/') : await getSubscriptionUrl(ctx, accessToken, shop);
      }
    })
  );

Anyone can help to figure this out?

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
624 103 124

Hey @Amar_Gandhi ,

 

Since you mentioned that you are seeing this issue on Chrome, and that your app is written in React+Node with Koa-shopify-auth, it's possible that it is because of recent changes to Chrome's SameSite cookie policy that your app is experiencing these problems. Starting February 18th 2020, Chrome slowly rolled out their updated default for the SameSite attribute. The default behaviour of Chrome changed from allowing cookies in a cross-site or third-party context to denying them, unless specific attributes were included as a part of the cookie. Since embedded Shopify apps run in an iframe on a different domain than the Shopify admin, they are considered to be in a third-party context. (https://shopify.dev/tutorials/migrate-your-app-to-support-samesite-cookies)

 

To fix this in koa-shopify-auth for Node.jsyou will need to update your app's session to include the SameSite setting: app.use(session({ secure: true, sameSite: 'none' }, app))

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes