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

应用卸载后应用内异步设值 window.xxx.yyy 时抛错 #2955

Open
mraiguo opened this issue May 9, 2024 · 2 comments
Open

应用卸载后应用内异步设值 window.xxx.yyy 时抛错 #2955

mraiguo opened this issue May 9, 2024 · 2 comments

Comments

@mraiguo
Copy link

mraiguo commented May 9, 2024

What happens?

调用 app.unMount() 之后,如果被 unMount 的应用有设置 window.xxx.yyy 的话就会报错

Mini Showcase Repository(REQUIRED)

image

image

How To Reproduce

直接在官网的demo上增加如下代码,运行 examples:start-multiple后,点击 mount 再点击 unMount 后 等 5s 就会出现

Context

  • qiankun Version: 最新版
  • Platform Version: macOS 13.3.1
  • Browser Version: chrome 124
@daiwanxing
Copy link

daiwanxing commented Jun 26, 2024

你在沙箱 inactive 的阶段是不是对 fake-window 进行了赋值操作

image

例如

export async function unmount(props) {
  window.bbb = 123;
}

@mraiguo
Copy link
Author

mraiguo commented Jun 26, 2024

你在沙箱 inactive 的阶段是不是对 fake-window 进行了赋值操作

image

例如

export async function unmount(props) {
  window.bbb = 123;
}

是第三方库有做这个(针对我们来说,是阿里云的 sdk)。在A应用时阿里云 sdk 还未完全执行完成后被切换到B应用,此时进入沙箱 inactive 阶段, 阿里云 sdk 此时在执行对 window 的设置值的操作,就报错了

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

No branches or pull requests

2 participants