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

[object ProgressEvent] #170

Open
haig233 opened this Issue Sep 16, 2018 · 37 comments

Comments

Projects
None yet
@haig233

haig233 commented Sep 16, 2018

现在全网的gitment登录都报[object ProgressEvent] 错误
希望作者能修复

@w568w

This comment has been minimized.

w568w commented Sep 16, 2018

这似乎是个间断出现的错误,我自己的网页每次登录都有1/3的几率报这个错误...

P.S.:作者好像已经弃坑了

@SeasideLee

This comment has been minimized.

SeasideLee commented Sep 17, 2018

看起来作者提供给使用者的加 CORS header 的服务已经停了,如果想继续使用我们就得自己搭一个这样的服务,不过作者已经把这个开源了,很简单的 nodejs 代码,项目地址

@haig233

This comment has been minimized.

haig233 commented Sep 17, 2018

@SeasideLee 这个怎么弄的啊
方便发下教程吗?

@shlyren

This comment has been minimized.

shlyren commented Sep 17, 2018

@haig233

This comment has been minimized.

haig233 commented Sep 17, 2018

@shlyren 搭建自己的服务器让他跑吗?

@haig233

This comment has been minimized.

haig233 commented Sep 17, 2018

关键我这个主题把gitment集成在里面,关键的配置文件和代码在哪我都还要一个个去找

@shlyren

This comment has been minimized.

shlyren commented Sep 17, 2018

@haig233 全局搜https://gh-oauth.imsun.net/ 应该能找到gitment的js文件

@haig233

This comment has been minimized.

haig233 commented Sep 17, 2018

@shlyren 换成你的服务器?

@shlyren

This comment has been minimized.

shlyren commented Sep 17, 2018

@haig233 你可以自己搭建, 我是搭建自己用的, 以后很可能换地址什么的

@haig233

This comment has been minimized.

haig233 commented Sep 17, 2018

@shlyren 方便写个搭建教程吗?

@haig233

This comment has been minimized.

haig233 commented Sep 17, 2018

我是萌新站长,不懂那么多

@shlyren

This comment has been minimized.

shlyren commented Sep 17, 2018

@haig233 服务器源代码在这https://github.com/imsun/gh-oauth-server ,由于是nodejs写的所以需要安装nodejs环境 如何安装自己Google; 然后git clone 该项目并进入目录, 执行npm install 安装依赖, 依赖安装成功后执行npm start, 如果输出start on port 300表示开启成功,;为了支持ssl 可以安装nginx代理, 这个可以自己百度, 有很多教程的

@marvincreat

This comment has been minimized.

marvincreat commented Sep 18, 2018

试了下@shlyren @SeasideLee 的方法,可行,就是http好像还是会报错,https就可以了

@shlyren

This comment has been minimized.

shlyren commented Sep 18, 2018

估计是证书到期导致

@fengzean

This comment has been minimized.

fengzean commented Sep 18, 2018

这个证书签发时间有点短吧

@shlyren

This comment has been minimized.

shlyren commented Sep 19, 2018

@fengzean 作者这个证书是免费的 只有90天, 不过可以通过脚本自动续签, 作者应该没有自动续签

@MegaShow

This comment has been minimized.

MegaShow commented Sep 19, 2018

