Comments (8)
可以报一下node跟node-fetch的版本吗
应该是登录的时候出了问题,你检查一下学号跟密码是不是对的
from dailyreport.
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.
我这边偶尔会报Socket hangs up
的错,单步调试则不会报错,一直都以为是自己网络的问题。这样看要么是服务器性能不行,要么是做了限制。
while loop不是一个很好的解决办法,因为每一次中断的填报服务端都会产生一张无效的表单。最好是包装一下fetch,里面sleep一段时间。
但是感觉po主碰到的问题不是这个,大概是我魔改的des出了问题,总之先观望一下
from dailyreport.
可以报一下node跟node-fetch的版本吗
应该是登录的时候出了问题,你检查一下学号跟密码是不是对的
➜ DailyReport git:(master) ✗ node -v
v13.8.0
// node-fetch
[email protected]
学号和密码没问题,我试试loop先
from dailyreport.
我现在也是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.
ok,待会改一下
from dailyreport.
现在应该可以了,还有问题再open
from dailyreport.
仍会(看似)随机地抛出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)
- Getting rid of RSA.js and so on is really excellent! HOT 3
- tesseract.js 数据下载过慢 HOT 3
- tesseract的一些问题 HOT 3
- Unused dependency `tesseract.js` HOT 1
- 发现一个或许有用的API HOT 4
- Error caused by the new API HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dailyreport.