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 · 32 comments

Comments

Projects
None yet
@xiaohao890809

xiaohao890809 commented May 12, 2017

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

@opengit

This comment has been minimized.

opengit commented May 12, 2017

我也遇到这个问题了

@xiaohao890809

This comment has been minimized.

xiaohao890809 commented May 12, 2017

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

@s2117402

This comment has been minimized.

s2117402 commented May 23, 2017

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

@ryancui-

This comment has been minimized.

ryancui- commented May 23, 2017

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

@s2117402

This comment has been minimized.

s2117402 commented May 23, 2017

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

@s2117402

This comment has been minimized.

s2117402 commented May 23, 2017

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

@wa-ri

This comment has been minimized.

wa-ri commented May 24, 2017

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

@tiexo

This comment has been minimized.

tiexo commented Jun 2, 2017

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

@imsun

This comment has been minimized.

Owner

imsun commented Jun 2, 2017

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

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

@imsun imsun closed this Jun 2, 2017

@opengit

This comment has been minimized.

opengit commented Jun 3, 2017

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

@qkmaosjtu

This comment has been minimized.

qkmaosjtu commented Jun 5, 2017

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

@opengit

This comment has been minimized.

opengit commented Jun 7, 2017

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

@ryancui-

This comment has been minimized.

ryancui- commented Jun 8, 2017

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

@wuhang2003

This comment has been minimized.

wuhang2003 commented Jul 21, 2017

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

@opengit

This comment has been minimized.

opengit commented Jul 21, 2017

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

@ShadowQuark

This comment has been minimized.

ShadowQuark commented Aug 10, 2017

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

@zouliming

This comment has been minimized.

zouliming commented Aug 18, 2017

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

@mosdeo

This comment has been minimized.

mosdeo commented Aug 23, 2017

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

@celesteting

This comment has been minimized.

celesteting commented Aug 29, 2017

控制台会报这个错
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

This comment has been minimized.

eleztian commented Oct 3, 2017

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

@anson2416

This comment has been minimized.

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

This comment has been minimized.

stven0king commented Oct 26, 2017

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

@opengit

This comment has been minimized.

opengit commented Oct 26, 2017

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

@hhsyy

This comment has been minimized.

hhsyy commented Dec 3, 2017

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

@ronniesir

This comment has been minimized.

ronniesir commented Dec 19, 2017

我的还是不行

@rayeden

This comment has been minimized.

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

This comment has been minimized.

DouMiaoO-Oo commented Jan 28, 2018

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

@benjaminwhx

This comment has been minimized.

benjaminwhx commented Jan 28, 2018

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

This comment has been minimized.

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

This comment has been minimized.

yuanwenjian commented Feb 2, 2018

我的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

This comment has been minimized.

Hoooxz commented Feb 4, 2018

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

@llccing

This comment has been minimized.

llccing commented Mar 25, 2018

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

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