usememos / memos

An open-source, lightweight note-taking solution. The pain-less way to create your meaningful notes. Your Notes, Your Way.
https://usememos.com
MIT License
34.17k stars 2.47k forks source link

Maximum call stack size exceeded on iOS safari #2359

Closed kakarukeys closed 10 months ago

kakarukeys commented 1 year ago

Describe the bug

After upgrading from 0.14.4 to 0.15.2 Opening memos in iphone sometimes shows this error There's no workaround. Access to notes totally blocked.

Unexpected Application Error!
Maximum call stack size exceeded.

marked@https://memos/assets/index-7f82f626.js:599:96318
marked@https://memos/assets/index-7f82f626.js:600:352
renderer$4@https://memos/assets/index-7f82f626.js:599:94161
marked@https://memos/assets/index-7f82f626.js:600:83
marked@https://memos/assets/index-7f82f626.js:599:96517
marked@https://memos/assets/index-7f82f626.js:600:94
marked@https://memos/assets/index-7f82f626.js:600:94
marked@https://memos/assets/index-7f82f626.js:600:94
marked@https://memos/assets/index-7f82f626.js:599:96517
marked@https://memos/assets/index-7f82f626.js:600:94
marked@https://memos/assets/index-7f82f626.js:600:94
marked@https://memos/assets/index-7f82f626.js:600:94
marked@https://memos/assets/index-7f82f626.js:600:94
marked@https://memos/assets/index-7f82f626.js:600:94
marked@https://memos/assets/index-7f82f626.js:600:94
marked@https://memos/assets/index-7f82f626.js:600:94
marked@https://memos/assets/index-7f82f626.js:599:96517
marked@https://memos/assets/index-7f82f626.js:600:94
marked@https://memos/assets/index-7f82f626.js:600:94
marked@https://memos/assets/index-7f82f626.js:600:94
marked@https://memos/assets/index-7f82f626.js:600:94
marked@https://memos/assets/index-7f82f626.js:600:94
marked@https://memos/assets/index-7f82f626.js:600:94
marked@https://memos/assets/index-7f82f626.js:599:96517

Steps to reproduce

  1. just opening the app in mobile safari browser

Screenshots or additional context

iPhone XR iOS 16.6.1

boojack commented 1 year ago

@kakarukeys I cannot reproduce on my phone. Could you try to use the demo site?

x2358473 commented 1 year ago

我的从0.15.2更新到0.16.0后ios的Safari 时常会出现以下报错 Unexpected Application Error! mporting a module script failed

Issues-translate-bot commented 1 year ago

Issue is not in English. It has been translated automatically.


My ios after updating from 0.15.2 to 0.16.0

kakarukeys commented 1 year ago

@kakarukeys I cannot reproduce on my phone. Could you try to use the demo site?

I couldn't reproduce with the demo site. it seems the error rate greatly reduced on my site as well after some tokens expired and I had to re-login on some devices. I have expired all tokens to monitor.

x2358473 commented 1 year ago

@kakarukeys I cannot reproduce on my phone. Could you try to use the demo site?

I couldn't reproduce with the demo site. it seems the error rate greatly reduced on my site as well after some tokens expired and I had to re-login on some devices. I have expired all tokens to monitor.

cn: 我打开 demo site 没有发出现。但是我尝试使用mac osx 13.5.1系统上的Safari浏览器发现了总是,是返回了429 Too Many Requests https://we-chat.oss-cn-shanghai.aliyuncs.com/xiaoju/memos-request-error.jpg 是否能看到我上传的截图。里面有众从接口被限流了

en: I opened the demo site and found no problem because the demo site has a function of waiting for loading. But I tried to use the Safari browser on the mac osx 13.5.1 system and found a problem. The reason for the "Unexpected Application Error! Importing a module script failed." error was that the API returned https status: 429 Too Many Requests

x2358473 commented 1 year ago

以下是console的报错信息: The following is the console error message:

