Shopify Whitelisted redirection URL(s) not working

Solved
Souravv
Tourist
16 0 1

All my Shopify Apps (Even a basic app) are failing with the following error.

/shopify/callback 500 Internal Server Error

TypeError: argument str must be a string
   at Object.parse (/node_modules/cookie/index.js:51:11)
   at app.get (/home/site/wwwroot/app.js:211:30)
   at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)
   at next (/node_modules/express/lib/router/route.js:137:13)
   at Route.dispatch (/node_modules/express/lib/router/route.js:112:3)
   at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)
   at /node_modules/express/lib/router/index.js:281:22
   at Function.process_params (/node_modules/express/lib/router/index.js:335:12)
   at next (/node_modules/express/lib/router/index.js:275:10)
   at urlencodedParser (/node_modules/body-parser/lib/types/urlencoded.js:91:7)
   at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)
   at trim_prefix (/node_modules/express/lib/router/index.js:317:13)
   at /node_modules/express/lib/router/index.js:284:7
   at Function.process_params (/node_modules/express/lib/router/index.js:335:12)
   at next (/node_modules/express/lib/router/index.js:275:10)
   at expressInit (/node_modules/express/lib/middleware/init.js:40:5)
   at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)
   at trim_prefix (/node_modules/express/lib/router/index.js:317:13)
   at /node_modules/express/lib/router/index.js:284:7
   at Function.process_params (/node_modules/express/lib/router/index.js:335:12)
   at next (/node_modules/express/lib/router/index.js:275:10)
   at query (/node_modules/express/lib/middleware/query.js:45:5)

 

Is there any maintenance or something on going, because everything was working perfectly till yesterday night?

0 Likes
Souravv
Tourist
16 0 1

Please close this issue.

It was a problem with my browser. 

Apologies for the inconvenience. 

0 Likes
Reviewerly
Tourist
3 1 0

Hey, I'm still experiencing this issue. So, my app works on Firefox but not on Google Chrome, which is obviously a problem. I've tried resetting Chrome settings, turning off extensions, restarting my computer, and clearing cookies. Nothing seems to work! My app was working fine a few days ago. Would really appreciate some help!

0 Likes
Reviewerly
Tourist
3 1 0

Hey! Nevermind—just fixed the issue!

For anyone who's experiencing the same problem specifically on Google Chrome, it's because Chrome recently rolled out Chrome 80, which messes up cookies for embedded Shopify apps.

You need to set the sameSite attribute to 'none' and secure to true. Then, everything should work fine. This GitHub repo (by Shopify) shows you how to make that adjustment with different languages: https://github.com/GoogleChromeLabs/samesite-examples.

If you're working with NodeJs, as I am, refer to this resource: https://github.com/GoogleChromeLabs/samesite-examples/blob/master/javascript-nodejs.md.

Hope this helps someone! I was really panicking that my Shopify app was permanently broken, lol.

0 Likes
Souravv
Tourist
16 0 1

Hey.. Thanks for the Solution, it might be the issue.

But I just uninstalled Chrome and Re-installed it, and guess what, all fixed.

I will check the details as well for the root cause.

0 Likes
Reviewerly
Tourist
3 1 0

This is an accepted solution.

Let me know how that goes! The sameSite attribute will become the standard soon, so I suggest implementing it if possible.

0 Likes