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

Could not connect to puglin repository in Windows version #5161

Closed
LeoMontealegre opened this issue Jul 6, 2021 · 23 comments
Closed

Could not connect to puglin repository in Windows version #5161

LeoMontealegre opened this issue Jul 6, 2021 · 23 comments
Labels
bug It's a bug desktop All desktop platforms high High priority issues

Comments

@LeoMontealegre
Copy link

Environment

Joplin version: 2.1.8
Platform: Windows
OS specifics: Windows 10 Entreprise (v 20H2)

Steps to reproduce

  1. Clic on Tools tab.
  2. Clic on Options.
  3. Clic on Plugings.
  4. I have the message even if I haven't searched for a pluglin.

Describe what you expected to happen

I expect to have the chance to search for a piglin and then be able to install.

Logfile

Snag_6b3bb1c
LogFileSectionWhenErrorFlags.txt

@LeoMontealegre LeoMontealegre added the bug It's a bug label Jul 6, 2021
@LeoMontealegre
Copy link
Author

I tryed to open Joplin as ADMIN, i got the same issue !

@laurent22
Copy link
Owner

Something's blocking the request.

@LeoMontealegre
Copy link
Author

LeoMontealegre commented Jul 7, 2021 via email

@JackGruber
Copy link
Contributor

You can check why you cannot access the following page

https://raw.githubusercontent.com/joplin/plugins/master/manifests.json

@LeoMontealegre
Copy link
Author

I can access the page using the same PC where my Joplin is running
Snag_af05735

@skymagician
Copy link

The same problem.

@MGshizi
Copy link

MGshizi commented Aug 10, 2021

I have met the same problem, too.

@laurent22
Copy link
Owner

If you run curl https://raw.githubusercontent.com/joplin/plugins/master/manifests.json from the terminal, does it work?

I assume we need to add a bunch of headers to trick the GFW but it's hard to tell which ones without being behind it.

@skymagician
Copy link

If you run curl https://raw.githubusercontent.com/joplin/plugins/master/manifests.json from the terminal, does it work?

I assume we need to add a bunch of headers to trick the GFW but it's hard to tell which ones without being behind it.

Curl works from terminal.

@laurent22 laurent22 reopened this Aug 13, 2021
@laurent22
Copy link
Owner

Now that we have the download link in the repo readme we can set least link to that when the manifest fetch fails

@laurent22 laurent22 added desktop All desktop platforms high High priority issues labels Aug 13, 2021
@amazinghaha
Copy link

amazinghaha commented Aug 15, 2021

when this issue happened,the PC's hosts need to add ' 199.232.96.133 raw.githubusercontent.com '
you can ping url' raw.githubusercontent.com' in shell, it shows ip = 0.0.0.0

image

@laurent22
Copy link
Owner

I can't fix this issue unfortunately because I can't replicate it.

Ideally if someone in China maybe could try various configurations, for example by adding browser http headers to the requests, that might help find out the issue. In the meantime I've added a link to the browse the plugins online when such an error occurs.

@skymagician
Copy link

skymagician commented Sep 12, 2021 via email

@JaimeZeng
Copy link

met the same problem.

Joplin 2.3.5 (prod, linux)

@JaimeZeng
Copy link

JaimeZeng commented Sep 17, 2021

I found a solution that works for me.

Specify the proxy in joplin configuration file /usr/share/applications/joplin.desktop. e.g.

# Exec=/usr/bin/joplin-desktop
Exec=env http_proxy=http://127.0.0.1:7890 https_proxy=http://127.0.0.1:7890 /usr/bin/joplin-desktop

Or edit hosts file with this repo. Use this method, the download speed is very slow.

185.199.108.133 raw.githubusercontent.com

@JaimeZeng
Copy link

JaimeZeng commented Sep 17, 2021

I can't fix this issue unfortunately because I can't replicate it.

Ideally if someone in China maybe could try various configurations, for example by adding browser http headers to the requests, that might help find out the issue. In the meantime I've added a link to the browse the plugins online when such an error occurs.

Due to github.com is not stable for some contries, e.g. China. We could not connect to github repository. So we always change it to mirror site (hub.fastgit.org, ghproxy.com, raw.fastgit.org) instead of direct site (github.com, raw.githubusercontent.com).

e.g. The following page

https://raw.githubusercontent.com/joplin/plugins/master/manifests.json

Mirror site page

https://raw.fastgit.org/joplin/plugins/master/manifests.json
https://cdn.jsdelivr.net/gh/joplin/plugins@master/manifests.json
https://cdn.staticaly.com/gh/joplin/plugins/master/manifests.json
https://ghproxy.com/https://raw.githubusercontent.com/joplin/plugins/master/manifests.json

