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

Getting error 'An unknown error occurred.' while executing code , Looks like zerostep API is not getting hit. #48

Open
naveencha opened this issue Dec 4, 2024 · 1 comment

Comments

@naveencha
Copy link

Code used :

import { test } from '@playwright/test';
import { ai } from '@zerostep/playwright';

test('zerostep example', async ({ page }) => {
await page.goto('https://zerostep.com/');

// An object with page and test must be passed into every call
const aiArgs = { page, test };
const headerText = await ai('Get the header text', aiArgs);
await page.goto('https://www.google.com/');
await ai(Type "${headerText}" in the search box, aiArgs);
await ai('Press enter', aiArgs);
})

Zerostep api key is used in environment variable and its returning after doing echo in dev IDE(Visual studio code)

Error:
Running 1 test using 1 worker

✘ 1 ai_test.spec.ts:4:5 › zerostep example (3.1s)

  1. ai_test.spec.ts:4:5 › zerostep example › zerostep.ai 'Get the header text' ────────────────────
'An unknown error occurred.'

1 failed
ai_test.spec.ts:4:5 › zerostep example ─────────────────────────────────────────────────────────

@ja3yntwillis
Copy link

ja3yntwillis commented Dec 4, 2024

@naveencha seems you are getting 401 - try disconnecting from VPN /disable firewall that is blocking your token,I was facing this issue and resolved by disconnecting VPN

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