Skip to content

Errors attempting to upload multiple resources with the same resource url #388

@swissspidy

Description

@swissspidy

We're using @percy/cli (1.0.0-beta.54) together with @percy/puppeteer (2.0.0) and are facing a situation where Percy errors uploading screenshots because resource URLs are identical.

Here's an example scenario where this happens:

await page.goto('http://localhost:8000');

await percySnapshot(page, 'With JS');

await page.setJavaScriptEnabled(false);

await page.goto('http://localhost:8000');

await percySnapshot(page, 'Without JS');

await page.setJavaScriptEnabled(true);

But this can of course also happen when taking multiple screenshots in an SPA where the URL never changes:

await page.goto('http://localhost:8000');

await percySnapshot(page, 'Initial state');

await page.click('#button_that_opens_modal');

await percySnapshot(page, 'Modal open');

Is this something you can fix? If not, any advice on how to prevent this on our side?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions