Skip to content

[Bug] niu trans无法在Zotero.beta版插件设置页面登录 #1146

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

Closed
3 tasks done
ramonmi opened this issue Apr 7, 2025 · 4 comments
Closed
3 tasks done

[Bug] niu trans无法在Zotero.beta版插件设置页面登录 #1146

ramonmi opened this issue Apr 7, 2025 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@ramonmi
Copy link
Contributor

ramonmi commented Apr 7, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Have you checked the FAQ (#6)?

  • I have checked the FAQ

Are you using the latest Zotero and the latest plugin?

  • I have confirmed I'm using the latest Zotero and the latest plugin

Environment

  • OS: Win 11
  • Zotero Version: 7.1-beta.25
  • Plugin Version: 2.2.3

Describe the bug

在Niu trans配置页面输入账号密码,点击登录,弹出如图提示。但是在Zotero.7.0.15版本里,同样的插件同样的账号信息,可以正常登录。查看了debug output,输出是一样的(因此没上传)。
很奇怪,难道是Zotero-beta升级了的原因?但是在Firefox可以正常登录。

Image

Debug Output

Anything else?

麻烦 @windingwind 抽时间帮忙看看吧,感谢!

@ramonmi ramonmi added the bug Something isn't working label Apr 7, 2025
@ramonmi
Copy link
Contributor Author

ramonmi commented Apr 8, 2025

仔细对比了两个版本Zotero运行同一版本插件时的debug output,beta版无法登录niu trans账号,输出为

(5)(+0000004): CookieSandbox: Not touching channel for apis.niutrans.com



(5)(+0000272): CookieSandbox: Being paranoid about channel for ocsp.globalsign.com



(5)(+0000000): CookieSandbox: Cleared cookies to be sent to ocsp.globalsign.com



(5)(+0000261): CookieSandbox: Being paranoid about channel for ocsp.globalsign.com



(5)(+0000001): CookieSandbox: No Set-Cookie header received for ocsp.globalsign.com



(5)(+0000042): CookieSandbox: Not touching channel for apis.niutrans.com

@Chapoly1305
Copy link
Contributor

Chapoly1305 commented May 1, 2025

确认复现,macOS 15.4,Zotero 7.1-beta.34+a7964f711
初步怀疑是 zotero-pdf-translate/src/modules/settings/niutrans.ts 的调用逻辑在Beta中发生变化。

@Chapoly1305
Copy link
Contributor

Chapoly1305 commented May 2, 2025

老版本(Prod)应该会使用同一个Session访问同域名,所以自动带上了Cookie访问后续的API。
新版本(Beta)似乎Request的逻辑发生变化,可能Session没有维持,所以后续Request因没有Cookie被拒。
问题已修复,确认Beta 可正常登陆,请查PR #1168

Request from Beta
Image

Request from Prod
Image

@windingwind

Copy link

github-actions bot commented May 4, 2025

🚀 This ticket has been resolved in v2.2.9. See Release v2.2.9 for release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants