force_legacy_domain=1 cascading redirects using shopify-app-template-node

force_legacy_domain=1 cascading redirects using shopify-app-template-node

StevenGraf
Shopify Partner
5 0 8

I'm having an issue when installing my embedded sales channel. I've been getting a cascade of new windows opening every time I go through the oauth process. The app will start on the old myshopify domain, then redirect to admin.shopify.com, then open a new tab that's at the old myshopify domain, over and over again. All new tabs have the query param force_legacy_domain=1. When new tabs open, they invalidate the old ones, and I'm redirected on those pages to a page in settings that says there's a cookie error.

 

I'm using a custom express app that's originally derived from the shopify-app-template-node. Here are my node module dependencies:

 

For package.json:

 

 

 

"dependencies": {
    "@shopify/app": "3.25.0",
    "@shopify/cli": "3.25.0"
  },

 

 

 

 

For web/package.json:

 

 

 

"dependencies": {
    "@shopify/shopify-app-express": "^1.0.0",
    "@shopify/shopify-app-session-storage-sqlite": "^1.0.0",
    "@types/express": "^4.17.13",
    "@types/express-serve-static-core": "^4.17.30",
    "compression": "^1.7.4",
    "cookies": "^0.8.0",
    "cross-env": "^7.0.3",
    "mongoose": "^6.8.4",
    "node-fetch": "^3.3.0",
    "serve-static": "^1.14.1"
  },
  "devDependencies": {
    "jsonwebtoken": "^8.5.1",
    "nodemon": "^2.0.15",
    "prettier": "^2.6.2",
    "pretty-quick": "^3.1.3"
  },

 

 

 

 

For web/frontend/package.json:

 

 

 

"dependencies": {
    "@shopify/app-bridge": "^3.1.0",
    "@shopify/app-bridge-react": "^3.1.0",
    "@shopify/app-bridge-utils": "^3.1.0",
    "@shopify/polaris": "^10.17.1",
    "@shopify/polaris-icons": "^6.7.0",
    "@vitejs/plugin-react": "1.2.0",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-query": "^3.34.19",
    "react-router-dom": "^6.3.0",
    "vite": "^2.8.6"
  },
  "devDependencies": {
    "history": "^5.3.0",
    "jsdom": "^19.0.0",
    "prettier": "^2.6.0",
    "vi-fetch": "^0.6.1"
  }

 

 

 

Is there a version of any of these packages that I need to update to in order for the new redirects to work? Any help would be greatly appreciated.

Replies 8 (8)

Buoor_Commerce
Shopify Partner
1 0 0

We are having the same problem, any update?

テックギーク運営者
Shopify Partner
33 3 12

I am also having the same problem.

mohan-mensabran
Shopify Partner
1 0 0

I am having the same issue.

Avi_Ben_Zaken
Shopify Partner
18 0 6

same here, anyone solved it?

Mithat_
Shopify Partner
4 1 4

This is likely to be confirmed Shopify bug affecting new stores and apps that load slowly.
https://github.com/Shopify/shopify-app-bridge/issues/160#issuecomment-1425990569

StevenGraf
Shopify Partner
5 0 8

Hi All - We're still having this issue. Has anyone else found a work around?

makasanas
Shopify Partner
22 0 3

Any update on this issue ? 

I am facing issue in old app(app1)
I've create another app(app2) with same code (nothing changed except - app secretes ) and it is working fine.
app2 is working correctly without any issue. but I wanted to make it work with app1 as I am having many merchants with that app.



makasanas
Shopify Partner
22 0 3

Now it is working for me(Resolved automatically), day before yesterday it wasn't.

I think it may take some time to get resolved from shopify's end (their data pipeline can take upto 3 hours to update) - https://github.com/Shopify/shopify-app-bridge/issues/160#issuecomment-1430527337