Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The documentation page and medusa backend and frontend will crash #7738

Closed
1 of 2 tasks
Snorlax-Chan opened this issue Jun 16, 2024 · 7 comments · Fixed by #8010
Closed
1 of 2 tasks

The documentation page and medusa backend and frontend will crash #7738

Snorlax-Chan opened this issue Jun 16, 2024 · 7 comments · Fixed by #8010

Comments

@Snorlax-Chan
Copy link

Preliminary Checks

Issue Summary

lo siguiente es el error en consola: main.3b555fb1.js:2 DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
at lc (https://docs.medusajs.com/assets/js/main.3b555fb1.js:2:1466848)
at gc (https://docs.medusajs.com/assets/js/main.3b555fb1.js:2:1472000)
at yc (https://docs.medusajs.com/assets/js/main.3b555fb1.js:2:1469075)
at bc (https://docs.medusajs.com/assets/js/main.3b555fb1.js:2:1468757)
at yc (https://docs.medusajs.com/assets/js/main.3b555fb1.js:2:1468870)
at bc (https://docs.medusajs.com/assets/js/main.3b555fb1.js:2:1468757)
at yc (https://docs.medusajs.com/assets/js/main.3b555fb1.js:2:1468870)
at bc (https://docs.medusajs.com/assets/js/main.3b555fb1.js:2:1468757)
at yc (https://docs.medusajs.com/assets/js/main.3b555fb1.js:2:1468870)
at bc (https://docs.medusajs.com/assets/js/main.3b555fb1.js:2:1468757)
mo @ main.3b555fb1.js:2
VM235:168 Uncaught TypeError: Cannot read properties of undefined (reading 'gzip')
at dp.ph (eval at xhr.onreadystatechange (overview:430:9), :168:470)
at rm.flush (eval at xhr.onreadystatechange (overview:430:9), :70:138)
at rm.eval (eval at xhr.onreadystatechange (overview:430:9), :66:445)
at Wd (m=el_conf:524:469)
at _.k.dispatchEvent (m=el_conf:523:373)
at Xl.tick (eval at xhr.onreadystatechange (overview:430:9), :65:214)
at eval (eval at xhr.onreadystatechange (overview:430:9), :64:349)

How can this issue be resolved?

1.The same issue also appears on the dashboards created by Medusa and on Storefront pages. You just need to use Google Chrome or Microsoft Edge, and enable their built-in automatic webpage translation. After browsing for a while or clicking a few times (the frequency of occurrence is uncertain, sometimes it happens quickly, other times it might take ten minutes or more), the same webpage error appears: ‘Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.’

Are you interested in working on this issue?

  • I would like to fix this issue
@Snorlax-Chan
Copy link
Author

I've discovered a possible cause of the issue. Please review to see if it can help resolve the problem.Also, because the previous answer was closed, I opened a new one @shahednasser
If anyone stumbles upon this problem while a page is being translated in Google Chrome, it's likely it has something to do with this:

facebook/react#11538

@shahednasser
Copy link
Member

Hey @Snorlax-Chan , I'm trying to reproduce this issue in the documentation but I'm not able to. can you give me the exact steps you're following + which page it's occurring on? Would be good to get a screen recording too

@shahednasser
Copy link
Member

Just investigated this issue a bit and i can see the trace in development. Looks like the main problem is with React Tooltip as google tries to translate the tooltip the same time you it's being shown.

Will spend some time trying to see if this is something we can resolve. If not, then the fix would probably be to disable using Google Translation to avoid this issue, as it's not high priority.

@Snorlax-Chan
Copy link
Author

刚刚调查了一下这个问题,我可以看到开发中的踪迹。看起来主要问题出在React Tooltip上,因为谷歌试图在显示工具提示的同时翻译它。

我们会花一些时间尝试看看我们能否解决这个问题。如果不能,那么解决办法可能是禁用 Google 翻译来避免这个问题,因为它的优先级不高。

I'm glad you reproduced it. Is there a way to prevent it from crashing when errors occur? For store or blog pages, once the customer uses translation, the web page will crash. However, the popularity of Google Translate is too high. I noticed that other nextjs are frameworks. This problem does not seem to occur on websites

@shahednasser
Copy link
Member

Like I mentioned, the issue is due to the use of react tooltip, which we use a lot in the documentation. Not sure if there's an easy fix unfortunately.

@Snorlax-Chan
Copy link
Author

Like I mentioned, the issue is due to the use of react tooltip, which we use a lot in the documentation. Not sure if there's an easy fix unfortunately.

Thanks for the reply and looking up the issue, I will try to avoid using

@shahednasser
Copy link
Member

Hey guys, I've opened a PR with a workaround that doesn't translate tooltips but ensures the page doesn't crash. Once it's merged, you can start using google translate with the docs again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants