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

CloudLink extension doesn't work after being packaged. #949

Open
WinPad1993 opened this issue Feb 23, 2025 · 5 comments
Open

CloudLink extension doesn't work after being packaged. #949

WinPad1993 opened this issue Feb 23, 2025 · 5 comments

Comments

@WinPad1993
Copy link

I use CloudLink extension to get api from url,just like this:

Image

But when I packaged it,it doesn't work like this:

Image

What can I do to fix it?

@GarboMuffin
Copy link
Member

You need to give us the project for us to even try to see what's going on

@WinPad1993
Copy link
Author

你需要给我们这个项目,让我们看看到底发生了什么

OK.

Image

Download this ".png" file and rename it to ".sb3" file.
When you see a gray transparent interface, you should draw up to enter the "desktop".

@WinPad1993
Copy link
Author

你需要给我们这个项目,让我们看看到底发生了什么

好的。

Image

下载此“.png”文件,并重命名为“.sb3”文件, 当你看到灰色透明界面时,就绘制好了,进入“桌面”。

Well,the weather api may not work because it's for places in China.I don't kown if this will make trouble to you.

@GarboMuffin
Copy link
Member

I am guessing you are using the desktop app and you are running your packaged project in some website (you haven't provided almost any details). There are two things going on then:

  • Your project is making requests to http:// URLs. Browsers tend to block these requests because they are insecure. You can fix this by changing them to https://.
  • The websites you are requesting don't necessarily have CORS enabled which prevents other websites from accessing it. Specifically the weather API seems to not have that always set up. The desktop app has an option to ignore this restriction but browsers don't offer that. If you control that server then you can fix this with a simple change on the server, otherwise read here: https://docs.turbowarp.org/cors

@WinPad1993
Copy link
Author

我猜你正在使用桌面应用程序,并且正在某个网站上运行打包的项目(你几乎没有提供任何详细信息)。然后发生了两件事:

  • 您的项目正在向 http:// URL 发出请求。浏览器往往会阻止这些请求,因为它们不安全。您可以通过将其更改为 https:// 来解决此问题。
  • 您请求的网站不一定启用了 CORS,这会阻止其他网站访问它。具体来说,天气 API 似乎并不总是设置该设置。桌面应用程序有一个忽略此限制的选项,但浏览器不提供该选项。如果您控制该服务器,那么您可以通过对服务器进行简单的更改来解决这个问题,否则请阅读此处:https://docs.turbowarp.org/cors

I'll try.Thanks.

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