meteorlxy / vssue

:mailbox: A Vue-powered Issue-based Comment Plugin
https://vssue.js.org
MIT License
778 stars 107 forks source link

[Question] 成功自动创建 Issue,但是无法获取评论,显示 Network Error #102

Closed Pcrab closed 4 years ago

Pcrab commented 4 years ago

Environment

What's your question?

按照文档配置完成后,可以登录,可以成功自动创建 Issue,但是登陆后依然显示登陆后查看评论,然后有一个弹窗显示 Network Error。

我的配置:

new Vue({
  el: '#vssue',

  render: h => h('Vssue', {
    props: {
      // 在这里设置当前页面对应的 Issue 标题
      title: 'Vssue Comment',

      // 在这里设置你使用的平台的 OAuth App 配置
      options: {
        owner: 'Pcrab',
        repo: 'Vssue',
        clientId: 'b47203220aacd3d91ea4',
        clientSecret: 'bbd9ae51d60676f1dbdc389075dbbcb96bd14d86',
        autoCreateIssue: true,
      },
    }
  })
})
meteorlxy commented 4 years ago

F12 看一下是哪个请求报错了呀

Pcrab commented 4 years ago

Console 是空的没报错

meteorlxy commented 4 years ago

看 Network 呀……

Pcrab commented 4 years ago

https://api.github.com/repos/Pcrab/Vssue/issues/2/comments?page=1&per_page=10&timestamp=1594789283837 这个

meteorlxy commented 4 years ago

老哥别挤牙膏啊……你发个链接我能看出来啥

Pcrab commented 4 years ago

image

image

meteorlxy commented 4 years ago

显然这个 Accept header 有问题。换个浏览器试试吧

Pcrab commented 4 years ago

刚发现 console 里多了几个报错,好像是跨域的问题 image

fizzday commented 4 years ago

@Pcrab 老哥, 跨域问题解决了么

Access to XMLHttpRequest at 'https://api.github.com/repos/imgbed/imgbed.github.io/issues/1/comments?page=1&per_page=10&timestamp=1595827138211' from origin 'https://imgsxx.github.io' has been blocked by CORS policy: Request header field accept is not allowed by Access-Control-Allow-Headers in preflight response.

zhaoyibo commented 4 years ago

遇到了同样的问题,试了 Chrome 和 Safari 都是同样的报错,看起来像是跨域问题

QQ20200727-203920@2x QQ20200727-203940@2x
SilhDing commented 4 years ago

Same problem here.