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

初始化出现 Error: Not Found #18

Closed
xiaohao890809 opened this issue May 12, 2017 · 43 comments
Closed

初始化出现 Error: Not Found #18

xiaohao890809 opened this issue May 12, 2017 · 43 comments

Comments

@xiaohao890809
Copy link

初始化出现 Error: Not Found,无法评论
另外,火狐浏览器无法显示评论框

@opengit
Copy link

opengit commented May 12, 2017

我也遇到这个问题了

@xiaohao890809
Copy link
Author

@opengit 你的repo咋填的呢?我怀疑我的填错了

@s2117402
Copy link

好像是就写repo地址就可以,比如comments

@ryancui92
Copy link

@s2117402 直接写 repo 地址并不可以

@s2117402
Copy link

@ryancui- 说错了,是repo的名字。改成这样后至少不是Error: Not Found了

@s2117402
Copy link

@ryancui- 然后我后来出的问题是按log in就转跳到个人主页的首页,我重新部署了下我的主页就解决了

@zo-ly
Copy link

zo-ly commented May 24, 2017

@s2117402 重新部署主页是什么意思,具体怎么操作

@tiexo
Copy link

tiexo commented Jun 2, 2017

我也遇到这个了,究竟咋解决啊

@imsun
Copy link
Owner

imsun commented Jun 2, 2017

很大可能是 repo 名字填错了。以这个项目为例,owner 应该填 imsun,repo 应该填 gitment

如果还是不对请贴配置代码。

@imsun imsun closed this as completed Jun 2, 2017
@opengit
Copy link

opengit commented Jun 3, 2017

@tiexo 看看 @imsun 的解决办法,就是这样解决的。

@qkmaosjtu
Copy link

qkmaosjtu commented Jun 5, 2017

@opengit 我的保证是reo的名字,但是还是出现了这样的错误,怎么可以冲洗初始化呢?

@opengit
Copy link

opengit commented Jun 7, 2017

@qkmaosjtu 我的是在每篇博文下面,就出现一个初始化按钮,点击一下就初始化了。以后每篇新的博文,都需要自己取初始化一下。

@ryancui92
Copy link

@qkmaosjtu@opengit 一样,有个初始化按钮。但两星期前部署的时候,我也遇到这个问题,当时的参数(repo)都没有填错,最近试了一次突然又好了。。

@ghost
Copy link

ghost commented Jul 21, 2017

我的已经按照教程搞了,GitHub的repo也是对的,为什么还会出问题,无法初始化

@opengit
Copy link

opengit commented Jul 21, 2017

@wuhang2003 repo 直接填写名字就行了

@shadowquark
Copy link

似乎 repo 不能是 private 的。一開始我設成了 private 的,也收到了相同的錯誤信息。

@zouliming
Copy link

zouliming commented Aug 18, 2017

请问博主,这个评论插件只能在Hexo上用,对吗?Wordpress不能用?

@mosdeo
Copy link

mosdeo commented Aug 23, 2017

repo 名稱改正確後可以 initialize,但是一按 initialize 就出現 Error: Validation Failed

@celesteting
Copy link

