Skip to content
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

Axios 0.26.1 causes breakages #1780

Closed
SorsOps opened this issue Mar 23, 2023 · 1 comment · Fixed by #1781
Closed

Axios 0.26.1 causes breakages #1780

SorsOps opened this issue Mar 23, 2023 · 1 comment · Fixed by #1781
Labels
dependencies Pull requests that update a dependency file
Milestone

Comments

@SorsOps
Copy link
Contributor

SorsOps commented Mar 23, 2023

Reproducible in:

The Slack SDK version

"@slack/bolt": "^3.11.2",

Node.js runtime version

v18.12.1

OS info

Microsoft Windows [Version 10.0.19044.2604]

Steps to reproduce:

(Share the commands to run, source code, and project settings)

  1. Clone https://github.com/SorsOps/slackbot-bug-reproducible
  2. npm ci
  3. npm run build:dev
  4. Look at line 10426 in dist/index.js

If you debug this file you will see that the buildUrl gets a series of undefined values which results in the .replace failing

This appears to be related to you using axios@0.26.1

If I install axios@0.27.2 it works

Expected result:

That the auth handler would work correctly and then call the message handlers

Actual result:

<html>
<body>
<!--StartFragment-->

2023-03-23T23:30:41.103+02:00Copy2023-03-23T21:30:41.103Z	undefined	ERROR	Unhandled Promise Rejection 	{     "errorType": "Runtime.UnhandledPromiseRejection",     "errorMessage": "TypeError: Cannot read properties of undefined (reading 'replace')",     "reason": {         "errorType": "TypeError",         "errorMessage": "Cannot read properties of undefined (reading 'replace')",         "stack": [             "TypeError: Cannot read properties of undefined (reading 'replace')",             "    at p.getUri (/var/task/index.js:2:173653)",             "    at Function.getUri (/var/task/index.js:2:179095)",             "    at /var/task/index.js:2:129041",             "    at i (/var/task/index.js:2:479502)",             "    at /var/task/index.js:2:479646",             "    at new Promise (<anonymous>)",             "    at e.exports.add (/var/task/index.js:2:479427)",             "    at /var/task/index.js:2:128980",             "    at t._fn (/var/task/index.js:2:480850)",             "    at t.attempt (/var/task/index.js:2:504311)"         ]     },     "promise": {},     "stack": [         "Runtime.UnhandledPromiseRejection: TypeError: Cannot read properties of undefined (reading 'replace')",         "    at process.<anonymous> (file:///var/runtime/index.mjs:1188:17)",         "    at process.emit (node:events:513:28)",         "    at emit (node:internal/process/promises:140:20)",         "    at processPromiseRejections (node:internal/process/promises:274:27)",         "    at processTicksAndRejections (node:internal/process/task_queues:97:32)"     ] }
--


<!--EndFragment-->
</body>
</html>
@seratch seratch added dependencies Pull requests that update a dependency file and removed untriaged labels Mar 24, 2023
@seratch
Copy link
Member

seratch commented Mar 24, 2023

Hi @SorsOps, thanks for reporting this! We have been upgrading the required version range of axios to the latest due to the issues on the library side. So, applying the change to package.json for the upcoming request looks great to us.

We haven't decided when to release a new version. So, in the short term, please upgrade axios version to the latest in your project build settings.

@seratch seratch added this to the 3.12.3 milestone Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants