Open ani-mal opened 4 days ago
@deyaaeldeen @jeremymeng @joheredi @maorleger @mpodwysocki @timovv @xirzec
Thank you for your feedback. Tagging and routing to the team member best able to assist.
There were reports of similar issue when using our SDK in Electron app with nodeIntegration: true. We add the proxyPolicy when Node-like environment is detected: https://github.com/Azure/azure-sdk-for-js/blob/31b76c94f5bb633dfa73fe9c20d1ba88a0e9228e/sdk/core/core-rest-pipeline/src/createPipelineFromOptions.ts#L85
But it seems browser version of the policy is bundled.
is there any way around this?
Looks like we need to regenerate and release @azure-rest/ai-translation-text
against the 2.x of @azure-rest/core-client
-- @MikeyMCZ can you handle this?
@xirzec for what its worth we are also using @azure/openai
I looked at their latest release and they also seem to be using an older version of @azure-rest/core-client
in their dependency tree. And we are also seeing this proxyPolicy
error coming from that package dependency as well
@ani-mal could you confirm what version of @azure/openai are you using? v2.0.0-beta.2 depends on @azure-rest/core-client@^2.2.0.
We are using v1.0.0, I updated it to v2.0.0-beta.2 to check the dependencies, but I think I actually just payed attention to the core-util package as opposed to the core-client version. 🤔
@azure/rest-ai-translation@1.0.0
that has a dependency on@azure-rest/core-client": "^1.1.0
and@azure/core-rest-pipeline": "^1.8.0
,Describe the bug Unable to make a rest API call on the renderer on the ElectronApp because I get the following error:
Error: proxyPolicy is not supported in browser environment
.nodeIntegration
is set totrue
and we can't turn this off.the workaround for this is to run the API request on the main thread, but I would like to remove this workaround and have it all run in the renderer process.
To Reproduce Steps to reproduce the behavior:
nodeIntegration
set to true@azure/core-rest-pipeline
that is the dependency tree of@azure/rest-ai-translation
Expected behavior Able to make a rest api request from the renderer process without getting
Error: proxyPolicy is not supported in browser environment
error.Screenshots
Additional context Unable to provider the source code as it is not open sourced.