Elevate: Cannot save heart rate zones

Created on 5 Jan 2018  ·  21Comments  ·  Source: thomaschampagne/elevate

Bug description:
Heart rate zones cannot be changed.
(or other zones, like cycle climbing)

Actual Behavior:
Zone settings can be changed, and saved. But upon refresh, the old settings are still there

Expected Behavior:
Changing any value and pressing "save" should save them.

Steps to Reproduce:
Change any zone, save it.
Go to a different page, then return to "set heart rate zone" page.
It will have the old settings

Chrome version
Vivaldi 1.13.1008.40, based on Chrome 62.0.3202.97

Plugin version:
5.12.1
Activities links?:

Console errors? (press F12 to see developer console, and copy paste here):

Fetch fitnessData from fitnessDataService.getFitnessData
FitnessDataService.js:68 Fetch fitnessObjectsWithDaysOff from fitnessDataService.getFitnessObjectsWithDaysOff
FitnessDataService.js:183 First preview day is Sat Jan 06 2018 00:00:00 GMT+0000 (GMT)
FitnessDataService.js:214 Generating FitnessData from storage took 369 ms.
fitnessTrendGraph.js:25 FitnessTrendGraph: message fitnessDataLoaded received
fitnessTrendGraph.js:267 Configure graph options
fitnessTrendTable.js:12 FitnessTrendTable: message fitnessDataLoaded received
fitnessTrendGraph.js:539 Generating Fitness Graph took 250 ms.
index.html#!/zonesSettings/heartRate:1 Unchecked runtime.lastError while running storage.set: QUOTA_BYTES_PER_ITEM quota exceeded
    at eval (chrome-extension://dhiaggccakkgdfcadnklkbljcgicpckn/options/app/directives/xtdZones/XtdZones.js:78:41)
    at Object.eval [as callback] (chrome-extension://dhiaggccakkgdfcadnklkbljcgicpckn/options/app/services/ChromeStorageService.js:78:17)
XtdZones.js:86 localStorageMustBeCleared has been updated to: true
11YearProgressController.js:260 Graph loaded
angular.js:14700 Possibly unhandled rejection: undefined
(anonymous) @ angular.js:14700
angular.js:14700 ARIA: Attribute " aria-label ", required for accessibility, is missing on node: <input ng-keypress=​"dialog.keypress($event)​" md-autofocus ng-model=​"dialog.result" placeholder ng-required=​"dialog.required" class=​"ng-pristine ng-valid md-autofocus md-input ng-not-empty ng-valid-required ng-touched" id=​"input_167" aria-invalid=​"false" style>​
(anonymous) @ angular.js:14700
index.html#!/zonesSettings/heartRate:1 Unchecked runtime.lastError while running storage.set: QUOTA_BYTES_PER_ITEM quota exceeded
    at eval (chrome-extension://dhiaggccakkgdfcadnklkbljcgicpckn/options/app/directives/xtdZones/XtdZones.js:78:41)
    at Object.eval [as callback] (chrome-extension://dhiaggccakkgdfcadnklkbljcgicpckn/options/app/services/ChromeStorageService.js:78:17)
XtdZones.js:86 localStorageMustBeCleared has been updated to: true
index.html#!/zonesSettings/heartRate:1 Unchecked runtime.lastError while running storage.set: QUOTA_BYTES_PER_ITEM quota exceeded
    at eval (chrome-extension://dhiaggccakkgdfcadnklkbljcgicpckn/options/app/directives/xtdZones/XtdZones.js:78:41)
    at Object.eval [as callback] (chrome-extension://dhiaggccakkgdfcadnklkbljcgicpckn/options/app/services/ChromeStorageService.js:78:17)
XtdZones.js:86 localStorageMustBeCleared has been updated to: true
index.html#!/zonesSettings/heartRate:1 Unchecked runtime.lastError while running storage.set: QUOTA_BYTES_PER_ITEM quota exceeded
    at eval (chrome-extension://dhiaggccakkgdfcadnklkbljcgicpckn/options/app/directives/xtdZones/XtdZones.js:78:41)
    at Object.eval [as callback] (chrome-extension://dhiaggccakkgdfcadnklkbljcgicpckn/options/app/services/ChromeStorageService.js:78:17)
XtdZones.js:86 localStorageMustBeCleared has been updated to: true
angular.js:14700 mdMenu: The $mdOpenMenu method is deprecated. Please use `$mdMenu.open`.
(anonymous) @ angular.js:14700
11YearProgressController.js:260 Graph loaded
2angular.js:14700 mdMenu: The $mdOpenMenu method is deprecated. Please use `$mdMenu.open`.
(anonymous) @ angular.js:14700
index.html#!/zonesSettings/ascent:1 Unchecked runtime.lastError while running storage.set: QUOTA_BYTES_PER_ITEM quota exceeded
    at eval (chrome-extension://dhiaggccakkgdfcadnklkbljcgicpckn/options/app/directives/xtdZones/XtdZones.js:78:41)
    at Object.eval [as callback] (chrome-extension://dhiaggccakkgdfcadnklkbljcgicpckn/options/app/services/ChromeStorageService.js:78:17)
XtdZones.js:86 localStorageMustBeCleared has been updated to: true
AthleteSettingsController.js:48 userMaxHr has been updated to 177
AthleteSettingsController.js:30 localStorageMustBeCleared has been updated to true
AthleteSettingsController.js:48 userMaxHr has been updated to 178
AthleteSettingsController.js:30 localStorageMustBeCleared has been updated to true
index.html#!/zonesSettings/heartRate:1 Unchecked runtime.lastError while running storage.set: QUOTA_BYTES_PER_ITEM quota exceeded
    at eval (chrome-extension://dhiaggccakkgdfcadnklkbljcgicpckn/options/app/directives/xtdZones/XtdZones.js:78:41)
    at Object.eval [as callback] (chrome-extension://dhiaggccakkgdfcadnklkbljcgicpckn/options/app/services/ChromeStorageService.js:78:17)
XtdZones.js:86 localStorageMustBeCleared has been updated to: true

Link screenshots or youtube video link if necessary:

Most helpful comment

yes, this is the problem.

All 21 comments

@luisgutz Thanks for the report and logs. It seems to be your synced storage for the plugin which seems to have quota exceeded. Could you do that for me:

  1. Go to any zone settings with your chrome
  2. Press F12 like you have done/
  3. In the console copy/paste/enter this:
chrome.storage.local.getBytesInUse((bytesInUse) => {
    let storage = {
        bytesInUse,
        quotaBytes: chrome.storage.local.QUOTA_BYTES,
        percentUsage: bytesInUse / chrome.storage.local.QUOTA_BYTES * 100,
    };
    console.log(storage);
});

This will return something like: {bytesInUse: 1626377, quotaBytes: 5242880, percentUsage: 31.020679473876957}

Give me this result :)

Thanks for your help.

Tom

Hi Thomas,

This is the output of the command:

{bytesInUse: 2358341, quotaBytes: 5242880, percentUsage: 44.98178482055664}

So I guess I still have a bit of space available...

BTW thanks for looking at this so quickly

Luis

On 5 January 2018 at 19:46, Thomas Champagne notifications@github.com
wrote:

@luisgutz https://github.com/luisgutz Thanks for the report and logs.
It seems to be your synced storage for the plugin which seems to have quota
exceeded. Could you do that for me:

  1. Go to any zone settings with your chrome
  2. Press F12 like you have done/
  3. In the console copy/paste/enter this:

chrome.storage.local.getBytesInUse((bytesInUse) => {
let storage = {
bytesInUse,
quotaBytes: chrome.storage.local.QUOTA_BYTES,
percentUsage: bytesInUse / chrome.storage.local.QUOTA_BYTES * 100,
};
console.log(storage);
});

This will return something like: {bytesInUse: 1626377, quotaBytes:
5242880, percentUsage: 31.020679473876957}

Give me this result :)

Thanks for your help.

Tom


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/thomaschampagne/stravistix/issues/498#issuecomment-355647908,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAXf4rh8XN0E46vPuOxHMfkYLQIMn9Khks5tHnwUgaJpZM4RUzNs
.

Oh mistake from me. This get the local storage, not the synced one where you have the error.
Could you re-try with:

chrome.storage.sync.getBytesInUse((bytesInUse) => {
    let storage = {
        bytesInUse,
        quotaBytes: chrome.storage.sync.QUOTA_BYTES,
        percentUsage: bytesInUse / chrome.storage.sync.QUOTA_BYTES * 100,
    };
    console.log(storage);
});

I replaced chrome.storage.local by chrome.storage.sync

Thanks !

even less!

{bytesInUse: 9207, quotaBytes: 5242880, percentUsage: 0.17560958862304688}

Luis

On 5 January 2018 at 20:41, Thomas Champagne notifications@github.com
wrote:

Oh mistake from me. This get the local storage, not the synced one where
you have the error.
Could you re-try with:

chrome.storage.sync.getBytesInUse((bytesInUse) => {
let storage = {
bytesInUse,
quotaBytes: chrome.storage.local.QUOTA_BYTES,
percentUsage: bytesInUse / chrome.storage.local.QUOTA_BYTES * 100,
};
console.log(storage);
});

I replaced chrome.storage.local by chrome.storage.sync

Thanks !


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/thomaschampagne/stravistix/issues/498#issuecomment-355660112,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAXf4llBC3qWYod8Udm9UfpJc7rdNImTks5tHokJgaJpZM4RUzNs
.

Do you use fitness trend feature?

I mean by this you may have your history stored in plugin storage area.

If you click on the "3 points" and click "About'.

You should see: "History size: XXX MB."

What is yours?

History size: 2.2MB.

Luis

On 5 January 2018 at 21:04, Thomas Champagne notifications@github.com
wrote:

Do you use fitness trend feature?

I mean by this you may have your history stored in plugin storage area.

If you click on the "3 points" and click "About'.

You should see: "History size: XXX MB."

What is yours?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/thomaschampagne/stravistix/issues/498#issuecomment-355665087,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAXf4h4PU62wm-jVcOyKmb9nok2PQ2tPks5tHo5pgaJpZM4RUzNs
.

It is the same for me. I have history size 0,7MB

I'm having the same problem.
Synced history size: 1.26 MB
And no way to save power or heart rate zones.
If there's something more that we could do to help you...

I have the same problem.

Change Power Zones and save > Heartrate zones are default settings
Change Heart rate zones and save > Power zones are back to default settings

@JohanDH

  • The error occurs in new App?
  • Do you have a popup error message?
  • Do you have javascript error? (F12 console developer)

Thanks

Hi @thomaschampagne

  • App 6.0.2
  • No popup error message
  • The only message in the console when hitting the save button is "Mark localStorage to be cleared on next strava.com load"

Damn :/ No error message is terrible :/

What's the output of this in console?

chrome.storage.sync.getBytesInUse((bytesInUse) => {
    let storage = {
        bytesInUse,
        quotaBytes: chrome.storage.sync.QUOTA_BYTES,
        percentUsage: bytesInUse / chrome.storage.sync.QUOTA_BYTES * 100,
    };
    console.log(storage);
});

Result is: {bytesInUse: 6677, quotaBytes: 102400, percentUsage: 6.5205078125}

@JohanDH @luisgutz @delumerlino @davidcafor

Simple question... Do you have a google account linked to your chrome? (I mean that your are able to sync bookmarks, passwords, ... between various chrome/computer).

Because i use chrome.storage.sync to save zones in your chrome synced storage (for cross chrome usage). This might be the root cause if no google account is linked to the chrome you use.

Yes, my Google account is linked to Chrome.

Ok thanks. Again to @JohanDH @luisgutz @delumerlino @davidcafor

When you're not able to save your zones. Could you send this to console and print me result :)

chrome.storage.sync.get({zones: null}, (data) => {
    function byteCount(s) {
        return encodeURI(s).split(/%..|./).length - 1;
    }
    console.log("User zones item size saved: " + byteCount(JSON.stringify(data)) + " bytes" );
});

It calculate size of user zones item in sync storage (google limit is 8192 bytes (https://developer.chrome.com/extensions/storage#property-sync))

User zones item size saved: 6107 bytes

Ok I think i reproduce the problem.

  1. Go to Heart rate zone settings.
  2. Remove all HR zones to get only 3 zones. And save !
  3. Select Running Pace zones. Remove 1 pace zone. And save!
  4. Reload page (F5)
  5. Go to Heart rate zone settings.

9 HR zones are displayed instead of 3.

Are you experiencing this?

Tom

yes, this is the problem.

Problem solved on next release ;)

Thomas, still facing something similar.
On "Zones Settings" page, I deleted Z5-Z14 and hit SAVE, it gives me a "QUOTA_BYTES_PER_ITEM quota exceeded" error.
On Console ran your script(s) and it says:
User zones item size saved: 8092 bytes
{bytesInUse: 10195, quotaBytes: 102400, percentUsage: 9.9560546875}

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Djaouws picture Djaouws  ·  6Comments

thomaschampagne picture thomaschampagne  ·  43Comments

ndaman picture ndaman  ·  14Comments

wolfpackt99 picture wolfpackt99  ·  3Comments

biejoo picture biejoo  ·  11Comments