Azure / Azure/AppConfiguration-JavaScriptProvider

Protocol "https:" not supported. Expected "http:"

未关闭
#103 3 条评论 1 个 reaction 已指派 1 人 已被 @zhiyuanliang-ms 认领 在 GitHub 查看
bug
主要语言
TypeScript
星标
18
派生
13
平均合并
1 天 5 小时
30 天内合并 PR
4

描述

I’ve added MSW (v2.4.3) into our project to mock the API requests, but after doing so, I encountered the following error:

[ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:" (see the stack trace below).

The full stack trace is attached below for reference. I’m currently using Next.js (v14.2.12) and msw (v2.4.3), and the error seems to occur when handling https requests within a Node.js environment.

Your help would be greatly appreciated. Thank you in advance for your support.

`@example/web:dev: ⨯ TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"
@example/web:dev: at new ClientRequest (node:_http_client:183:11)
@example/web:dev: at new _NodeClientRequest (webpack-internal:///(instrument)/../../packages/mock/node_modules/@mswjs/interceptors/lib/node/chunk-CVV3L375.mjs:22
9:5)
@example/web:dev: at Object.interceptorsHttpRequest [as request] (webpack-internal:///(instrument)/../../packages/mock/node_modules/@mswjs/interceptors/lib/node/
chunk-CVV3L375.mjs:847:12)
@example/web:dev: at eval (webpack-internal:///(rsc)/../../node_modules/@azure/core-rest-pipeline/dist/esm/nodeHttpClient.js:199:145)
@example/web:dev: at new Promise ()
@example/web:dev: at NodeHttpClient.makeRequest (webpack-internal:///(rsc)/../../node_modules/@azure/core-rest-pipeline/dist/esm/nodeHttpClient.js:198:16)
@example/web:dev: at NodeHttpClient.sendRequest (webpack-internal:///(rsc)/../../node_modules/@azure/core-rest-pipeline/dist/esm/nodeHttpClient.js:120:36)
@example/web:dev: at eval (webpack-internal:///(rsc)/../../node_modules/@azure/core-rest-pipeline/dist/esm/pipeline.js:57:32)
@example/web:dev: at Object.sendRequest (webpack-internal:///(rsc)/../../node_modules/@azure/core-rest-pipeline/dist/esm/policies/logPolicy.js:31:24)
@example/web:dev: at eval (webpack-internal:///(rsc)/../../node_modules/@azure/core-rest-pipeline/dist/esm/pipeline.js:55:31)
@example/web:dev: at Object.sendRequest (webpack-internal:///(rsc)/../../node_modules/@azure/app-configuration/dist-esm/src/appConfigCredential.js:36:20)
@example/web:dev: at async Object.sendRequest (webpack-internal:///(rsc)/../../node_modules/@azure/app-configuration/dist-esm/src/internal/synctokenpolicy.js:32:
30)
@example/web:dev: at async Object.sendRequest (webpack-internal:///(rsc)/../../node_modules/@azure/core-rest-pipeline/dist/esm/policies/redirectPolicy.js:27:30)
@example/web:dev: at async Object.sendRequest (webpack-internal:///(rsc)/../../node_modules/@azure/core-rest-pipeline/dist/esm/policies/retryPolicy.js:39:32)
@example/web:dev: at async Object.sendRequest (webpack-internal:///(rsc)/../../node_modules/@azure/core-client/dist/esm/deserializationPolicy.js:41:30)
@example/web:dev: at async AppConfiguration.sendOperationRequest (webpack-internal:///(rsc)/../../node_modules/@azure/core-client/dist/esm/serviceClient.js:119:3
3)
@example/web:dev: at async AppConfiguration.sendOperationRequest (webpack-internal:///(rsc)/../../node_modules/@azure/core-http-compat/dist/esm/extendedClient.js
:50:24)
@example/web:dev: at async eval (webpack-internal:///(rsc)/../../node_modules/@azure/app-configuration/dist-esm/src/appConfigurationClient.js:282:30)
@example/web:dev: at async Object.withSpan (webpack-internal:///(rsc)/../../node_modules/@azure/core-tracing/dist/esm/tracingClient.js:39:28)
@example/web:dev: at async Object.getPage (webpack-internal:///(rsc)/../../node_modules/@azure/app-configuration/dist-esm/src/appConfigurationClient.js:187:38) {
@example/web:dev: digest: '3030512967',
@example/web:dev: page: '/'
@example/web:dev: }`

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。