Shopify / shopify-app-template-node

MIT License
878 stars 398 forks source link

vendors-node_modules_shopify_polaris_build_esnext_components_AppProvider_AppProvider_esnext-n-40f15c-ef761ddf01764843878b00626610e74c5aa1e8ecb0b0b0e714803e88ac608ef5.js:2 Uncaught Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. #1153

Open adventuretocode opened 1 year ago

adventuretocode commented 1 year ago

Issue summary

vendors-node_modules_shopify_polaris_build_esnext_components_AppProvider_AppProvider_esnext-n-40f15c-ef761ddf01764843878b00626610e74c5aa1e8ecb0b0b0e714803e88ac608ef5.js:2 Uncaught Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

Write a short description of the issue here ↓ app show some build

Expected behavior

when vite build successfully build then no error

What do you think should happen? if any error in code line build shoud show the exact line of error

Actual behavior

What actually happens?

i have create custom session stoage in mongodb it was work with ngrok proxy when i move code to the production server it was not creating session.

Tip: include an error message (in a <details></details> tag) if your issue is related to an error https://github.com/Shopify/shopify-api-node/blob/main/docs/usage/customsessions.md

after app initialize ** CustomSessionStorage { storeCallback: [AsyncFunction: storeCallback], loadCallback: [AsyncFunction: loadCallback], deleteCallback: [AsyncFunction: deleteCallback], deleteSessionsCallback: undefined, findSessionsByShopCallback: undefined

Error after app install app get installed : **The app couldn’t be loaded

This app can’t load due to an issue with browser cookies. Try enabling cookies in your browser, switching to another browser, or contacting the developer to get support.****

on store but app not loading i can see the custom session create on database side

Steps to reproduce the problem

take clone repo and and host to production server setup app try to install app it give error

    1. 1.

Reduced test case

The best way to get your bug fixed is to provide a reduced test case.

Specifications

Lancer92 commented 1 year ago

I also have this bug. I see that somehow there was old session was stored in sessionstorage. Looks like this app template can't handle it right

adventuretocode commented 1 year ago

@Lancer92 thanks for the comment. in my case i am storing the session database side but i am already verify that the session was not store in db table.

how you fixed this issue

my app node express react tech stack.

i already clean the DB and try but no result.

Lancer92 commented 1 year ago

@adventuretocode I fixed it by manually removing the session. Are you seeing this error when trying to install app that was previously deleted?

adventuretocode commented 1 year ago

@Lancer92 yes i clean app the session from the database.

Are you seeing this error when trying to install app that was previously deleted? yes i confirm the app was not installed previously

after thy to install app.

this Error on app installing two different Error when i change the redirection URL order

URL in Allowed redirection URL(s) https://xxx/auth/callback https://xx/auth/tokens

Screenshot from 2022-11-01 18-42-42

URL in Allowed redirection URL(s) https://xxx/auth/tokens https://xx/auth/callback

Screenshot from 2022-11-04 11-48-48

larrydanny commented 1 year ago

Hi there, I'm also getting the same error. How can I resolve this any idea? thanks in advance

mcirami commented 1 year ago

I'm seeing this as well. any way to get this to work?

adventuretocode commented 1 year ago

@larrydanny @mcirami app cookies Error gone after the cleanup the node cache and npm cache and restart the server this i clean the complete db. this solution work for me.

but still the react build error on my side.

@Lancer92 Thanks for the suggestion it was help

mcirami commented 1 year ago

@adventuretocode I can not get this to work no matter what I do. just to be certain how did u 'cleanup the node cache and npm cache' ? I have this hosted on fly.io and I'm not using a db for anything at this point. All I'm doing is trying to redirect auth request back to my website. This was working before. Any help would be greatly appreciated!

adventuretocode commented 1 year ago

yes npm cache clear not using DB means you use the SQLite db. open your project root directory you will get the .sqlite file delete it.

jamalsoueidan commented 1 year ago

It's always been there, I thought it was related to the shopify in general.

promokit commented 1 year ago

Removing database file and clearing cache doesn't help. Any other suggestions?

mkevinosullivan commented 1 year ago

Does this still happen with the latest template? The latest template (since Dec 6, 2022) uses the @shopify/shopify-app-express package which in turn uses v6 of the @shopify/shopify-api package, which was a major overhaul. Session storage also changed (now separate packages, extracted from the API library).

promokit commented 1 year ago

My App created at January 02 2023. "@shopify/shopify-api": "^6.1.0", "@shopify/shopify-app-express": "^1.0.0",