GithubHelp home page GithubHelp logo

KeyError: 'port' about sapp HOT 5 OPEN

facebook avatar facebook commented on April 25, 2024
KeyError: 'port'

from sapp.

Comments (5)

abishekvashok avatar abishekvashok commented on April 25, 2024

What version of MT are you using @qlkwej ?

from sapp.

qlkwej avatar qlkwej commented on April 25, 2024

Should be the latest one mariana-trench 1.0.2 @abishekvashok
Another workaround I do is to provide a dummy sapp.db before the analysis.

And it's a bit weird, though sometimes it works, and sometimes it doesn't.

Use case 1:

  • When I execute MT, and after that, analyze the output using sapp immediately (using bash), on the first try it will crash.
  • But it works when I manually do it one by one (type in terminal).

Use case 2:

  • When I execute MT, and after that, analyze the output using sapp immediately (using bash), on the first try it will crash.
  • Wait a couple of minutes, and re-run the script. It works.

Use case 3:

  • When I execute MT, and after that, analyze the output using sapp immediately (using bash), on the first try it will crash.
  • After the crash, it creates a dummy sapp.db. So I used it before the sapp analysis. And now it works without crashing.

Feel free to close the issue if you can't reproduce the issue.
Thanks!

from sapp.

0xedward avatar 0xedward commented on April 25, 2024

Hey @qlkwej!

Should be the latest one mariana-trench 1.0.2

That's strange since my earlier guess at what may be happening is the json output from MT you are using for sapp analyze was created using a older version of MT, since we recently updated the MT output parser in sapp, which removed support for reading older versions of outputs from MT (see e484f216f7d95f8e33e1d1fa3586a18fa53552e3). As far as I'm aware, that should be only functional change from fb-sapp 0.5.2 to 0.5.3 related to the port key in MT's output

But the issue you are describing seems to only happen when sapp analyze is called the first time

cc @yuhshin-oss who likely has the most context on this

from sapp.

dianavintila avatar dianavintila commented on April 25, 2024

Hi! This is a problem that I had also when I tried to use Mariana Trench with version fb_sapp-0.5.4.dist-info.
The solution was to downgrade sapp:
pip uninstall fb-sapp
pip install -Iv fb-sapp==0.5.2

from sapp.

a-huk avatar a-huk commented on April 25, 2024

Still the same issue, if I try the fix suggested by @dianavintila, I get :
ImportError: cannot import name 'GraphQLResolveInfo' from 'graphql' (/home/hukad/.venvs/mariana-trench/lib/python3.8/site-packages/graphql/__init__.py)

from sapp.

Related Issues (16)

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.