midscene icon indicating copy to clipboard operation
midscene copied to clipboard

[Connectivity] Claude - Chrome extension not working without risk of key exposure

Open kkarkos opened this issue 1 year ago • 1 comments

  • Where are you using Midscene.js (Chrome extension, yaml with cli, Puppeteer,…) Chrome extension

  • The version of Midscene.js or Extension Midscene.js Chrome Extension v0.17

  • The error message

It looks like you're running in a browser-like environment.

This is disabled by default, as it risks exposing your secret API credentials to attackers.
If you understand the risks and have appropriate mitigations in place,
you can set the `dangerouslyAllowBrowser` option to `true`, e.g.,

new Anthropic({ apiKey, dangerouslyAllowBrowser: true });

Error: It looks like you're running in a browser-like environment.

This is disabled by default, as it risks exposing your secret API credentials to attackers.
If you understand the risks and have appropriate mitigations in place,
you can set the `dangerouslyAllowBrowser` option to `true`, e.g.,

new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
  • The model name and endpoint (if could be public) export MIDSCENE_USE_ANTHROPIC_SDK=1 export ANTHROPIC_API_KEY="....." export MIDSCENE_MODEL_NAME="claude-3-opus-20240229"

kkarkos avatar Jan 03 '25 20:01 kkarkos

I understand. We'll fix this in the next release. It will be released in 1 to 2 days.

yuyutaotao avatar Jan 05 '25 13:01 yuyutaotao

Hi @kkarkos , this has been released in the latest version.

yuyutaotao avatar Jan 14 '25 08:01 yuyutaotao