-
Notifications
You must be signed in to change notification settings - Fork 26
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
Refresh token not found error #31
Comments
I have the same problem using grafana 7.3.6 installed from Fedora RPM I've set the env variables in /etc/environment to make sure they're available to all users (including nologin ones like grafana). When I attempt to authorize the app and save the token I get the following error in logs: As usually I tried blaming SELinux first, but that does not seem to be the problem since the very same issue happens with it being turned off. Altering folder permissions has not worked as well. Callback domain is set to my IP. It'd seem everything is configured just as it should be. :( |
Same here... |
You can delete the
|
That might be an access issue, check for details in logs. |
Same problem, When i pressed Save & Test, same error: Log: I make: Also i make Not work! I try various versions of grafana, but nothing changed. Grafana server on Debian, ubuntu, same error. |
@memphisraines87 have you tried this? |
Hello, This is to confirm the plugin doesn't work. I tried the suggestions posted by other users on this bug-report but none worked. In my case I'm running Grafana from a Docker container and I tried to set the following
Yet I got this error when I was on the setup page:
I ended adding the following to my /etc/hosts, which got me further:
And then I got asked if I wanted to authorize the plug-in. But then when I got redirected back there was the same initial setup page, blank. So it seems than Grafana and this Strava do not understand each other. Overly complicated setup :-( It is possible to feed the refresh Token to Grafana? Force-feed the data required for the plugin to work? |
Yes, I tried, nothing changes.
Same problem, after redirect, all fields blank. Manually copy code from redirect URL also doesn't work. |
I think the reason might be file access issues. Are you sure grafana user has write access to the dir |
In order to debug, check logs after clicking
In case of file access error:
Also, check redirect URLs. When you click Connect with Strava button, you should be redirected to strava and URL should be like:
Check
Make sure URL contains @josevnz Error |
@tdosek You get |
@NRKirby looks like you forgot to hit Connect with Strava button. |
I am getting this problem as well.
Any ideas? |
@bullboa the same issue as above - since you're on the |
All steps:
Not work. Same error all time. Again all fields are empty.
|
@alexanderzobnin |
One idea, can we not auth, just use That may be simple for users. |
@yihong0618 Using refresh token from the application page might be a good idea if you're using plugin only for your personal access. But in general, one Strava application can be used for accessing multiple users. In this case each user will have its own refresh token. This is why I went recommended way for Strava authentication. I think I can add support for specifying refresh token for access your own data only. |
Got it. |
@memphisraines87 I'll take a look at the code, maybe there's a bug somewhere, sice error is happening while accessing |
Same problem here. I created the refreshtoken file manually, chmod 777 it, but it is never written. The POST to https://.../api/datasources/2/resources/auth gives me a 500 error with message : I get the correct callback URL, but with a slash between my datasource ID and the ?state... it's the only difference I see with your explanation earlier : Here is my full log after clicking 'Connect to strava', 'authorize' and 'save and test' :
|
Hello, I followed the same steps as @memphisraines87 above after fresh install of grafana 8.0.0 and got the same error, manually creating Even though I did |
I finally made it work after deleting and recreating the datasource from the grafana UI |
Here's a top tip: When you double click on the client secret on strava.com/settings/api to copy it, there's an extra space at the end of the |
I added new option for the authentication. Now you can use refresh token from the application page. This is mostly workaround for people who cannot connect with default option. This way has some limitations - you can only log in by yourself (using default option you can authenticate any Strava user). Also, remember that refresh token can change and old value won't work anymore:
I ran into some issues while testing - when I used default auth after refresh token, it stopped working and returned 401. |
@alexanderzobnin that is cool |
Please, try to check refresh token auth and let me know if issue still persists. |
Thanks for the super cool plugin! Just FYI: I tried the "Connect with Strava" button but got 401. I got the log below so there may be a problem with permissions.
I deployed Grafana 8.3.3 with the Kubernetes manifest on docs and did In my case, manually creating kubectl exec -it $PODNAME -- /bin/sh
echo $REFRESH_TOKEN > /var/lib/grafana/strava/1-refreshToken
# then click "Save & Test" button However, since the plugin is also running as |
I can confirm the issue... token still gets written to /number-refreshToken I could workaroung by creating an empty file /number-refreshToken and chown'ing it to the grafana user. before hitting "save and test" |
I think this issue should be fixed in latest release. Please, test it out and let me know if I can close this one. |
Okay, so after adding trying to add the data source multiple times it finally worked. First i added the client id and the secret and pressed Save & Test. Seems like there is some improvements that still can be done to make the connect flow easier, but it works! |
I understand that this is an old issue, but maybe this will help someone. For some reason in the current latest version Grafana version: v10.4.0 (03f502a94d) I'm deploying grafana with docker compose like so: grafana:
image: grafana/grafana-enterprise
container_name: grafana
restart: unless-stopped
ports:
- '3000:3000'
networks:
- monitoring
environment:
- GF_INSTALL_PLUGINS=grafana-strava-datasource 1.6.1
Steps during dashboard creation
Strava Application details
|
@ernestre that's a bit strange - I've got no issues with 1.7.0. Could you show exact error you had? |
Yep, sure.
Also there's no Some logs from 1.6.1 when clicking Connect with strava
And then after clicking save & test
Strangely there are similar errors in 1.6.1 but after clicking save I get a green success message and dashboards are working |
I've made some fixes and improvements in auth process, you can upgrade to 1.7.1 and try again. Not sure it fixes your error, I could not manage to replicate it exactly, but have some related fixes. |
Also, make sure |
It did indeed let me authenticate and vie my data, thanks |
This was the thing I was missing in 1.7.0 😅 after enabling externalServiceAccounts feature everything started working as expected. In 1.7.1 everything works also with that env variable and without it, Thanks ! |
yes, this flag is important for self-hosted grafana. In Grafana Cloud it's enabled by default, so I just forgot to mention it in the docs. Now it's fixed. |
Hi,
This looks to be a great plugin but I am having trouble connecting to the Strava API.
I am running a grafana server locally in a docker container but I am getting the following error:
I have done the following:
grafana-cli plugins install grafana-strava-datasource
/var/lib/grafana/strava
export GF_STRAVA_DS_DATA_PATH=/var/lib/grafana/strava/
Client ID
andClient Secret
from an app created in my Strava accountDo you know how I can solve this issue please?
The text was updated successfully, but these errors were encountered: