New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 730064 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

getBudget() has some unexpected values

Reported by m...@gauntface.co.uk, Jun 6 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.10 Safari/537.36

Steps to reproduce the problem:
Unable to reproduce reliably as the budget is determined by the browser, but generally flow:

1. Enable experimental web platform features flag
2. Visit https://gauntface.github.io/budget-api-demo/src/index.html
3. Open devtools and view the console.
4. Click on the reserve and get budget buttons.

What is the expected behavior?

What went wrong?
Generally the budget always seems to decrease in the future, never increases.

At one point I received: 

At 'Mon Jun 05 2017 12:47:20' you will have a budget of '1'.
At 'Fri Jun 09 2017 10:42:57' you will have a budget of '0'.
At 'Fri Jun 09 2017 12:31:09' you will have a budget of '-1'.

It shouldn't be possible to get into negative values.

I just tried to recreate and got the following output:

At 'Tue Jun 06 2017 10:07:28 GMT-0700 (PDT)' your budget will be '0'.
At 'Sat Jun 10 2017 10:06:17 GMT-0700 (PDT)' your budget will be '0'.

Which doesn't seem useful, if the budget hasn't changed in the future, why include it?

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 60.0.3112.10  Channel: dev
OS Version: 
Flash Version:
 
Cc: ligim...@chromium.org
Components: Blink
Labels: Needs-Triage-M60
Cc: hdodda@chromium.org
Labels: Needs-Feedback
Tested the issue on ubuntu 14.04 using chrome dev M60 #60.0.3112.20 and issue is not reproduced with the below steps :

1. Enabled the experimental flag "Web platform features" .
2. Opened the given url ., budget site and clicked on run demo and reserve buttons and observed the console output 
3. Didn't observe any negative values and didn't observe same values of budget.

Attached screencast for reference.

@matt--Could you please update your dev version to latest and check if you can reproduce the issue and please check if we have missed any steps in reproducing the issue and update us with your comments.

Thanks!
730064.ogv
2.0 MB View Download
Components: -Blink Blink>PushAPI
Attached is a screenshot of a value that results is to zero entries - why bother showing a change of nothing?

Secondly with your example video, if you consider it from the developers point of view - "OK I don't have enough budget to do a silent push as I only have '1' budget, when will I be able to? Oh I can't because it's actually going to decrease to '0' in the future". In this case, why bother getting the future budget if it only decreases?
Screenshot from 2017-06-08 12:20:56.png
119 KB View Download
Project Member

Comment 5 by sheriffbot@chromium.org, Jun 8 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "hdodda@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: krajshree@chromium.org
Labels: Needs-Feedback
Tested the issue on Ubuntu 14.04 using chrome beta version #60.0.3112.32 and chrome dev version #61.0.3128.3.

Following are the steps followed to reproduce the issue.
------------
1. Enabled the flag "experimental web platform features" .
2. Opened the URL: https://gauntface.github.io/budget-api-demo/src/index.html.
3. Opened dev console.
4. Clicked on the reserve and get budget buttons.
5. Got the following in dev console.

At 'Fri Dec 07 49421 11:20:52 GMT+0530 (IST)' your budget will be '0'.
reserve.js:4 Was reserved? false
get-budget.js:5 At 'Fri Dec 07 49421 12:06:27 GMT+0530 (IST)' your budget will be '0'.
reserve.js:4 Was reserved? false

Attached a screen cast for reference.

Reporter@ - Could you please verify the screen cast and please let us know if anything missed from our side.
Also please upgrade chrome to latest dev and give a try. Please let us know if the issue still persist or not.

Thanks...!! 
730064.ogv
7.5 MB View Download
Ok this seems to be going in circles.

1.) I **was** able to get a negative value, although no one can reproduce.
2.) The issue of the budget only ever **decreasing** and never **increasing** raises the question of the use case for this API.

Neither of these issues seem like a concern so just close the issue, but I'm thoroughly lost as to the use case of an API that only indicates the decreasing nature of the budget, my impression from Peter was that the budget should would increase over time.
Project Member

Comment 8 by sheriffbot@chromium.org, Jun 15 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "krajshree@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Still unable to reproduce the issue on windows 7, Ubuntu 14.04 using chrome version 60.0.3112.32 and canary 61.0.3134.0.
Observed the same output 
2reserve.js:4 Was reserved? false
get-budget.js:5 At 'Sat Jun 27 49435 06:03:03 GMT+0530 (India Standard Time)' your budget will be '0'.
get-budget.js:5 At 'Sat Jun 27 49435 06:03:35 GMT+0530 (India Standard Time)' your budget will be '0'.
reserve.js:4 Was reserved? false

Not observed any decreasing number of budget.

Could any one from Blink>PushAPI dev team please look into this issue.Please confirm on this behaviour.

Thanks,
Could any one from Blink>PushAPI dev team please have a look into this issue as per comment #7 and please confirm on this behavior.

Thanks...!!

Comment 11 by peter@chromium.org, Jun 30 2017

Labels: -Needs-Triage-M60
Owner: peter@chromium.org
Status: Assigned (was: Unconfirmed)
Matt and I met regarding this issue - the summary of his question in #7 is that we cannot know when the budget will go up again. It'd increase based on the user's interactions with the website, which we cannot predict.

Regarding decreasing values - I cannot reproduce this either, but we should indeed investigate it.
Status: WontFix (was: Assigned)
We're planning to deprecate and remove the Budget API, so marking related bugs as WontFix.

Sign in to add a comment