Axios HTTP Library Pushes Broken Update, Causing Thousands of Websites to Crash

Recommended to follow↓

Source: OSC Open Source Community (ID: oschina2013)

Axios is a Promise-based HTTP client for browsers and Node.js. It is very lightweight and provides a simple-to-use library with an easily extensible interface.Recently, the update of version 1.1.0 released by Axios caused thousands of websites to crash due to a broken push to users.Axios HTTP Library Pushes Broken Update, Causing Thousands of Websites to CrashAccording to user-submitted issues, they encountered an error when using <span>axios.get</span> in Axios v1.1.0, which prompted an error message: <span>TypeError: axios.get is not a function</span>. This caused almost all requests to fail, as <span>axios.get</span> is expected to be a valid function. A user also provided a method to reproduce the issue by including <span><script></span> to import axios v1.1.0, and then directly calling <span>axios.get()</span> to reproduce the error:

&lt;script src="https://unpkg.com/[email protected]/dist/axios.min.js"&gt;&lt;/script&gt;&lt;script&gt;    axios.get(...)&lt;/script&gt;

Note: This issue did not occur in v1.0.0.

From the comments on the issue, it can be seen that almost all developers who commented experienced direct crashes in their production environments due to this issue. Some developers found that rolling back to 1.0.0 resolved the problem, but due to the need for review after updating their apps, they could not fix it immediately even if they knew the solution. There were also developers who believed that those affected by this issue were somewhat “not deserving of sympathy” because their production applications were using the latest (automatically upgraded) version of the library on CDN, which is a very foolish behavior. After confirming the issue, the development team released two patch updates (v1.1.1 & v1.1.2) the next day to fix the error, advising all users to upgrade to the latest version.Related links: https://www.reddit.com/r/programming/comments/xxu545/framework_axios_pushed_a_broken_update_crippling/https://github.com/axios/axios/issues/5038

– EOF –

Recommended Reading Click the title to jump

1. WeChat suddenly occupies dozens of GB! UP master investigates: the same file is actually stored 10 times

2. Still coding at 80! He is the namer of Unix, invented “Hello World”, and says solving problems relies entirely on dragging

3. The UK is trialing a 4-day work week, why are domestic internet giants still addicted to 996?

Follow “Programmers’ Affairs” and mark it as important, so you won’t miss out on industry news

Likes and views are the biggest support❤️

Leave a Comment