maple3142 / GDIndex

A Google Drive Index built with Vue Running on CloudFlare Workers
https://gdindex-demo.maple3142.workers.dev/
MIT License
1.85k stars 1.13k forks source link

无法下载,500错误 #75

Closed joshatt closed 4 years ago

joshatt commented 4 years ago

以前用goindex的, 没问题. 这个gdindex, 借助builder部署成功了, 但文件无法下载, 浏览器直接下载的话: 服务器出现问题. IDM下载的话, 500错误. 我一共部署了两次, 都如此. 第一次authentification是起了个名字. 第2次则是填写的googledrive的账号密码, 也就是gmail邮箱

maple3142 commented 4 years ago

把 authentication 有錯誤嗎

joshatt commented 4 years ago

把 authentication 有錯誤嗎

什么意思? 下载过程中填写账号密码都没有报错

maple3142 commented 4 years ago

就你不要設定帳號密碼

joshatt commented 4 years ago

就你不要設定帳號密碼

这不是想尝尝上传吗 ^_^

maple3142 commented 4 years ago

你現在是要測試能不能下載...

joshatt commented 4 years ago

ok

joshatt commented 4 years ago

你現在是要測試能不能下載...

又部署了两次: 带上传, 不带认证: 上传成功. 下载错误. 不带上传, 不带认证: 下载错误.

maple3142 commented 4 years ago

下載錯誤我就不曉得了,別用IDM下載看看

joshatt commented 4 years ago

下載錯誤我就不曉得了,別用IDM下載看看

直接下载和IDM都试的, 一样

maple3142 commented 4 years ago

那我就不曉得了,你能正常下載 demo 的檔案嗎

joshatt commented 4 years ago

那我就不曉得了,你能正常下載 demo 的檔案嗎

可以的

maple3142 commented 4 years ago

新註冊一個Google帳號再試試看

MarsHou commented 4 years ago

你好!问题解决了吗?我今天部署了GDIndex ,也是无法下载但是能正常上传。用GoIndex 就能下载 ,我把GDIndex生成的脚本 部署到先有的GoIndex的worker里面去 也还是不能下载。我也设置了账号密码

joshatt commented 4 years ago

新註冊一個Google帳號再試試看

新注册好像很难, 我换了个google账号, 带上传, 不带认证: 出现同样的下载错误.

MarsHou commented 4 years ago

新註冊一個Google帳號再試試看

新注册好像很难, 我换了个google账号, 带上传, 不带认证: 出现同样的下载错误.

我感觉是不是GDIndex脚本的问题,我后来又用GoIndex 新建了几个 都能下载的

MarsHou commented 4 years ago

新註冊一個Google帳號再試試看

新注册好像很难, 我换了个google账号, 带上传, 不带认证: 出现同样的下载错误.

我感觉是不是GDIndex脚本的问题,我后来又用GoIndex 新建了几个 都能下载的

不小心开了代理 刚刚还以为好了

GaryLz commented 4 years ago

我也测试过,有一个盘利用公共API部署出现问题。不过,通过排除法-替换个人API,也出现这样的问题。总结起来,并不是API的锅。 解决方案: 利用builder重新生成一份代码,或者, 利用部署好的代码,修改下默认的root_dir(如果同账户下的话)就能解决问题。

MarsHou commented 4 years ago

我也测试过,有一个盘利用公共API部署出现问题。不过,通过排除法-替换个人API,也出现这样的问题。总结起来,并不是API的锅。 解决方案: 利用builder重新生成一份代码,或者, 利用部署好的代码,修改下默认的root_dir(如果同账户下的话)就能解决问题。

你的分析应该是对的。我用模版填好refresh_token 。更新到worker脚本就没问题了。 模版地址:https://raw.githubusercontent.com/maple3142/GDIndex/master/worker/dist/worker.js

joshatt commented 4 years ago