[Error] Failed to load resource: the server responded with a status of 401 (Unauthorized) (me, line 0) [Error] Failed to load resource: the server responded with a status of 429 (Too Many Requests) (Explore-6297f359.js, line 0) [Error] TypeError: Importing a module script failed. Mi (index-8ff8cc80.js:77:179) (匿名函数) (index-8ff8cc80.js:77:734) ih (index-8ff8cc80.js:75:10796) lk (index-8ff8cc80.js:77:35145) jk (index-8ff8cc80.js:77:34694) ik (index-8ff8cc80.js:77:34181) Xk (index-8ff8cc80.js:77:44998) Qk (index-8ff8cc80.js:77:44314) Hk (index-8ff8cc80.js:77:38732) Hk vt (index-8ff8cc80.js:62:1732) Ot (index-8ff8cc80.js:62:2144) [Error] React Router caught the following error during render (2) TypeError: Importing a module script failed.{componentStack: "↵Lazy↵RenderedRoute@https://.../assets/index-8ff8cc80.js:269:3963"}Object componentDidCatch (index-8ff8cc80.js:288:5011) (匿名函数) (index-8ff8cc80.js:77:847) ih (index-8ff8cc80.js:75:10796) lk (index-8ff8cc80.js:77:35145) jk (index-8ff8cc80.js:77:34694) ik (index-8ff8cc80.js:77:34181) Xk (index-8ff8cc80.js:77:44998) Qk (index-8ff8cc80.js:77:44314) Hk (index-8ff8cc80.js:77:38732) Hk vt (index-8ff8cc80.js:62:1732) Ot (index-8ff8cc80.js:62:2144) [Error] Failed to load resource: the server responded with a status of 429 (Too Many Requests) (CommonDialog-a9f488cf.js, line 0) [Error] Failed to load resource: the server responded with a status of 429 (Too Many Requests) (Popper-59897116.js, line 0) [Error] Failed to load resource: the server responded with a status of 429 (Too Many Requests) (Button-ee59c692.js, line 0) [Error] Failed to load resource: the server responded with a status of 429 (Too Many Requests) (useLocalStorage-7ed32fdf.js, line 0) [Error] Failed to load resource: the server responded with a status of 429 (Too Many Requests) (index-85a48a1f.js, line 0) [Error] Failed to load resource: the server responded with a status of 429 (Too Many Requests) (Select-1bed1b00.js, line 0) [Error] Failed to load resource: the server responded with a status of 429 (Too Many Requests) (IconButton-3f75fba7.js, line 0) [Error] Failed to load resource: the server responded with a status of 429 (Too Many Requests) (Divider-db62de7c.js, line 0) [Error] Failed to load resource: the server responded with a status of 429 (Too Many Requests) (useLoading-ad0a21c9.js, line 0) [Error] Failed to load resource: the server responded with a status of 429 (Too Many Requests) (MobileHeader-920aeaeb.js, line 0)

x2358473 commented 1 year ago

我对比了Safari与chrome打开同样的首页,发现他们的请求数不一样, I compared Safari with Chrome to open the same homepage and found that their requests were different. chrome-requst: https://we-chat.oss-cn-shanghai.aliyuncs.com/xiaoju/chrome-request.jpg safari-request: https://we-chat.oss-cn-shanghai.aliyuncs.com/xiaoju/safari-request.jpg

kakarukeys commented 1 year ago

I can't seem to get the right conditions that could produce the bug. It appeared very infrequently now anyway. I should close the issue. However the issue was hijacked by @x2358473 to report something else. I will leave it to you to decide.

x2358473 commented 1 year ago

我似乎无法获得可能产生该错误的正确条件。无论如何,现在它很少出现了。我应该关闭这个问题。 然而这个问题被劫持了@x2358473报告其他事情。我将把它留给你来决定。

我的问题其实是safari中把资源请求当成api接口的请求,导致打开页面时并发太多api请求被限流了,这可能是safari的问题。 My problem is actually that Safari treats resource requests as API interface requests, resulting in too many concurrent API requests being restricted when opening a page。This may be a problem with Safari.

kakarukeys commented 1 year ago

@kakarukeys I cannot reproduce on my phone. Could you try to use the demo site?

I am now able to reproduce the bug on demo site, please check. @boojack clicking #spiritual tag will trigger the error.

boojack commented 10 months ago

Maybe fixed in the latest version. Please try it agian in demo site: https://demo.usememos.com