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

Uncaught (in promise) TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation #253

Open
SkylarShuang opened this issue Jan 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@SkylarShuang
Copy link

the code that reproduces this issue or a replay of the bug

const response = await this.config.fetch(url, {
headers: { authorization: this.config.SalaiToken },
});

Describe the bug

Describe the bug
new Midjourney 遇到报错

具体报错在 const response = await this.config.fetch(url, {
headers: { authorization: this.config.SalaiToken },
});

查阅资料发现应该是authorization里面有特殊字符导致fetch失败,有大神指导怎么解决吗

error log

const response = await this.config.fetch(url, {
headers: { authorization: this.config.SalaiToken },
});

@SkylarShuang SkylarShuang added the bug Something isn't working label Jan 22, 2024
@SkylarShuang
Copy link
Author

解决了,自定义插件方法即可 fetch: window.fetch.bind(window)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant