axios icon indicating copy to clipboard operation
axios copied to clipboard

socketPath feature is broken at 1.7.7

Open Jssly opened this issue 1 year ago • 4 comments

Describe the bug

throw error TypeError [ERR_INVALID_URL]: Invalid URL if sockPath is used.

To Reproduce

No response

Code snippet

No response

Expected behavior

No response

Axios Version

1.7.7

Adapter Version

No response

Browser

No response

Browser Version

No response

Node.js Version

18.20.2

OS

Win 11

Additional Library Versions

No response

Additional context/Screenshots

TypeError [ERR_INVALID_URL]: Invalid URL
    at new NodeError (node:internal/errors:405:5)
    at new URL (node:internal/url:676:13)
    at dispatchHttpRequest (file:///F:/git/node/libraries/nodelib_epg/node_modules/axios/lib/adapters/http.js:232:20)
    at file:///F:/git/node/libraries/nodelib_epg/node_modules/axios/lib/adapters/http.js:152:5
    at new Promise (<anonymous>)
    at wrapAsync (file:///F:/git/node/libraries/nodelib_epg/node_modules/axios/lib/adapters/http.js:132:10)
    at http (file:///F:/git/node/libraries/nodelib_epg/node_modules/axios/lib/adapters/http.js:170:10)
    at Axios.dispatchRequest (file:///F:/git/node/libraries/nodelib_epg/node_modules/axios/lib/core/dispatchRequest.js:51:10)
    at Axios._request (file:///F:/git/node/libraries/nodelib_epg/node_modules/axios/lib/core/Axios.js:173:33)
    at Axios.request (file:///F:/git/node/libraries/nodelib_epg/node_modules/axios/lib/core/Axios.js:40:25)
    at Axios.request (file:///F:/git/node/libraries/nodelib_epg/node_modules/axios/lib/core/Axios.js:45:41)

Jssly avatar Sep 24 '24 13:09 Jssly

any additional informations?

PritamP20 avatar Sep 30 '24 16:09 PritamP20

is this issue open? is anyone working on it? If not, can I take it up?

Anurag0218 avatar Oct 01 '24 17:10 Anurag0218

working on it

PritamP20 avatar Oct 01 '24 17:10 PritamP20

@PritamP20 more informtion, in this case, the socketPath is an Unix domain socket , that means it's a file path.

example: axios({ url: '/testing', socketPath:'/tmp/nginx.sock' })

it works fine in 1.7.3. but fails in 1.7.4+

Jssly avatar Oct 13 '24 04:10 Jssly

Just wanted to bump this as I am also experiencing this issue. For now, reverting to v1.7.3 resolves the issue.

hivenet-tomcrammond avatar Feb 27 '25 09:02 hivenet-tomcrammond

Does this bug fix now?

VaitoSoi avatar Aug 31 '25 10:08 VaitoSoi