我也测试过,有一个盘利用公共API部署出现问题。不过,通过排除法-替换个人API,也出现这样的问题。总结起来,并不是API的锅。 解决方案: 利用builder重新生成一份代码,或者, 利用部署好的代码,修改下默认的root_dir(如果同账户下的话)就能解决问题。

你的分析应该是对的。我用模版填好refresh_token 。更新到worker脚本就没问题了。 模版地址:https://raw.githubusercontent.com/maple3142/GDIndex/master/worker/dist/worker.js

没看懂哈. 我试了用空白refresh_token部署, 结果网盘的所有内容显示不出来. 是要填写自己的refresh_token吗, 但是是怎么得到的?

利用builder重新生成一份代码

没看懂哈, 我尝试的每一次部署都会重新生成一份, 因为Authorization Code是一次性的, 不重新生成也不行.

修改下默认的root_dir(如果同账户下的话)

我试着改成了我的网盘中某一个文件夹TEMP, 部署结果网盘的所有内容显示不出来.

GaryLz commented 4 years ago

我也测试过,有一个盘利用公共API部署出现问题。不过,通过排除法-替换个人API,也出现这样的问题。总结起来,并不是API的锅。 解决方案: 利用builder重新生成一份代码,或者, 利用部署好的代码,修改下默认的root_dir(如果同账户下的话)就能解决问题。

你的分析应该是对的。我用模版填好refresh_token 。更新到worker脚本就没问题了。 模版地址:https://raw.githubusercontent.com/maple3142/GDIndex/master/worker/dist/worker.js

没看懂哈. 我试了用空白refresh_token部署, 结果网盘的所有内容显示不出来. 是要填写自己的refresh_token吗, 但是是怎么得到的?

利用builder重新生成一份代码

没看懂哈, 我尝试的每一次部署都会重新生成一份, 因为Authorization Code是一次性的, 不重新生成也不行.

修改下默认的root_dir(如果同账户下的话)

我试着改成了我的网盘中某一个文件夹TEMP, 部署结果网盘的所有内容显示不出来.

每次你点击生成一份Authorization code,然后在builder填入生成代码时,都会生成一份refresh_token。(这份token,一份用户同意书,让项目获得你这个用户的读取网盘权限。并且是长期有效的。)

现在问题是,那个快捷版builder,在生成代码过程,或者复制代码到cloudflare workers过程中,代码可能有时候出现差错。

所以, 解决方案:到builder重新生成一份可能运行正常的代码。多尝试几次,总有一份可以用的,你也可以把那个代码中的refresh_code记录下来,看看是不是API的锅,不过,已经确定了,API(也就是refresh_code是没问题的。)

背景: 我有几个盘,部署了几次。其中,有一个盘是下载不下来的,然后,换成部署正常的代码,改下root_dir目录就好了。(如果你几个盘,在不同账号里面,就需要改refresh_code)

joshatt commented 4 years ago

@GaryLz 谢谢, 又试了一次, 居然成了. (上一次的部署是refresh_code为空). 还是没明白"改下root_dir目录", 比如我在我的网盘里随便找个文件夹"download", 是说在builder里面把"Default Root ID"设成download吗?

GaryLz commented 4 years ago

@joshatt Nah...FYI:

From https://rclone.org/drive/#root-folder-id

Example: So if the folder you want rclone to use has a URL which looks like https://drive.google.com/drive/folders/1XyfxxxxxxxxxxxxxxxxxxxxxxxxxKHCh in the browser, then you use 1XyfxxxxxxxxxxxxxxxxxxxxxxxxxKHCh as the root_folder_id in the config.

NB folders under the “Computers” tab seem to be read only (drive gives a 500 error) when using rclone.

并不是填入文件名/盘名,而是复制打开想要盘/目录browser tab上的网址后半部分的代码,作为root_folder_id的唯一标示码,代码只认懂那个。如有疑问,请参考以上文档。

ps, 解决问题后,最好close掉issue.

joshatt commented 4 years ago

@GaryLz 谢谢解答