RSC-Labs / medusa-store-analytics

Medusa plugin which provides analytics data about your store
MIT License
43 stars 6 forks source link

Installed but can't open the analytics #19

Open kevin25 opened 1 month ago

kevin25 commented 1 month ago

I got these error and I can't open it

Error: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at uP (main.78f95494.js:18:117235) at s (main.78f95494.js:18:59914) at aR (main.78f95494.js:18:73377) at u (main.78f95494.js:18:120414) at ul (main.78f95494.js:18:111497) at us (main.78f95494.js:18:111425) at ua (main.78f95494.js:18:111288) at s4 (main.78f95494.js:18:107658) at s9 (main.78f95494.js:18:108464) at ib (main.78f95494.js:18:47330) ax @ main.78f95494.js:18 o.componentDidCatch.r.callback @ main.78f95494.js:18 oo @ main.78f95494.js:18 sw @ main.78f95494.js:18 sb @ main.78f95494.js:18 sb @ main.78f95494.js:18 sv @ main.78f95494.js:18 ud @ main.78f95494.js:18 uf @ main.78f95494.js:18 s9 @ main.78f95494.js:18 ib @ main.78f95494.js:18 (anonymous) @ main.78f95494.js:18 setTimeout (anonymous) @ main.78f95494.js:10 P @ main.78f95494.js:10 C @ main.78f95494.js:10 a @ main.78f95494.js:10 batch @ main.78f95494.js:10 dispatch @ main.78f95494.js:10 setData @ main.78f95494.js:10 onSuccess @ main.78f95494.js:10 y @ main.78f95494.js:10 Promise.then v @ main.78f95494.js:10 c @ main.78f95494.js:10 fetch @ main.78f95494.js:10 executeFetch @ main.78f95494.js:10 onSubscribe @ main.78f95494.js:10 subscribe @ main.78f95494.js:10 (anonymous) @ main.78f95494.js:10 o1 @ main.78f95494.js:18 sn @ main.78f95494.js:18 up @ main.78f95494.js:18 (anonymous) @ main.78f95494.js:18 S @ main.78f95494.js:51 A @ main.78f95494.js:51Understand this error main.78f95494.js:27 React Router caught the following error during render Error: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at uP (main.78f95494.js:18:117235) at s (main.78f95494.js:18:59914) at aR (main.78f95494.js:18:73377) at u (main.78f95494.js:18:120414) at ul (main.78f95494.js:18:111497) at us (main.78f95494.js:18:111425) at ua (main.78f95494.js:18:111288) at s4 (main.78f95494.js:18:107658) at s9 (main.78f95494.js:18:108464) at ib (main.78f95494.js:18:47330) {componentStack: '\n at Se\n at div\n at https://admin.quiltsb…quiltsbylynne.com/app/main.78f95494.js:51:155412)'}

radoslaw-sz commented 1 month ago

hi @kevin25 - thanks for raising the issue. Unfortunately, the error log is not showing anything useful, so we to dig into it to find the root cause. Are you familiar maybe with "developer tools" in a browser? It will be very helpful, if you will be able firstly open it and then jump to analytics page. Error will appear, but then in the "Network" we can check if all requests went ok (you can make a screenshot of network tab and paste it here). Does this error appear when you click "Analytics" on the sidebar? Which version of medusa-store-analytics are you using? (I am talking about version from NPM)

Also could you please take a look at your backend logs? Maybe there we will find something useful.

radoslaw-sz commented 1 week ago

hi @kevin25 - any news in this topic?

jaylinsell commented 1 week ago

I have the same issue, so can provide additional context (or try to).

The back-end logs aren't showing any errors. The only item I assume relates, is "[10/Sep/2024:02:16:06 +0000] "GET /admin/analytics-configs HTTP/1.1" 304", but it's successful from the looks of it.

The front-end is pretty useless, it's only giving the React #130: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.[missing argument]

I'm using @rsc-labs/medusa-store-analytics v0.14.0. Additional plugins I have are:

medusa-payment-stripe
medusa-payment-paypal
medusa-file-cloudinary
medusa-plugin-sendgrid
medusa-plugin-mailchimp

If there's anything additional I can do for you to help investigate this - let me know

radoslaw-sz commented 6 days ago

hi @jaylinsell - thank you for your proposal. Indeed, I would need some additional help. Could you please tell what versions you have for medusa packages? I mean @medusajs/medusa, @medusajs/admin etc.

Additionally, could you please open network tab before clicking Analytics on the sidebar and check if any of these requests (marked in blue) have failed: image

jaylinsell commented 5 days ago

Sure - I'll provide the whole dependancy list, just in case.

"dependencies": {
    "@medusajs/admin": "^7.1.4",
    "@medusajs/cache-inmemory": "^1.8.8",
    "@medusajs/cache-redis": "^1.8.8",
    "@medusajs/event-bus-local": "^1.9.6",
    "@medusajs/event-bus-redis": "^1.8.9",
    "@medusajs/file-local": "^1.0.2",
    "@medusajs/medusa": "^1.20.9",
    "@rsc-labs/medusa-store-analytics": "^0.14.0",
    "@tanstack/react-query": "4.22.0",
    "babel-preset-medusa-package": "^1.1.13",
    "body-parser": "^1.19.0",
    "cors": "^2.8.5",
    "dotenv": "16.0.3",
    "express": "^4.17.2",
    "medusa-file-cloudinary": "^1.0.2",
    "medusa-fulfillment-manual": "^1.1.38",
    "medusa-interfaces": "^1.3.7",
    "medusa-payment-manual": "^1.0.24",
    "medusa-payment-paypal": "^6.0.2",
    "medusa-payment-stripe": "^6.0.7",
    "medusa-plugin-mailchimp": "^1.1.50",
    "medusa-plugin-sendgrid": "^1.3.12",
    "prism-react-renderer": "^2.0.4",
    "typeorm": "^0.3.16"
  },
  "devDependencies": {
    "@babel/cli": "^7.14.3",
    "@babel/core": "^7.14.3",
    "@babel/preset-typescript": "^7.21.4",
    "@medusajs/medusa-cli": "^1.3.21",
    "@types/express": "^4.17.13",
    "@types/jest": "^27.4.0",
    "@types/node": "^17.0.8",
    "babel-preset-medusa-package": "^1.1.19",
    "cross-env": "^7.0.3",
    "eslint": "^6.8.0",
    "jest": "^27.3.1",
    "rimraf": "^3.0.2",
    "ts-jest": "^27.0.7",
    "ts-loader": "^9.2.6",
    "typescript": "^4.5.2"
  }

None of those calls are even being made by the looks of it. Screenshot attached. I've filtered it out to only fetch/XHR calls to eliminate the noise, but in terms of analytics, analytics-configs seem to be the only request made in my case.

image
radoslaw-sz commented 3 days ago

thank you @jaylinsell . I copied dependencies which you put and tried locally on my side, but unfortunately I cannot reproduce it.. Let me think about it what we can do more - this error is really hard to catch.