koltyakov / sp-rest-proxy

🌐 SharePoint API Proxy for local development
MIT License
172 stars 43 forks source link

Version 3.3.4 broken for OnpremiseUserCredentials #151

Closed davea38 closed 2 years ago

davea38 commented 2 years ago

The only change I made was to move from version 3.3.3 -> 3.3.4. Seems one of your dependencies is expecting a dictionary with different keys. 3.3.3 works fine (this is using OnpremiseUserCredentials)

Error TypeError: Expected the `options.agent` properties to be `http`, `https` or `http2`, got `_events`
    at normalizeArguments (C:\code\1360-broken\node_modules\got\dist\source\core\index.js:685:27)
    at Object.got [as request] (C:\code\1360-broken\node_modules\got\dist\source\create.js:112:39)
    at OnpremiseUserCredentials.getAuth (C:\code\1360-broken\node_modules\node-sp-auth\lib\src\auth\resolvers\OnpremiseUserCredentials.js:29:25)
    at Object.getAuth (C:\code\1360-broken\node_modules\node-sp-auth\lib\src\index.js:16:76)
    at SPClient.<anonymous> (C:\code\1360-broken\node_modules\sp-rest-proxy\dist\utils\client.js:69:51)
    at step (C:\code\1360-broken\node_modules\sp-rest-proxy\dist\utils\client.js:44:23)
    at Object.next (C:\code\1360-broken\node_modules\sp-rest-proxy\dist\utils\client.js:25:53)
    at C:\code\1360-broken\node_modules\sp-rest-proxy\dist\utils\client.js:19:71
    at new Promise (<anonymous>)
    at __awaiter (C:\code\1360-broken\node_modules\sp-rest-proxy\dist\utils\client.js:15:12)
koltyakov commented 2 years ago

Hey @davea38,

Was able to repro it seems related to authentication library update.

Please revert to 3.3.3 until it's resolved.

davea38 commented 2 years ago

Thanks, have already done so for the time being. Thanks for such a great solution by the way - your proxy is awesome πŸ‘πŸ‘

koltyakov commented 2 years ago

Thank you!

koltyakov commented 2 years ago

Thanks to @s-kainet it was fixed so fast. Please try v3.3.5. It works for me on one of the NTLM environments.

davea38 commented 2 years ago

Just upgraded, seems to work fine on my one test I did - thank you both πŸ‘