Git Product home page Git Product logo

Comments (2)

yury-s avatar yury-s commented on June 11, 2024

You have two snippets, one of them uses web platform's fetch and FormData, it should not be affected by playwright, it might be a change caused by newer browser version. As far as I understand, the second example works fine when you say multipart: formData which is expected usage. Can you provide full reproduction example where the form data is not sent properly?

from playwright.

barnabas-nagy-ni avatar barnabas-nagy-ni commented on June 11, 2024

I apologize for any confusion. I provided two code snippets because we're dealing with two different types of file upload tests. The first one generates a file and sends it directly to the server programmatically using window.fetch. The second one uses page.setInputFiles to add the file to the Angular UI, which then sends the file to the server. Both of these methods generate a multipart: formData request. However, if I upgrade the Playwright version to 1.44, both tests fail as previously described. I managed to find a workaround for the first method using context.request.post. However, the second method still fails. I couldn't find a workaround for this because the file upload is entirely handled by the browser/Playwright.

I can confirm that if I use the same browser version in the same environment with Playwright 1.43.1, the tests pass. However, if I upgrade the Playwright version to 1.44, the tests fail due to an incomplete request body, as previously described.

After some investigation, we found that the cause of the issue is that the new version of playwright is somehow incompatible with our opentelemetry tracer setup.

I created a minimal reproduction environment, please find it attached. Please also find additional information in the README.md
Playwright-bug.zip

NOTE: The provided test will also fail with Playwright version 1.43.1 because the tracer isn't set up properly, but the file will be sent to the server successfully.

from playwright.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.