GithubHelp home page GithubHelp logo

Comments (10)

alco avatar alco commented on August 21, 2024

I don't see anything wrong in this code. Could you provide a minimal Mix project that reproduces the problem?

from bypass.

imetallica avatar imetallica commented on August 21, 2024

Sure, just clone and do the ritual mix deps.get, mix test.

https://github.com/imetallica/bypass-issue

from bypass.

fastjames avatar fastjames commented on August 21, 2024

I am having what appears to be the same problem, so I cloned the sample repo and I was able to replicate the problem. Also, I tried inserting a Process.sleep/0 call after bypass starts up. I grabbed the port number and verified that I was able to contact the bypass server via curl on that port. However, the sample app's test was still unable to do so.

from bypass.

fastjames avatar fastjames commented on August 21, 2024

I also tried swapping in HTTPoison for Gun in the tests, since my app and the sample are both using that. It did not cause any tests to fail in a way that would suggest that gun is masking a problem.

from bypass.

fastjames avatar fastjames commented on August 21, 2024

I noticed a small inconsistency while reading the bypass README and the tests. In the readme, it says you should use Plug.Conn.resp/3 to formulate the bypass response. However, in the test they use Plug.Conn.send_resp/3 instead. I tried changing this call in your sample app and it did not appear to change the outcome of the test, but I still wanted to make note of it.

from bypass.

fastjames avatar fastjames commented on August 21, 2024

After further work on this, I think my problem was compound:

  1. I needed to use send_resp/3 instead of resp/3 in my bypass blocks
  2. I needed to properly start one of my dependency libraries in mix.exs

After fixing those two things, I had much better results. I'll make a note to submit a pull request for the doc change I mentioned in the previous comment.

from bypass.

alco avatar alco commented on August 21, 2024

Closing this since it doesn't look like a bug in Bypass.

from bypass.

 avatar commented on August 21, 2024
2. I needed to properly start one of my dependency libraries in mix.exs

@fastjames what were the dependencies that needed to start properly.

from bypass.

fastjames avatar fastjames commented on August 21, 2024
2. I needed to properly start one of my dependency libraries in mix.exs

@fastjames what were the dependencies that needed to start properly.

@nikhilmor I looked back through some of my repos, but it has been several years and I don't recall the specific dependency. Sorry I can't be of more help.

from bypass.

 avatar commented on August 21, 2024

I too am facing similar issue, tried a number of things but to no avail.
@fastjames thanks for your input. You were really fast with the response.

from bypass.

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.