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

GET http://localhost:8083/registry 404 (Not Found) #99

Open
ghost opened this issue Nov 21, 2017 · 8 comments
Open

GET http://localhost:8083/registry 404 (Not Found) #99

ghost opened this issue Nov 21, 2017 · 8 comments

Comments

@ghost
Copy link

ghost commented Nov 21, 2017

Hi,
I'm just trying to get this thing up and running to evaluate it.
Following the instructions as best I can...
Want to run it on my macbook with Docker.

  • I've registered with FitBit's Api..
  • Edited the resource-server.env to add in my client_id and client_secret for fitbit into
    OPENMHEALTH_SHIM_FITBIT_CLIENT_ID
    OPENMHEALTH_SHIM_FITBIT_CLIENT_SECRET
    (presumably I have to remove the leading # to uncomment?)
  • then did: docker-compose up -d to get it running

When I try to use the console ( browse to localhost:8083) by entering a user handle and clicking Find I get a button that doesn't say connect and doesn't do anything.. when I look in the browser console I see errors relating to a missing registry:

ERROR GET http://localhost:8083/registry 404 (Not Found)

Then I tried a different tack and went with the Postman instructions to authorise using postman.
Having set up the collection and the environment I used the GET for Initiate Authorisation.
But I noticed that it had a null for redirect_url.. and then when I copy/paste the authorizationUrl into the browser and authenticate.. I end up with an error from FitBit that says...

The app you're trying to connect did not provide valid information to Fitbit. Please report this issue to them.

Developer information: invalid_request - Invalid redirect_uri parameter value

So, the GET looks like below... I see nulls in the redirect urls... but nowhere in the instructions is this mentioned... do I put it into resource-server.env somehow?

Any help would be greatly appreciated...
Thanks
PJ

{
"id": "5a14581ec9e77c0007d5a367",
"stateKey": "Hxb2es",
"username": "[email protected]",
"redirectUri": "https://www.fitbit.com/oauth2/authorize",
"requestParams": {
"redirect_url": null
},
"authorizationUrl": "https://www.fitbit.com/oauth2/authorize?response_type=code&client_id=22CL97&redirect_uri=http://localhost:8083/authorize/fitbit/callback&scope=activity%20heartrate%20sleep%20weight&state=Hxb2es&prompt=login%20consent",
"clientRedirectUrl": null,
"isAuthorized": false,
"serializedRequest": "rO0ABXNyAEpvcmcuc3ByaW5nZnJhbWV3b3JrLnNlY3VyaXR5Lm9hdXRoMi5jbGllbnQudG9rZW4uRGVmYXVsdEFjY2Vzc1Rva2VuUmVxdWVzdAyynjYbJPrOAgAGTAAGY29va2lldAASTGphdmEvbGFuZy9TdHJpbmc7TAAKY3VycmVudFVyaXEAfgABTAANZXhpc3RpbmdUb2tlbnQAPkxvcmcvc3ByaW5nZnJhbWV3b3JrL3NlY3VyaXR5L29hdXRoMi9jb21tb24vT0F1dGgyQWNjZXNzVG9rZW47TAAHaGVhZGVyc3QAD0xqYXZhL3V0aWwvTWFwO0wACnBhcmFtZXRlcnN0AChMb3JnL3NwcmluZ2ZyYW1ld29yay91dGlsL011bHRpVmFsdWVNYXA7TAAFc3RhdGV0ABJMamF2YS9sYW5nL09iamVjdDt4cHBwcHNyACxvcmcuc3ByaW5nZnJhbWV3b3JrLnV0aWwuTGlua2VkTXVsdGlWYWx1ZU1hcDTATlwQbMD7AgABTAAJdGFyZ2V0TWFwcQB+AAN4cHNyABdqYXZhLnV0aWwuTGlua2VkSGFzaE1hcDTATlwQbMD7AgABWgALYWNjZXNzT3JkZXJ4cgARamF2YS51dGlsLkhhc2hNYXAFB9rBwxZg0QMAAkYACmxvYWRGYWN0b3JJAAl0aHJlc2hvbGR4cD9AAAAAAAAAdwgAAAAQAAAAAHgAc3EAfgAHc3EAfgAJP0AAAAAAAAx3CAAAABAAAAABdAAFc3RhdGVzcgAUamF2YS51dGlsLkxpbmtlZExpc3QMKVNdSmCIIgMAAHhwdwQAAAABdAAGSHhiMmVzeHgAcA=="
}

@ghost
Copy link
Author

ghost commented Nov 21, 2017

Ohhkk...
So I've just read another issue where a response is saying that the console doesn't actually work presently.

Grand.. so I'm concentrating on using Postman.
Could someone please clue me in on the steps to follow in postman?

I presume that after Initiate Authorisation I then need to do Process Authorisation ?

I have gotten a bit further by adding a param to GET Initiate Authorization .
I added redirect_url to it in postman and now at least when I paste the authorizationUrl into chrome and get to the authentication with FitBit it gets me as far as the authorization page..

When I click allow I get redirected back to http://localhost:8083/authorize/fitbit/callback#_=_
But that comes up with an error...
I caught the return request from fitbit and got the code and the state... but when I plugged them into Process authorization redirect.. I got
{
"type": "ERROR",
"details": "Access token denied.",
"accessParameters": null,
"requestParameters": null
}

I'm not certain where to go next...

Thanks
PJ

@shannoneobrien
Copy link

shannoneobrien commented Jan 10, 2018

Any luck with resolving this issue? We are having the same problem with a project i am working on. @pjatinsight

@ghost
Copy link
Author

ghost commented Jan 11, 2018 via email

@enridl
Copy link

enridl commented May 4, 2018

same issue for me too. abandoning shimmer since looks no support, but a pity.

@Grusinator
Copy link

same here, this should be fixed

@enridl
Copy link

enridl commented Sep 21, 2018

abandoned too because of this.

@Grusinator
Copy link

But even though the project is not active, it could really be useful to have such a tool. Any of you who have found alternative projects, or willing to share projects that handles this data integration?

Should a new project that tries to solve this be made?

@harsh90
Copy link

harsh90 commented Oct 9, 2018

Looks like the api doest have a endpoint to fetch the shimer details
Quick hack to check how it works
Overide the main.js file method

$scope.loadShims = function () { 
          var googlef = {shimKey:"googlefit", label:"https://www.googleapis.com/fitness/v1/users/me/dataSources"};
          var data = [googlef];
          $scope.shims = data;
       
        }; 

run ./run-dockerized.sh
Long term fix registry endpoint should be implemented which will send all the shim details.

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

No branches or pull requests

4 participants