Giter Site home page Giter Site logo

ianperrin / mmm-strava Goto Github PK

View Code? Open in Web Editor NEW
48.0 48.0 15.0 773 KB

A MagicMirror Module for your Strava data.

Home Page: https://forum.magicmirror.builders/topic/457/mmm-strava?_=1616840157932

License: MIT License

CSS 11.02% JavaScript 63.54% HTML 10.30% Nunjucks 15.14%
magicmirror mmm-strava strava

mmm-strava's People

Contributors

dependabot[bot] avatar fewieden avatar ianperrin avatar khassel avatar kostavro avatar lavolp3 avatar peet86 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mmm-strava's Issues

How do I change the display type from table to chart?

Hi Ian

Really like the Strava feature im just struggling to change the display type from table to chart any advise for a newbie?

Thanks

Damon

When submitting a new issue, please supply the following information:

Platform (Hardware/OS):

Node Version:

MagicMirror Version:

Description: Provide a detailed description about the issue and include specific details to help us understand the problem. Adding screenshots will help describing the problem.

Steps to Reproduce: List the step by step process to reproduce the issue.

Expected Results: Describe what you expected to see.

Actual Results: Describe what you actually saw.

Configuration: What does the used config.js file look like? Don't forget to remove any sensitive information!

Additional Notes: Provide any other relevant notes not previously mentioned. This is optional.

Strava Chart - Week starts on wrong date

Like it or not, the strava week starts on a Monday, and in the chart mode starts on a Sunday, and shows last sundays results. IMO, weekly results should mirror how strava counts it.

edit ah it seems its based on the locale, changing to "en-GB" starts the weekday on a Monday, and mirrors how strava displays it on the website.. perhaps a 'feature' would to be forcing the start date for the week?

Feel free to close if you're ok with it as is, as I have the results I want now :P

Module shows empty Chart

I’ve installed the Strava module, the data displays correcty in “table” mode. When I switch the mode to “Chart” the weekly chart is empy. No data is visible, only a empty graph.

Any suggestions?

Module not aggregating virtual activities - fix

When submitting a new issue, please supply the following information:

Platform (Hardware/OS): Raspberry Pi, Raspbian Buster

Node Version: latest

MagicMirror Version: latest

Description: The way that virtual activities are aggregated (by adding e.g. virtualride to ride activity types) does not work correctly. The technique is to lower case each activity type and replace any ‘virtual’ substring with nothing. However, the call used, ....replace(‘virtual’), omits a replacement string which now defaults to ‘undefined’ so the activity name becomes ‘undefinedride’ and is not summed with ‘ride’ activities. Fix is to amend the replace call with ...replace(“virtual”,””)

Module shows "strava currently unavailable"

Hi,

after running a while (sometimes some hours sometimes 2 days) the module shows:
"strava currently unavailable" .
Looking into the logs the following error occurs and seems to be the reason ?!:
[ERROR] (node:1) UnhandledPromiseRejectionWarning: RequestError: Error: read ECONNRESET
at new RequestError (/opt/magic_mirror/modules/MMM-Strava/node_modules/request-promise-core/lib/errors.js:14:15)
at Request.plumbing.callback (/opt/magic_mirror/modules/MMM-Strava/node_modules/request-promise-core/lib/plumbing.js:87:29)
at Request.RP$callback [as _callback] (/opt/magic_mirror/modules/MMM-Strava/node_modules/request-promise-core/lib/plumbing.js:46:31)
at self.callback (/opt/magic_mirror/modules/MMM-Strava/node_modules/request/request.js:185:22)
at Request.emit (events.js:314:20)
at Request.onRequestError (/opt/magic_mirror/modules/MMM-Strava/node_modules/request/request.js:877:8)
at ClientRequest.emit (events.js:314:20)
at TLSSocket.socketErrorListener (_http_client.js:427:9)
at TLSSocket.emit (events.js:314:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
[14.07.2023 22:00.38.180] [ERROR] (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 686)

After restarting Magic Mirror everything works fine, but the error occurs from time to time.

Am I doing sth. wong or can that be fixed/handled in the code ?

Thx and regards
Jan

Enhancement wishes

Hi Ian,

thank you for your strava module!

I‘m building my first MM and your module is a must for a cyclist.

There are 2 wishes.

In Table-mode I miss the altitude difference:

grafik

Second wish: My girlfriend is cyclist too. So I tried a second module in MM, but this doesn‘t work. To compare 2 strava profiles I appreciate to see e.g. the cycle activities one below the other:

grafik

The screenshots are not build with photoshop, I changed your code already … and modified the following files:

node_helper.js
StravaAPI.js
MMM-Strava.js

So if you are interested in this changes let me know how to push them to your repository.

Thanks,

Karsten.

P.S.: Sorry for my bad english ...

429 rate limit exceeded with default settings and with modified settings

When submitting a new issue, please supply the following information:

Platform (Hardware/OS):
rpi4b/piOS

Node Version:

MagicMirror Version:
latest (yesterday)

Description:
Getting error 429 (Rate Limit Exceeded).

Steps to Reproduce: It ust works for some time following day, then gets 429 again.

Expected Results: Table

Actual Results: Error

Configuration: What does the used config.js file look like? Don't forget to remove any sensitive information!
{
module: "MMM-Strava",
position: "left",
config: {
client_id: "secret_id",
client_secret: "secret_secret",
mode: "chart",
activities: ["nordicski", "run","swim",],
period: "ytd",
// period: "all",
stats: ["count", "distance", "moving_time", "elevation",],
digits: "3",
updateInterval: "300000",
reloadInterval: "86400000",
}
},

Additional Notes:
i might just mess up or don't understand what im doing. am pretty new to this. help!
Strava says this: "Rate Limits: 100 requests every 15 minutes, 1000 daily"

node_helper logging does not work anymore

Platform (Hardware/OS): RPi 3b+

Node Version: 11.4

MagicMirror Version: 2.6.0

Description:

Looging from node_helper does not work anymore since identifiers have been included. this.config is not valid anymore,you now have a configs array.

Steps to Reproduce:
set debug to true. Check logs in console with npm start dev

Expected Results:
Logs :-)

Actual Results: No logs
:-)

Chart only includes the first 200 activities for the chosen period

When submitting a new issue, please supply the following information:

Platform (Hardware/OS): Virtual VMware machine, Ubuntu1804

Node Version:
Skärmklipp
screen

MagicMirror Version:2.10.1

Description: I don´t get stats from July and august. There have been som API changes in late June, does this version support them? I have attached a jpg, there are a lot of stats from july but they are not shown.

Configuration:

{
      module: "MMM-Strava",
        position: "top_left",
	header: 'Strava cykling 2020',
        config: {
		client_id: "xxxx",
client_secret: "xxxx",
mode: "chart",
		period: "ytd",            
	activities: ["ride"],
	reloadInterval: "3600000",
updateInterval: "3600000",
        },
    },

Additional Notes: Provide any other relevant notes not previously mentioned. This is optional.

Not an issue...

Hi, just to say thanks for writing a great a module with even better installation instructions. They are officially idiot proof!!!

Cheers.

Chart mode displaying wrong time and not refreshing.

Hi,
The time displayed under the distance (e.g. for Running) is incorrect.
On Monday I have run for 43 minutes (screenshot from Strava portal):
strava screenshot

However, the MagicMirror screen shows 1h43min:

magicmirror screenshot

Looks like it adds an extra hour on the first entry! :)
When second entry was added - the total time is calculated correctly.

Empty chart displayed for virtual activities

When submitting a new issue, please supply the following information:

Platform (Hardware/OS):
Raspberry Pi 4

Node Version:
6.14.15

MagicMirror Version:
v2.16.0

Description: Virtual Rides are are not aggregated with Rides

Steps to Reproduce: Install module, have some virtual rides and rides in the own activity feed. They wont be shown together if i select "Ride" as single category

Expected Results: Combined stats (virtual ride + ride)

Actual Results: just ride

Configuration:

    {
      module: 'MMM-Strava',
      position: 'top_right',
      header: "phil' strava",
      config: {
        client_id: '******',
        client_secret: '*****************',
        activities: [
          'ride',
          'run',
          'hike'
        ],
        mode: 'chart',
        period: 'ytd'
      }
    },

Additional Notes:
I saw that issue #31
Does that indicate the same problem? After some research i found some replace code in node_helpers. But it dont work yet.

additional activities

Feature request / Question:
Is it possible to retrieve additional activities (besides running, swimming, cycling) from Strava and display them on the mirror?

If so, how?

Chart does not load

@ianperrin I am having a problem with chart and i have tried all the advice i can find.

Firstly i would like to thank you for a great module. It's awesome.

My module loads fine with mode: 'table' however if i change it to mode: 'chart' it sticks on "Loading". I have tried resettling the pi and various other things.

Also my distance symbol doesn't load. I have tried to look in MMM-Strava.css to see where the symbol is loaded from but can only see the symbols for run, cycle & swim. Screen shot attached.

Any help you can give would be great.

Regards

Dan

screenshot 2019-01-12 at 17 18 50

edited to add some more information,

Sorry should have mentioned i have already run sudo apt-get update && sudo apt-get upgrade and i have also run #cd /home/pi/MagicMirror/modules/MM-Strava && git pull. I am using a pi 3b with jessie and have the lates MagicMirror installed.

Authentication Issue

Hi
I have an issue with the authentication. I have created a Strava API, Get the Client ID and the Client Secret, That is all done but still it doesn't work. I think it has something to do with the webadress, but I don't know which one I should use. Please I need your help.
Cheers

First weekday sunday :(

Hey!

Thanks for an awesome addon!
Could you please make it possible to choose the start of the week.
It appears to be stuck on Sunday 👎

Chart Mode Stuck at Loading

Hi there. The module is great! Using Table mode works fine...no problems. However, as soon as I add mode: "chart" I just get Loading on my mirror. That is the only setting I have in there. Am I missing something? Thanks!

Support different activities for different athletes?

I'd like to display one athlete's rides, and one athlete's runs. Each athlete only does one activity. When using the current support for multiple athletes, I tried something like this:

{
  module: 'MMM-Strava',
  position: 'bottom_right',
  config: {
    strava_id: ['1234567','567890'],
    access_token: [id_1, id_2],
    mode: 'table',
    activities: ['run', 'ride'],
    athlete_text: ['one', two'],
    auto_rotate: true,
    reloadInterval: 1800000,
    updateInterval: 30000,
    animationSpeed: 2500,
  }
},

This produces a chart in which "one" has zero rides, and "two" has zero runs. This isn't a big deal, but it would be nice(r) to support just the activities that each person does. No one likes to see a listing of "zero" for activities!

I'm trying to work around this by using two discrete MMM-Strava blocks, one for each athlete with just their activity listed. This worked in local Docker testing, but isn't working so well when deployed to a RPi Zero W: one rider's activities show up, and the other just says "Loading..." No obvious error messages are being reported by the Mirror.

Displaying stats for multiple athletes using a single API key

Hi Ian, love your module and I have been a supporter for many years. However I am trying to add two separate athletes and rather than seeing two different charts i see two of the same chart. I tried implementing it first by:

{
module: "MMM-Strava",
position: "top_right",
config: {
client_id: ["id1, "id2"],
client_secret: ["secret1, secret2"],
}
}

To no avail. It ignored id2 and secret2. So then reading the closed thread you said that making an entire new module block for athlete 2 would work so that's what i did:

{
module: "MMM-Strava", //athlete1
position: "top_right",
config: {
client_id: "id1",
client_secret: "secret1",
activities: ["run", "ride"],
}
}
{
module: "MMM-Strava", //athlete2
position: "top_right",
config: {
client_id: "id2",
client_secret: "secret2",
activities: ["run"],

    }

}

And this time it asked me to authorise athlete2 which is great news!
After restarting though i now get TWO charts of athlete 1. (athlete1 comes first in the config.js). I then isolated athlete2 by commenting out athlete1's module and I was able to get athlete2's chart.

2020-05-07 14_07_22-Lacey's Mirror (raspberrypi) - VNC Viewer

But I can't get it to display athlete 1 and athlete 2's chart simultaneously. Any tips or is this not supported?

Thanks for your hard work! Much Appreciated.

Sign in problems

Hi there,
first of all, awesome project. Thanks to all the contributors here for any project.
At first i had no idea of any programming but after 2 weeks of holidays I learned a lot.
Of course i wanted to install Strava as well, but i guess i have problems in the simpliest situation and cant find the mistake.
I installed everything, wrote code into the config.js but have always the same problem. Its loading only and telling me in terminal it has a problem error:
"Error performing request: Unautherized. Access Token will be reset."
The request can be found also at Strava
image
I copied the ID and access token several times, even tried client token, without success.

Any recommendations?

Module silently fails to load.

Adding the module to MagicMirror results in a constant "Loading..." message, no messages are produced in the console, so I'm having a hard time debugging.

Any suggestions?

MMM-Strava is no longer working?

When submitting a new issue, please supply the following information:

Platform (Hardware/OS): Raspberry 4B

Node Version: 9.5.1

MagicMirror Version: 2.22.0

Description: Got error message on MagicMirror display with error message "Strava Authorisation has changed. Please update your config".

Steps to Reproduce: run MM
Expected Results: my ride stats on Strava
Actual Results: got text "Client id unauthorised - please visit /MMM-Strava/auth"

Configuration:

{ 
			module: 'MMM-Strava',
			classes: 'default everyone',
			position: "top_left",
			config: {
				strava_id: '25594789',
				access_token: '[REMOVED]',
				client_id: '21378',
				client_secret: '[REMOVED]',
				mode: 'chart',
				//activities: ["run", "ride", "swim"],
				activities: ["ride"],
				auto_rotate: true,
				updateInterval: 10 * 1000,
				reloadInterval: 60 * 60 * 1000,
				animationSpeed: 2500,
			}
		}

Additional Notes:
Got following error log on MM logs:

[25.02.2023 13:19.12.221] [WARN]  Unhandled rejection StatusCodeError: 401 - {"message":"Authorization Error","errors":[{"resource":"Application","field":"","code":"invalid"}]}
    at new StatusCodeError (/home/slametps/work/MagicMirror/modules/MMM-Strava/node_modules/request-promise-core/lib/errors.js:32:15)
    at Request.plumbing.callback (/home/slametps/work/MagicMirror/modules/MMM-Strava/node_modules/request-promise-core/lib/plumbing.js:104:33)
    at Request.RP$callback [as _callback] (/home/slametps/work/MagicMirror/modules/MMM-Strava/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at Request.self.callback (/home/slametps/work/MagicMirror/modules/MMM-Strava/node_modules/request/request.js:185:22)
    at Request.emit (node:events:513:28)
    at Request.<anonymous> (/home/slametps/work/MagicMirror/modules/MMM-Strava/node_modules/request/request.js:1154:10)
    at Request.emit (node:events:513:28)
    at IncomingMessage.<anonymous> (/home/slametps/work/MagicMirror/modules/MMM-Strava/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (node:events:627:28)
    at IncomingMessage.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1358:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

MM-error-MMM-Strava-unauthorized

502 - undefined

When submitting a new issue, please supply the following information:

Platform (Hardware/OS): Raspberry Pi 3B/Buster

Node Version: v14.17.0

MagicMirror Version: 2.15.0

Periodically, I haven't been able to determine the frequency, maybe after 20 minutes or so, the updates stop and I get a "502 - undefined" display. This will not go away on its own (e.g., next time the API is queried). I am unable to reproduce this at will.

image

UPDATE: This seems to have resolved itself. (I don't see a way to delete this issue, but I consider it resolved - thanks)

I have other modules (e.g., MMM-cta - Chicago Transit Authorithy) that update periodically that don't have this problem, so I don't think its a connectivity issue.

My config.js entry:

185        {
186            module: "MMM-Strava",  /* https://github.com/ianperrin/MMM-Strava */
187            position: "bottom_left",
188            header: "Strava Stats 2021",
189
190            config: {
191                client_id: "xxxx",
192                client_secret: "yyyy",
193                mode: "chart",
194                activities: ["run", "walk"],
195                stats: ["distance", "moving_time", "count"],
196                period: "ytd",
197            }
198        },

Reloading the screen fixes it temporarily (won't fix itself),

image

but I'm looking for a more permanent alternative/fix. Eventually, once a frame/mirror is built, this will be a gift to someone who is not very tech savvy. I really like this module - so thanks for making it available.

MMM-Strava only shows achievements, nothing else?

Hey all,

I installed MMM-Strava, followed the wonderfully documented instructions on how to get authentication tokens - but am having some issues. I think my authentication is fine, because the module shows my weekly achievements. But, it does not show ride #, distances or any other stats. Here is my config file and screenshot:

image

{
	module: "MMM-Strava",
	position: "bottom_left",
	config: {
		client_id: "XXXX",
		client_secret: "XXXXXXX",
		mode: "table",
		activities: "ride",
		reloadInterval: 1000*60*30,
		stats: ["count", "distance", "elevation", "moving_time", "achievements"]
	}
}

Here is the relevant output from npm start

> [email protected] start /home/pi/MagicMirror
> DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js

[2020-06-25 09:31:12.157] [LOG]    Starting MagicMirror: v2.11.0
[2020-06-25 09:31:12.191] [LOG]    Loading config ...
[2020-06-25 09:31:12.210] [LOG]    Loading module helpers ...

[2020-06-25 09:31:20.444] [LOG]    Initializing new module helper ...
[2020-06-25 09:31:20.446] [LOG]    Check MagicMirror version for node helper 'MMM-Strava' - Minimum version:  2.2.0 - Current version: 2.11.0
[2020-06-25 09:31:20.448] [LOG]    Version is ok!
[2020-06-25 09:31:20.450] [LOG]    Module helper loaded: MMM-Strava

[2020-06-25 09:31:22.042] [LOG]    Connecting socket for: MMM-Strava
[2020-06-25 09:31:22.044] [LOG]    Starting module helper: MMM-Strava

Support customisable stats in bar chart mode

Hey,
i love this module. But I've got a request. I prefer chart mode, to have an overview about every month.

I live in a very flat area with no hills and no heights: My elevation is nearly 0 and so i don't need this information. How can i change the elevation in "chart mode" to e.g. number of periods? With the config i only can to this for "table mode"

Thx in advance

Stats stopped updating if mode: "chart"

Platform (Hardware/OS): Raspberry Pi 3 with Raspian v 10 (buster)

Node Version: 6.14.13

MagicMirror Version: 2.16.0

Description: I installed this at the start of June. I specified mode: "chart" to also be able to track walks in addition to runs and everything worked great. However, in the last few weeks my stats didn't update. I finally tracked this to the mode parameter/setting. When I comment this out, or specify the default of "table" the stats get updated, but I don't get my walk mileage. In both cases the API calls get made (looking at the Strava dashboard) and I'm assuming the information is retrieved. It just doesn't get updated/displayed correctly if mode is set to "chart".

I believe that last update that worked with "chart" was July 19.

As part of my troubleshooting I updated everything and at some point reinstalled the module fresh before I was able to determine the mode setting to be the determining factor.

Configuration:

    config: {
	client_id: "xxx",
	client_secret: "yyy",
	mode: "table",
	activities: ["run", "walk"],
	stats: ["distance", "count"],
	period: "ytd",
	debug: true
    }

Additional Notes:

I posted about this here too

https://forum.magicmirror.builders/topic/15366/mmm-strava-stopped-updating/17?page=2

With mode: "chart" - incorrect miles and count

image

with mode: "table" - correct miles/count
image

Missing icon for activity "sail"

First of all thank you for this nice module.

Installing and configuring was a breeze, just one little thing is awkward: the icon for "sail" in chart-mode is missing. Can you direct me in fixing it myself?

Up until now I've tried creating an svg file, calling it icon-sail.svg and putting it in the folder /public/assets/images. I also added two lines of code in MMM-Strava.css:

.MMM-Strava .strava-icon.icon-sail { background-image: url(/MMM-Strava/public/assets/images/icon-sail.svg); }

Is there more I can do?

Client ID Not Authorized

When submitting a new issue, please supply the following information:

Platform (Hardware/OS):
Raspberry Pi 4B, 4GB
Raspbian GNU/Linux 10 (buster)

Node Version:
v16.15.0

MagicMirror Version:
v2.19.0

Description: I am getting client id not authorized, despite having my client ID and client secret correct (from Strava API page). I also have the whitelist setup correctly and can access my MM from my local browser (the MM itself is on a RPI4). I receive the link within the magic mirror and am redirected to the authorization page on Strava, but after clicking authorize and restarting MM, I am still getting the same client ID not authorized. In looking in electron, I do so a ERR_HTTP_HEADERS_SENT error message. Also, I do not see the tokens.json being generated in the MMM-Strava folder after clicking authorize for the Strava auth redirect site
Any help would be greatly appreciated. Screenshots below, along with details from Electron for the ERR_HTTP_HEADERS_SENT error

image

image

image

image

[03.05.2022 10:13.13.537] [ERROR] Whoops! There was an uncaught exception…
[03.05.2022 10:13.13.538] [ERROR] Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at new NodeError (node:internal/errors:371:5)
at ServerResponse.setHeader (node:_http_outgoing:576:11)
at ServerResponse.header (/home/jberk1984/MagicMirror/node_modules/express/lib/response.js:776:10)
at ServerResponse.location (/home/jberk1984/MagicMirror/node_modules/express/lib/response.js:893:15)
at ServerResponse.redirect (/home/jberk1984/MagicMirror/node_modules/express/lib/response.js:931:18)
at /home/jberk1984/MagicMirror/modules/MMM-Strava/node_helper.js:185:10
at /home/jberk1984/MagicMirror/modules/MMM-Strava/node_helper.js:451:5
at node:fs:2122:7
at FSReqCallback.oncomplete (node:fs:188:23) {
code: ‘ERR_HTTP_HEADERS_SENT’

Steps to Reproduce: See screenshots above

Expected Results: functional Strava module in magic mirror

Actual Results: Strava-MMM still stating client ID not authorized when running Magic Mirror

Configuration: What does the used config.js file look like? Don't forget to remove any sensitive information!

Additional Notes: in the MM forums, another poster (sdetweil stated the following:

so, this error is typically caused by some code doing two sends for an incoming request

the module sets up a little server to receive and does a redirect response…

but this could be an async problem
start sending one response, continue while it runs and then fall into another send… oops…

I only made a cursory look at the code. i have done similar things in some of my coding here and on other platforms.

I don’t ‘see’ it, but there is a library in there too

this says it is handling a callback on request complete,

line 185 is in the handling of the token auth . but the stravea lib is calling back into the function (function (err, payload, limits) at line 176
so the node_helper called strava, who called us back at the function on line 185 ( (err, data) => { (err, data) => { ) which does a redirect… WHILE the strava request to get the auth token handler is still active…

strava.oauth.getToken(authCode, function (err, payload, limits) {
			if (err) {
				console.error(err);
				res.redirect(`/${self.name}/auth/?error=${err}`);
				return;
			}
			// Store tokens
			self.saveToken(clientId, payload.body, (err, data) => {    // line 185
				// redirect route
				res.redirect(`/${self.name}/auth/?status=success`);
			});
		});

line 451, is in the end of the saveFile() function, supposedly to save the tokens.json

saveToken: function (clientId, token, cb) {
var self = this;
this.readTokens();
// No token for clientId - delete existing
if (clientId in this.tokens && !token) {
delete this.tokens[clientId];
}
// No clientId in tokens - create stub
if (!(clientId in this.tokens) && token) {
this.tokens[clientId] = {};
}
// Add token for client
if (token) {
this.tokens[clientId].token = token;
}
// Save tokens to file
var json = JSON.stringify(this.tokens, null, 2);
fs.writeFile(this.tokensFile, json, "utf8", function (error) {
if (error && cb) {
cb(error);
}
if (cb) {
cb(null, self.tokens); // line 451 --- this calls back into the ( (err, data) =>) function
}
})

at FSReqCallback.oncomplete (node:fs:188:23) {

Trouble Authenticating

Hi,

I've not quite got the module working yet, I'm quite new to this. I've followed the installation steps down to step 5, but I can't seem to authenticate the module. My Strava account is linked to my Google account and when I try to log in, I get a message saying the web browser isn't supported. Am I doing something wrong?

Suggestion : Goal and Gear

Love the app! Works great, but was thinking about expanding it.
I'm too rookie to change it myself, but a great addition would be to add the "goal" set for each category?
Strava offers a flat pacing, and the differences would be an great addition! Like below, perhaps only the "XX km behind" or "XX km ahead".

Another thing that popped up, was that if any gear is available, give the info of useage?
image

image

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.