Its a solution that works for China users. Chinese can use a mirror site, others use direct site to access the manifest page.

@laurent22
Copy link
Owner

That's brilliant I didn't know about these mirrors in China, thanks for the info @JaimeZeng. So I think what we can do is first try the regular GitHub request and, if it fails, try one of the mirrors.

How about the release page, is it generally working in China? Because that's from that we fetch new version when updating.

@laurent22 laurent22 reopened this Sep 17, 2021
@JaimeZeng
Copy link

That's brilliant I didn't know about these mirrors in China, thanks for the info @JaimeZeng. So I think what we can do is first try the regular GitHub request and, if it fails, try one of the mirrors.

How about the release page, is it generally working in China? Because that's from that we fetch new version when updating.

The github-release page did not work in China.

More generally, none of these sources are accessible without proxy client from China, including the following sites.

github.githubassets.com
central.github.com
desktop.githubusercontent.com
assets-cdn.github.com
camo.githubusercontent.com
github.map.fastly.net
github.global.ssl.fastly.net
gist.github.com
github.io
github.com
api.github.com
raw.githubusercontent.com
user-images.githubusercontent.com
favicons.githubusercontent.com
avatars5.githubusercontent.com
avatars4.githubusercontent.com
avatars3.githubusercontent.com
avatars2.githubusercontent.com
avatars1.githubusercontent.com
avatars0.githubusercontent.com
avatars.githubusercontent.com
codeload.github.com
github-cloud.s3.amazonaws.com
github.aaakk.us.kg.s3.amazonaws.com
github-production-release-asset-2e65be.s3.amazonaws.com
github-production-user-asset-6210df.s3.amazonaws.com
github-production-repository-file-5c1aeb.s3.amazonaws.com
githubstatus.com
github.community
media.githubusercontent.com

@JaimeZeng
Copy link

JaimeZeng commented Sep 17, 2021

More github mirrors can be found here.

https://github.com/XIU2/UserScript/blob/master/GithubEnhanced-High-Speed-Download.user.js#L45-L69

@laurent22
Copy link
Owner

Hi everyone, the latest release includes a fix for the Plugin repository access in China:

https://github.com/laurent22/joplin/releases/tag/v2.4.8

Basically if it cannot connects to GitHub it uses one of the mirrors suggested by @JaimeZeng. Please give it a try if you can and let me know if it's any better.

A few notes:

  • When it's using a mirror, it should display so below the search bar with a message "Content provided by xxxx"
  • Also when using a mirror, no plugin is marked as recommended. This is because we don't control the repository so cannot know if the plugins are the same or have been altered (they probably haven't but we can't be 100% sure).

@rxliuli
Copy link
Contributor

rxliuli commented Sep 23, 2021

For users with proxies, I recommend Proxifier, which can proxy network requests from all applications on the computer, even if the application itself does not support proxies

image

@imaxwen
Copy link

imaxwen commented Feb 18, 2022

version 2.6.10 still has this issue, and some of the mirrors does not work any more.
Maybe the solution of this issue is to access the https://raw.githubusercontent.com/joplin/plugins/master/manifests.json behind a system proxy. HTTP_PROXY or HTTPS_PROXY of system env

@leenzhu
Copy link

leenzhu commented Oct 8, 2023

Joplin 2.13.2 in Windows still has problem to connect plugin repository in China.

	const mirrorUrls = [
		defaultContentUrl, /* https://raw.githubusercontent.com/joplin/plugins/master */
		'https://cdn.staticaly.com/gh/joplin/plugins/master',
		'https://ghproxy.com/https://raw.githubusercontent.com/joplin/plugins/master',
		'https://cdn.jsdelivr.net/gh/joplin/plugins@master',
		'https://raw.fastgit.org/joplin/plugins/master',
	];

Since Joplin first tries to connect the defaultContentUrl(https://raw.githubusercontent.com/joplin/plugins/master/.gitignore), which hangs for a long time in China at most time.

And then sometimes the GFW of China allows Joplin to access
https://raw.githubusercontent.com/joplin/plugins/master/.gitignore, but it will block https://raw.githubusercontent.com/joplin/plugins/master/manifests.json, event GFW allows Joplin to access manifests.json, it seems always blocking the plugin downloads.

I mean that it still doesn't work as expect by taking the defaultContentUrl as the first mirror in China.

I'm expecting that Joplin could provide a mirror setting and let user adjust the priority of the mirror urls. Since the second builtin mirror https://cdn.staticaly.com/gh/joplin/plugins/master has been broken, it would be better if user could cusomize the mirrors.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug desktop All desktop platforms high High priority issues
Projects
None yet
Development

No branches or pull requests

9 participants