对不起,给各位大佬添麻烦了。
本人在别人的issue里面发了这个issue的链接,然后发现居然自动创建了一个引用。(真不知道

(搜索的结果都是不可删除,怕是真的删除不了了
请大家忽视这个引用吧,给大家添麻烦了~

@jjeejj

This comment has been minimized.

jjeejj commented Sep 19, 2018

由于引入的 gitment.js 中有这样的一段代码:

     _utils.http.post('https://gh-oauth.imsun.net', {
        code: code,
        client_id: client_id,
        client_secret: client_secret
      }, '').then(function (data) {
        _this.accessToken = data.access_token;
        _this.update();
      }).catch(function (e) {
        _this.state.user.isLoggingIn = false;
        alert(e);
      });

请求了一个服务接口,由于这个服务接口是作者自己搭建的,已经停止了。
这里可以直接改为请求 github 认证的接口
_utils.http.post('https://github.com/login/oauth/access_token', {...}

就可以了,不用经过作者的服务

@shlyren

This comment has been minimized.

shlyren commented Sep 20, 2018

@jjeejj 直接用GitHub认证的接口https://github.com/login/oauth/access_token 登陆一直转菊花

@jjeejj

This comment has been minimized.

jjeejj commented Sep 20, 2018

@shlyren 嗯 对的, 会存在跨域的问题,还是得有个后台服务,转发这个跨域的请求

@RogerDTZ

This comment has been minimized.

RogerDTZ commented Sep 21, 2018

同样出现这种情况
但不是永远无效
我等了一会之后又可以使用了
然而换一个浏览器登录又出现了这个问题
=_=

@xiaotiandi

This comment has been minimized.

xiaotiandi commented Sep 22, 2018

@jjeejj

This comment has been minimized.

jjeejj commented Sep 23, 2018

我自己搭建了 一个通用的跨域服务,可以解决这个问题。 具体可以看 https://www.wenjunjiang.win/2017/07/02/gitment%E8%AF%84%E8%AE%BA%E6%A8%A1%E5%9D%97%E6%8E%A5%E5%85%A5hexo/

@iHTCboy iHTCboy referenced this issue Oct 7, 2018

Open

Gitment #778

@iHTCboy

This comment has been minimized.

iHTCboy commented Oct 7, 2018

@shlyren 感谢!我现在使用你的 https://auth.baixiaotu.cc 来授权啊,现在正常使用啊~

@noobfish

This comment has been minimized.

noobfish commented Oct 24, 2018

oh no

@SmalBox

This comment has been minimized.

SmalBox commented Oct 25, 2018

@shlyren 感谢给出解决办法。根据你的提示,我自己搭了一个服务器,一切运行正常.

有需要的小伙伴,可以来用 https://bak.smalbox.club

我写了一个详细的搭建过程,想自己搭建的可以来做个参考。帖子在这里

@fuhailin

This comment has been minimized.

fuhailin commented Nov 8, 2018

如果使用Hexo nexT主题中集成的gitment,该如何修复这个问题呢?

@shlyren

This comment has been minimized.

shlyren commented Nov 9, 2018

@fuhailin next 的gitment插件在hexo-theme-next/layout/_third-party/comments/gitment.swig,
直接把该文件中的 gitment js引用地址(https://imsun.github.io/gitment/dist/gitment.browser.js)改为修改后的js地址就好了

@removeif

This comment has been minimized.

removeif commented Nov 12, 2018

@fuhailin next 的gitment插件在hexo-theme-next/layout/_third-party/comments/gitment.swig,
直接把该文件中的 gitment js引用地址(https://imsun.github.io/gitment/dist/gitment.browser.js)改为修改后的js地址就好了

你私服地址换了记得更新一下哦,暂时用你的啦

@Evil-crow

This comment has been minimized.

Evil-crow commented Nov 13, 2018

@shlyren 你好, 我按照你上面的简单步骤搭建服务了, 可以看到服务监听在端口3000上, 但是在log in时仍然是这个错误, 请问有什么解决办法吗? 地址https://github.com/Evil-crow/Evil-crow.github.io 谢谢

@shlyren

This comment has been minimized.

shlyren commented Nov 13, 2018

@Evil-crow https://evil-crow.github.io/2017/09/22/Guide/Linux/how_to_install_linux/ 可以的啊,

@Evil-crow

This comment has been minimized.

Evil-crow commented Nov 13, 2018

@isecret

This comment has been minimized.

isecret commented Nov 20, 2018

目前撸了一个 PHP 的实现:https://gh-oauth.openapi.link,如果需要自己搭建的话可以参考:isecret/gh-oauth-server

@wpstan

This comment has been minimized.

wpstan commented Nov 24, 2018

由于引入的 gitment.js 中有这样的一段代码:

     _utils.http.post('https://gh-oauth.imsun.net', {
        code: code,
        client_id: client_id,
        client_secret: client_secret
      }, '').then(function (data) {
        _this.accessToken = data.access_token;
        _this.update();
      }).catch(function (e) {
        _this.state.user.isLoggingIn = false;
        alert(e);
      });

请求了一个服务接口,由于这个服务接口是作者自己搭建的,已经停止了。
这里可以直接改为请求 github 认证的接口
_utils.http.post('https://github.com/login/oauth/access_token', {...}

就可以了,不用经过作者的服务

我改成这个,可以了,没问题!感谢!www.tanrd.com

@flyrk

This comment has been minimized.

flyrk commented Dec 5, 2018

@shlyren 用了你搭的服务器没问题了,感谢!可以继续用吗?

@shlyren

This comment has been minimized.

shlyren commented Dec 6, 2018

@shlyren

This comment has been minimized.

shlyren commented Dec 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment