Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kkarkos opened this issue Jan 3, 2025 · 1 comment

Comments

@kkarkos
Copy link

kkarkos commented Jan 3, 2025

  • 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"
@yuyutaotao
Copy link
Collaborator

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

yuyutaotao added a commit that referenced this issue Jan 5, 2025
zhoushaw pushed a commit that referenced this issue Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants