grafana / strava-datasource

Strava datasource for Grafana dashboard
MIT License
188 stars 26 forks source link

401 Unauthorized - by connecting to Strava API #62

Closed vierzwerge closed 2 years ago

vierzwerge commented 2 years ago

After updating the version from 1.3 to 1.5 I'm not able to connect to Strava API anymore.

I always get the error message: "Cannot connect to Strava API: Token exchange failed: 401 Unauthorized" by clicking "Save & Test" in the "Data Source / Strava" section. And a short message appears: "Token exchange failed"

I also updated the parameter GF_STRAVA_DS_DATA_PATH as mentioned in the plugin description (and made the folder readable for grafana). But without any success.

In the logfile by restarting the grafana server these messages appear (don't know if this is the problem ... ) : "Could not read environment variable" variable=GF_STRAVA_DS_DATA_PAT" "Using default data path" path=/usr/share/grafana/.cache/strava-datasource"

With version 1.3 everything was ok.

Thank you for your support

RLutsch commented 2 years ago

I have the same issue, when I add the strava datasource in grafana it shows success and I got it to work briefly but stopped again.

When I check the logs I see error 401 Unautherized and the dashboards don't load.

RLutsch commented 2 years ago

so fixed it, to get it to work, whatch the logs in grafana then hit the save and test button a few times till it registers

beagle80 commented 2 years ago

Same problem here with version 1.5 (1.3 was ok): "Cannot connect to Strava API: Token exchange failed: 401 Unauthorized"

alexanderzobnin commented 2 years ago

Yes, this is a bug, unfortunately. I'm working on fix.

hopsor commented 2 years ago

I've just updated the plugin, restarted my instance and readded the data source and still experiencing the same 401 issue :-(

beagle80 commented 2 years ago

I've updated the plugin and was able to connect: 'Data source is working. Authenticated as XXX XXX'. But if I re-import the Dashboard I get: 'Error status: 401 Unauthorized' Thank you.

hopsor commented 2 years ago

yes, exactly the same issue I have

vierzwerge commented 2 years ago

I updated the plugin and now everything works for me :)

beagle80 commented 2 years ago

Yes, now I tried Auth type "OAuth" and it works also for me! Thank you! Looks really good! :-) Well done!

vierzwerge commented 2 years ago

I only added the datasource with OAuth (not with "Refresh Token"). And this works for me image

Many thanks !

hopsor commented 2 years ago

Will try that, thanks!

El 9 sept 2022, a las 20:01, vierzwerge @.***> escribió:

 I only added the datasource with OAuth (not with "Refresh Token"). And this works for me

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

wilmington commented 2 years ago

I'm still seeing the issue with grafana cloud and plugin version 1.5.1

status:500
statusText:""
data:Object
error:"Internal Server Error"
message:"Error status: 401 Unauthorized"
config:Object
url:"api/datasources/24/resources/strava-api"
method:"POST"
headers:Object
data:Object
retry:0
hideFromInspector:true
message:"Error status: 401 Unauthorized"
NeoPrint3D commented 10 months ago

Any new updates