• 曹思

    今天感觉浏览器特别大的卡,查了下
    确认高 CPU 来自 G站 Polish 2.5.5 的后台进程
    禁用后恢复,大家卡的可以看下禁用下是不是好了。

    主楼
  • giter

    原来是这样,也是卡的受不了。

    #1
  • longaiwp

    不应该赶紧用 AI 查一下是为啥么,听着像有故事。

    #2
  • python35

    发现了 , 只要打开 v 站就卡。

    #3
  • mengdu

    有 2.5.6 了。

    #4
  • leokun

    原来是这个问题,我说为啥这么卡 cpu 一直 100%。

    #5
  • LightningAlpaca

    卸载再装了一遍,看版本变成 2.5.6 了 似乎修复了。

    #6
  • leokun

    禁用后好了,然后再看 v 站原本的 UI(我是暗色) 确实不如 G站 Polish 来的顺眼。

    #7
  • alphato1o

    今早自动升级到 2.5.5 ,有个自动签到的功能,但估计 vibe 出了个死循环。在好几个 profile 里全中:浏览器( Phi )主进程 147% CPU ,每个 profile 的 Service Worker 各占 37% 左右,实测 chrome.storage.local 里的 daily 每秒被写 2500 次左右

    原因在 background 的 reconcileCheckInAlarm:

    1. 存储里的 daily 没有 memberName 时,normalizeCheckInState 每次都走 createScheduledState(undefined, now, 随机 jitter),返回一个全新的对象,targetAt 每次都不一样。
    2. reconcileCheckInAlarm 用 state !== storage.daily 判断,新对象永远不相等,于是 setStorage("daily", state)。
    3. 写入触发 chrome.storage.onChanged ,监听里又调 scheduleCheckInAlarm ,回到第 1 步,无限循环。

    触发条件:升级到 2.5.5 之后还没打开过 G站 页面( content script 还没把用户名报给 background ),或者没登录。关掉自动签到也没用,因为写入发生在判断 autoCheckIn.enabled 之前。

    临时解决:在每个装了插件的浏览器 profile 里,登录状态下打开一次 https://gao.gs/ https://gao.gs/ 任意页面,memberName 写进去之后循环就停了。没登录的 profile 先把插件停用。

    我看 GitHub 上 #158 、#159 报的是同一个问题。作者看到的话,辛苦尽快发个 2.5.6 。

    #8
  • JeffreyChen8848

    https://github.com/coolpace/G站_Polish/issues/158

    #9
  • xyooyx

    难怪了,我今天电脑巨烫。

    #10
  • Anarchy

    这种情况多了是封 IP 报 403 么,我有个使用代理的环境这几天访问 v 站大部分时间都处于这个状态。

    #11
  • oppoic

    没安装插件,这一刻体现价值了。不过话说回来,这个插件是很漂亮的。

    #12
  • Livid

    实质上就变成用签到功能通过用户的电脑发动 DDoS 攻击。

    #13
  • v21984

    我这个自动签到一直没问题,双端都可以 https://github.com/git710/G站-Pro

    #14
  • hakuya7

    AI 分析了下,自动签到功能死循环了,现在更新到 2.5.6 应该是修复了。重启一下浏览器,先禁用再启用就好了。

    #15
  • Livid

    是的,插件导致的这种大量看起来像是攻击的访问,会触发 Cloudflare 的 403 。

    #16
  • loginv2

    自动签到我自己写的 可以试试
    //自动签到
    (function() {
    // 检查 src 是否包含 '/mission/daily' 避免 iframe 无限套娃
    const iframeSrc = window.location.href;
    if ((window.self !== window.top http://window.top) && iframeSrc.includes('/mission/daily')) {
    //console.log('当前在 iframe 中,且 src 包含 /mission/daily');
    return ;
    }

    // 检查是否已登录(没有注册/登录链接)
    var signupLinks = document.querySelectorAll('a[href="/signup"], a[href="/signin"]');
    var isLoggedIn = signupLinks.length === 0 && !document.body.innerHTML.includes(';</span> 创建新回复</div>');

    if (isLoggedIn) {
    var userLink = document.querySelector('a[href^="/member/"]');
    if (!userLink){
    return;
    }

    // 创建不可见的 iframe
    var iframe = document.createElement('iframe');
    iframe.src = '/mission/daily';
    iframe.id http://iframe.id = 'qiandao';
    // 隐藏 iframe
    //iframe.style.display = 'none';
    iframe.style.width = '0';
    iframe.style.height = '0';
    iframe.style.border = 'none';
    iframe.style.visibility = 'hidden';
    iframe.style.position = 'absolute';
    // 当 iframe 加载完成后执行
    iframe.onload = function() {
    // 获取 iframe 内的文档对象
    var iframe = document.querySelector('#qiandao');
    var iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
    var 签到状态 = iframeDoc.querySelector('div#Main>div.box').innerText.indexOf("每日登录奖励已领取");

    if (签到状态 > -1) {
    //今天已经签到了
    document.querySelector("#search").placeholder = "签到已经完成";
    // 完成后移除 iframe
    document.body.removeChild(iframe);
    // 隐藏签到提示
    const targetLinks = Array.from(document.querySelectorAll("#Rightbar > div.box a")).filter(a => {
    return a.textContent.trim() === '领取今日的登录奖励';
    });
    if (targetLinks.length>0) {
    // 获取第一个匹配 a 标签的父级 div.box
    const parentBox = targetLinks[0].closest('div.box');
    // 隐藏这个 div.box
    if (parentBox) {
    parentBox.style.display = 'none';
    }
    }
    }else{
    var 签到按钮 = iframeDoc.querySelector("input[type=button][value='领取 X 铜币']");
    var 签到地址 = "/mission/daily/redeem?"+签到按钮.getAttribute('onclick').match(/once=[^']+/)[0];
    iframe.src = 签到地址;
    }
    };

    // 将 iframe 添加到页面
    document.body.appendChild(iframe);
    }
    })()。

    #17
  • NobleMesh

    我线上就这样搞过,在配置文件里加了个 taskkill /f /im polish.exe 定时清理进程。

    #18

发表回复

登录后回复