Git Product home page Git Product logo

Comments (10)

tehhowch avatar tehhowch commented on June 24, 2024 1

@vlohana please upgrade to v4.3.1, released earlier today

from wdio-intercept-service.

tehhowch avatar tehhowch commented on June 24, 2024

That is this line:

const value = parts[1].trim();

cc @jbebe

@chadbellangivelify mind sharing the headers on the request that is causing the issue? You can set a debugger on that line in your test and step in, or add if (parts.length < 2) { console.log('header with only key', line); } to the code in your node_modules, right before the const key = parts[0].trim() line.

from wdio-intercept-service.

jbebe avatar jbebe commented on June 24, 2024

If the header row contains a colon, undefined will not occur, even if there is no content after the colon. Given the information there can only be one problem: one of the http headers does not contain a colon. Which is very weird so we you need more context here.

from wdio-intercept-service.

sumanthpfs avatar sumanthpfs commented on June 24, 2024

I get the same error too, after updating to 4.3.
I was unable to do any assertions or get methods on the requests.

from wdio-intercept-service.

tehhowch avatar tehhowch commented on June 24, 2024

@sumanthpfs @chadbellangivelify please provide the headers that are causing the issue. You can determine which header is responsible by making a modification in the library's downloaded package (inside node_modules) as identified above

from wdio-intercept-service.

chadbellangivelify avatar chadbellangivelify commented on June 24, 2024

@tehhowch At this time, I'm no longer able to reproduce this issue. Maybe @sumanthpfs Sumanthpfs can provide more details to help

from wdio-intercept-service.

dragosMC91 avatar dragosMC91 commented on June 24, 2024

for me it's a request like this causing the problem (added a console log):

{
    __fulfilled: 1669122851503,
    __processed: 1669122851372,
    body: '',
    headers: {},
    method: 'POST',
    requestBody: '[{"event":"map.load","created":"2022-11-22T13:14:11.371Z"}]',
    requestHeaders: { 'content-type': 'text/plain' },
    statusCode: 204,
    url: 'https://events.mapbox.com/events/v2'
}

removed some sensitive info from the url and body.

For the mentioned request, I get the error when parseResponseHeaders is called.

I could investigate next weekend if nobody fixes it by then

from wdio-intercept-service.

dragosMC91 avatar dragosMC91 commented on June 24, 2024

im providing a reproductible example here:

  1. checkout this branch: dragosMC91/wdio-exclude-pattern-bug-highlight#3
  2. (using node 16.18.0) yarn install
  3. run yarn test --spec test/specs/suite1/interceptorError.mobile.test.js

Running this test triggers the mentioned error.

from wdio-intercept-service.

vlohana avatar vlohana commented on June 24, 2024

Any solution for this issue? I am getting it very often for my application!

from wdio-intercept-service.

tehhowch avatar tehhowch commented on June 24, 2024

closed by #438

from wdio-intercept-service.

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.