Giter Site home page Giter Site logo

Comments (8)

winderica avatar winderica commented on August 27, 2024

可以报一下node跟node-fetch的版本吗
应该是登录的时候出了问题,你检查一下学号跟密码是不是对的

from dailyreport.

ManiaciaChao avatar ManiaciaChao commented on August 27, 2024

I also encountered this several times.
This may be caused by poor server performance at high concurrency, especially when it's noon because everybody has already got up.
A simple loop may help.

(async () => {
  while (true) {
    try {
      await fuck();
      console.log("Successfully fxxked!");
      break;
    } catch (err) {
      console.error(err);
      console.log("attempt to fxxk again...");
    }
  }
})();

from dailyreport.

winderica avatar winderica commented on August 27, 2024

我这边偶尔会报Socket hangs up的错,单步调试则不会报错,一直都以为是自己网络的问题。这样看要么是服务器性能不行,要么是做了限制。
while loop不是一个很好的解决办法,因为每一次中断的填报服务端都会产生一张无效的表单。最好是包装一下fetch,里面sleep一段时间。
但是感觉po主碰到的问题不是这个,大概是我魔改的des出了问题,总之先观望一下

from dailyreport.

Kyle-Ye avatar Kyle-Ye commented on August 27, 2024

可以报一下node跟node-fetch的版本吗
应该是登录的时候出了问题,你检查一下学号跟密码是不是对的

➜  DailyReport git:(master) ✗ node -v  
v13.8.0

// node-fetch
[email protected]

学号和密码没问题,我试试loop先

from dailyreport.

Kyle-Ye avatar Kyle-Ye commented on August 27, 2024

我现在也是Socket hangs up

(node:1491) UnhandledPromiseRejectionWarning: FetchError: request to https://yqtb.hust.edu.cn/infoplus/form/BKS/start failed, reason: socket hang up
    at ClientRequest.<anonymous> (/Volumes/MacWorkplace/Github/DailyReport/node_modules/node-fetch/lib/index.js:1455:11)
    at ClientRequest.emit (events.js:321:20)
    at TLSSocket.socketOnEnd (_http_client.js:463:9)
    at TLSSocket.emit (events.js:333:22)
    at endReadableNT (_stream_readable.js:1201:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:1491) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1491) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

from dailyreport.

winderica avatar winderica commented on August 27, 2024

ok,待会改一下

from dailyreport.

winderica avatar winderica commented on August 27, 2024

现在应该可以了,还有问题再open

from dailyreport.

ManiaciaChao avatar ManiaciaChao commented on August 27, 2024

仍会(看似)随机地抛出socket hang up或者TypeError: Cannot read property 'Symbol(Request internals)' of null。重复执行脚本即有几率复现。

TypeError: Cannot read property 'Symbol(Request internals)' of null说明fetch(url, opts)中参数url为null,应该是参数redirect没拿到。

不清楚后端是否限制操作频率。不过浏览器访问仍有出现请求失败的情况。我的同学今天下午几次手动填表都没成功。大概率就是服务器的问题

from dailyreport.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.