控制台会报这个错
mobx.js:1335 [mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: 'Reaction[Autorun@2] TypeError: Cannot read property 'firstChild' of null
at gitment.js:16
at reactionRunner (mobx.js:123)
at trackDerivedFunction (mobx.js:1000)
at Reaction.track (mobx.js:1312)
at Reaction.onInvalidate (mobx.js:120)
at Reaction.runReaction (mobx.js:1288)
at runReactionsHelper (mobx.js:1404)
at reactionScheduler (mobx.js:1386)
at runReactions (mobx.js:1390)
at Reaction.schedule (mobx.js:1276)

@eleztian
Copy link

eleztian commented Oct 3, 2017

@s2117402 老铁,我也这样了,怎么搞!

@anson2416
Copy link

anson2416 commented Oct 13, 2017

我遇到这个问题,有无人知道怎样解决?

Error: Comments Not Initialized

我的配置系:

gitment:
  enable: true
  githubID: anson2416
  repo: anson2416.github.io
  ClientID: 111
  ClientSecret: 111
  lazy: true

@stven0king
Copy link

@anson2416 Error: Comments Not Initialized出现这个之后点击login然后回到这个页面有一个Initialize的按钮,点击之后就可以评论了。

@opengit
Copy link

opengit commented Oct 26, 2017

@anson2416 repo: anson2416.github.io这里直接写repo: anson2416试试

@hhsyy
Copy link

hhsyy commented Dec 3, 2017

写成这样就好了hhsyy.github.io

@ronniesir
Copy link

我的还是不行

@rayeden
Copy link

rayeden commented Dec 27, 2017

咳,终于弄好了。我只想说,记得把这个仓库设置成public,否则当然是404了。
--------------- 割 ---------------------
折腾一下午拉,还是NOT FOUND,是不是和我配置了域名有关?
抓包抓出来是这个
Request URL:https://api.github.com/repos/rayeden/rayeden.github.io/issues?creator=rayeden&labels=%2F2017%2F12%2F27%2FgitmentTest%2F
Request Method:GET
Status Code:404 Not Found
Remote Address:127.0.0.1:8888
Referrer Policy:no-referrer-when-downgrade

@DouMiaoO-Oo
Copy link

我通过在浏览器输入 https://api.github.com/users/你的账户名 得到了id,但是还是error not found。后来改用了填入账户名就成功了。

@benjaminwhx
Copy link

gitment:
owner: benjaminwhx
repo: # 自己新建的仓库
client_id: # your client id
client_secret: # your client secret

repo这个参数很重要,你要在自己的github里面新建一个仓库,这个仓库是用来记录别人提出的issue,也就是回复内容的。例如imsun作者它要配置repo,就得输入gitment,因为这是它的仓库名。

owner这个不要相信上面说的填写id,而是你自己的用户名,https://github.com/owner能够打开你自己的仓库才对

@jdhao
Copy link

jdhao commented Feb 1, 2018

If you use NexT latest theme, a sample configuration that works for me is follows:

gitment:
  enable: enable
  mint: true # RECOMMEND, A mint on Gitment, to support count, language and proxy_gateway
  count: true # Show comments count in post meta area
  lazy: false # Comments lazy loading with a button
  cleanly: false # Hide 'Powered by ...' on footer, and more
  language: en
  github_user: jdhao
  github_repo: jdhao.github.io #the name of the repo used to host your blog
  client_id: xxxxxxx # your Client ID
  client_secret: xxxxxx # your Client Secret
  proxy_gateway: # Address of api proxy, See: https://github.com/aimingoo/intersect
  redirect_protocol: # Protocol of redirect_uri with force_redirect_protocol when mint enabled

Also, if this is your first time to comment some post. After login, you need to click the button Initialize Comments above the comment box.
image

Then you can comment successfully.

@yuanwenjian
Copy link

我的not found 找到原因,
查看生成的html的源码,发现owenr 与repo取值为空

function showGitment() {
    $("#gitment_title").attr("style", "display:none");
    $("#container").attr("style", "").addClass("gitment_container");
    var gitment = new Gitment({
      id: window.location.pathname,
      theme: myTheme,
      owner: '',
      repo: '',
      oauth: {
        client_id: '21bb0ade****',
        client_secret: '903e69fae75a**'
      }
    });
    gitment.render('container');
  }

解决办法:
在~blog/themes/next/layout/_partials/comments.swig 文件中手动添加owner与repo

function showGitment() {
    $("#gitment_title").attr("style", "display:none");
    $("#container").attr("style", "").addClass("gitment_container");
    var gitment = new Gitment({
      id: window.location.pathname,
      theme: myTheme,
      owner: "owner", //github用户
      repo: "repo",  //repo
      oauth: {
        client_id: '{{ theme.gitment.client_id }}',
        client_secret: '{{ theme.gitment.client_secret }}'
      }
    });
    gitment.render('container');

希望能帮到有同样问题的老铁

@Hoooxz
Copy link

Hoooxz commented Feb 4, 2018

repo填写的应该是新建的用于存储评论的仓库名,比如说我新建的仓库名为gitment-comments,填入gitment-comments即可。我是在控制台里看AJAX时发现对Request URL:https://api.github.com/repos/hoooxz/…… 请求时返回了404,才意识到这个问题的~

@llccing
Copy link

llccing commented Mar 25, 2018

我在本地调试时时有问题的,但是部署之后 hexo d ,GitHub验证一下就没有问题了。

@sunms1024
Copy link

我也遇到这个问题了

repo要新建...

@sunms1024
Copy link

终极答案 repo不是填你新建的oauth 是要新建一个repo用这个repo的issue去承载你的评论

@puddlejumper26
Copy link

我的一直出现问题:

gitment:
  enable: true
  mint: true # RECOMMEND, A mint on Gitment, to support count, language and proxy_gateway
  count: true # Show comments count in post meta area
  lazy: false # Comments lazy loading with a button
  cleanly: false # Hide 'Powered by ...' on footer, and more
  language: english # Force language, or auto switch by theme
  github_user: puddlejumper26
  github_repo: comments-gitment
  client_id: '3e625394d55d8b160bb4'
  client_secret: '7e22a4c661b262844e292b60124104ccb44e9641'

运行
hexo d
刷新页面
页面显示
Error: Comments Not Initialized
点击Login,然后跳出对话框
[object ProgressEvent]
点击确定之后Gitment的地方就一直显示在Logging in,不能操作

之前的办法都看了也试了,用不同的浏览器,注册了新的repo,重新注册oAuth,都不行,

求大神帮忙解决一下

@wnxy
Copy link

wnxy commented Jan 29, 2019

我的一直出现问题:

gitment:
  enable: true
  mint: true # RECOMMEND, A mint on Gitment, to support count, language and proxy_gateway
  count: true # Show comments count in post meta area
  lazy: false # Comments lazy loading with a button
  cleanly: false # Hide 'Powered by ...' on footer, and more
  language: english # Force language, or auto switch by theme
  github_user: puddlejumper26
  github_repo: comments-gitment
  client_id: '3e625394d55d8b160bb4'
  client_secret: '7e22a4c661b262844e292b60124104ccb44e9641'

运行
hexo d
刷新页面
页面显示
Error: Comments Not Initialized
点击Login,然后跳出对话框
[object ProgressEvent]
点击确定之后Gitment的地方就一直显示在Logging in,不能操作

之前的办法都看了也试了,用不同的浏览器,注册了新的repo,重新注册oAuth,都不行,

求大神帮忙解决一下
我的也是同样的问题,一直“正在登录...”,我想问一下大哥你的解决了没有

@puddlejumper26
Copy link

还是没有解决,都想换插件了

@xiaobinwu
Copy link

我也是

@Amorness
Copy link

  • -太惨了

@ActingCute
Copy link

坑 Error: Comments Not Initialized

@ghost
Copy link

ghost commented Apr 28, 2019

文章标题不要有空格,即可解决

标题包含中英文时,不能有空格。

@KevinYuKun
Copy link

gitub_user 记得填你github的用户名,github_repo才是填仓库名。
可以用https://api.github.com/repos/{owner}/{repo}这个来测试一下你的地址是否正确

@chufusheng
Copy link

11

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