-
Notifications
You must be signed in to change notification settings - Fork 143
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
feat: make shorebird
easier to use by developers in China
#435
Comments
I suspect it's not as simple as setting an alternate URL. The mirror URLs pointed to in https://docs.flutter.dev/community/china physically host the actual bytes to the Flutter engine etc. You'll need to find a partner (who can register a https://en.wikipedia.org/wiki/ICP_license) who can host the app bits being pushed to point the CLI to. |
Hi guys, just noticed this issue when I was browsing new stuff. I can answer the questions above since I'm also a maintainer to flutter.cn .
Currently, it's available. If you can provide an exact artifact destination then we can test if the connection is stable enough (download.shorebird.dev returns
About how our mirror works: We host our service with a local services provider, mirroring requests with the same path of googleapis, marking artifacts that need to be cached by CDN, and resolving them into buckets. In order to make our mirror work with shorebird, we'll need another domain or subdomain for it, and create another service that is different from the Flutter one. So to summarize this, I don't think we'll need a new mirror service for now since everything is working as expected. Let me know if I missed something. |
Thanks Alex. That sounds like an excellent option. I don't think we're quite ready to set this up yet, but if you reach out via email eric@, happy to discuss further when we get there! |
another way is to support private deployment. |
We also just got a report that Google OAuth may not work in China (may not connect to oauth2.googleapis.com). So we likely need to support #335 too. Recommended alternatives included WeChat or QQ OAuth. |
When will this problem be solved? |
We don't have a specific date. We're quite busy with other customers at the moment and have not yet sat down to try and understand what work remains to be done for Shorebird to be usable within China. |
I hope the team can support Chinese developers as soon as possible. A large number of Chinese flutter developers hope to use this tool. |
Hoping for Shorebird support in China soon! |
1 similar comment
Hoping for Shorebird support in China soon! |
Hoping for Shorebird support in China soon! |
If someone in Chinese mainland can't login with 'shorebird login', maybe you need set proxy to your terminal, just input follow command(if you use clash in windows os): 筒子们如果发现开了全局代理之后,用shorebird login命令也登陆不了的话,试下给终端把代理设置上再去登陆! |
set http_proxy=http://127.0.0.1:7890/ |
Hello, Chinese developers hope that Shorebird can support usage in China. |
I think you can solve this problem by mirroring. The most common use in China is TUNA, Tsinghua's own site mirroring a wide range of open source software, These include FLUTTER_STORAGE_BASE_URL and PUB_HOSTED_URL, which can be reached at support@tuna.tsinghua.edu.cn export FLUTTER_STORAGE_BASE_URL="https://mirrors.tuna.tsinghua.edu.cn/flutter"
export PUB_HOSTED_URL="https://mirrors.tuna.tsinghua.edu.cn/dart-pub" |
Hoping for Shorebird support in China soon! Thank you very much! |
We have quite a few customers from China. So this appears to work "well enough" for the moment. I think when we moved our distribution to a CDN that will help customers in china (since their users will get updates more reliably). |
A simple solution: just adding a optional http-proxy-string parameter to ShorebirdCodePush's constructor and let developers from China to use shorebird_code_push package and manually do code-pushing! |
Update: We've updated our infrastructure to use CloudFlare CDN, which as far as we can tell is more reliably reachable across China: We still make direct connections to Google Cloud as part of using |
shorebird
easier to use by developers in China
Update Sept 11, 2024: We know of at least some developers using Shorebird successfully from China today.
Users should be able to download published patches through our CDN (without needing to do anything special):
https://shorebird.dev/blog/improved-patch-delivery/
However the updater client also talks to
api.shorebird.dev
which is hosted in Google Cloud and thus may not be accessible.Developers may also still need to find a way to reach Google Cloud for using
shorebird
tooling such as using a VPN.=====
The directions for using Shorebird in china include setting FLUTTER_STORAGE_BASE_URL:
https://docs.flutter.dev/community/china
This environment variable is ignored by
shorebird
, sinceshorebird
itself usesFLUTTER_STORAGE_BASE_URL
to passdownload.shorebird.dev
toflutter
.The larger issue for developers in China is that Shorebird currently uses Google Cloud as our infrastructure provider and Google Cloud is not reliably reachable across China.
We could implement a proxy within china for
download.shorebird.dev
and either then make it possible to use FLUTTER_STORAGE_BASE_URL to point to such, or some other environment variable.However we would still need to make access to
api.shorebird.dev
more reliable for Shorebird to work for Developers without them needing to modify their network.Regardless, Shorebird works seems to work for some users in china (the api.shorebird.dev request sometimes fails, but if it succeeds patch installs otherwise seem to work fine in China). Developers who cannot reach api.shorebird.dev will still have trouble actually uploading the patches.
The text was updated successfully, but these errors were encountered: