Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api loader failed to load any api #65

Open
pdhoward opened this issue Apr 6, 2017 · 9 comments
Open

api loader failed to load any api #65

pdhoward opened this issue Apr 6, 2017 · 9 comments
Labels

Comments

@pdhoward
Copy link

pdhoward commented Apr 6, 2017

I appreciate the open source, and look forward to exercising this project/platform

I don't have a lot of time right now to dig into the code, so thought I'd post the issue encountered here, hoping you can point me in the right direction

  1. followed installation instructions and test below, including definition of yaml file in definitions/sample
  2. node sample.js appears to start-up correctly, issuing 2 warnings on deprecated context middleware
  3. curl http://localhost:3000/sample/echo -- and receive message {"name": "PreFlowError". "message": "unable to process the request"}
  4. message in cli displays "Error: api-loader failed to load any API"
  5. not sure if it is important, but i did note in the .datastore file that the following record is stored
    {"snapshot":"C:\Users\Patrick\Desktop\microgateway\test/definitions/sample","port":36042}
@tonyffrench tonyffrench self-assigned this Apr 13, 2017
@tonyffrench
Copy link
Contributor

@pdhoward I've completed "Getting Started" instructions on my mac and it worked flawlessly. What Windows version do you use?

tonyf-mbp-ibm:apim-clean tonyf$ curl -v http://localhost:3000/sample/echo
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 3000 (#0)
> GET /sample/echo HTTP/1.1
> Host: localhost:3000
> User-Agent: curl/7.51.0
> Accept: */*
>
< HTTP/1.1 200 OK
< X-Powered-By: IBM API Connect MicroGateway
< access-control-allow-origin: *
< access-control-allow-credentials: false
< access-control-allow-headers:
< access-control-allow-methods: GET,OPTIONS
< access-control-expose-headers: APIm-Debug-Trans-Id, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Global-Transaction-ID
< Host: localhost:3000
< User-Agent: curl/7.51.0
< Accept: */*
< X-RateLimit-Limit: 100
< X-RateLimit-Remaining: 99
< Content-Length: 22
< Date: Tue, 18 Apr 2017 23:27:07 GMT
< Connection: keep-alive
<
* Curl_http_done: called premature == 0
* Connection #0 to host localhost left intact

@pdhoward
Copy link
Author

Win10

@kimoudev
Copy link

kimoudev commented Jun 4, 2017

I have this error
Error: api-matcher failed to match to any API
I did exactly as indicated..i'm on mac.
help please @tonyffrench

@geekosphere-net
Copy link

I get the same error when running in CentOS 7
In Step 3 it says to go to the root folder which is the same folder as Step 2 and when I create the sample.js file there, the require for the microgw fails as it is not in "../lib/microgw" but "./lib/microgw"
after changing that I still have the same "failed to load any API" error

@kimoudev
Copy link

Exactly @geekosphere-net in MAC/CENTOS7 same error... @ozairs

@geekosphere-net
Copy link

npm test fails as well so not sure it is due to problems with the script.js or sample_1.0.0.yaml code.

@Searev
Copy link

Searev commented Jul 25, 2017

I recently encountered a similar problem. The microgateway used to work just fine, but these days, any new install would end up displaying an api-loader failed to load any API error message for any request (on Windows 7, 10, CentOS 6).
I found out that the problem came from one of the dependencies, loopback-datasource-juggler, which has been upgraded from 2.54.1 to 2.55.1.
I resolved the problem specifying the package version in the package.json file

{
    // other fields
    "dependencies": {
        // other dependencies
        "loopback-datasource-juggler": "2.54.1"
    },
    "APIConnectGateway": "1.0.0"
}

I hope it can help some of you !

@raghavendranagolu
Copy link

Hi All,

I am also getting the same error '{"name":"PreFlowError","message":"unable to process the request"}' ,exact resolution has not yet identified for this problem. Can anyone please help me on this.

@jpegram2
Copy link

jpegram2 commented Feb 4, 2019

May be a moot point but this is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants