Skip to content
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

Cannot change milestone or assignee in 1.1 #1271

Closed
1 of 4 tasks
flomine opened this issue Mar 15, 2017 · 33 comments
Closed
1 of 4 tasks

Cannot change milestone or assignee in 1.1 #1271

flomine opened this issue Mar 15, 2017 · 33 comments
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Milestone

Comments

@flomine
Copy link

flomine commented Mar 15, 2017

  • Gitea version (or commit ref): 1.1.0
  • Git version: 2.1.4
  • Operating system: Debian GNU/Linux 8
  • Database (use [x]):
    • PostgreSQL
    • MySQL (MariaDB)
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    https://try.gitea.io seems offline. It returns 404
  • Log gist:

Description

Since update from 1.0.2 to 1.1.0, I cannot change (or assign) any milestone to any issue.
It goes back to the previous state. Nevertheless it works for labels. Same problem for assignee.
I don't have anything in log file.
How can I investigate ?

@flomine flomine changed the title Cannot change milestone in 1.1 Cannot change milestone or assignee in 1.1 Mar 15, 2017
@lunny
Copy link
Member

lunny commented Mar 16, 2017

I have tested on https://try.gitea.io, I can change them, but maybe it's web browser refresh problem?

@flomine
Copy link
Author

flomine commented Mar 16, 2017

I try on try.gitea.io and I have the same problem (repo test-bug for user flomine).
So this seems to be related to my browser. It worked well before the update to 1.1
My browser is firefox 52 (64 bits) linux version. I will try another one.

@flomine
Copy link
Author

flomine commented Mar 16, 2017

I did all my tests on try.gitea.io
It is clearly a problem with firefox because it works well with chromium.

I deactivated all modules in firefox and restart firefox -> same problem

I clear firefox cache -> It works at the begining then it starts to have this refreshment problem. But the difference is that now it works 1 time on 5 or 6 times milestone changes.
It seems to be related with the new feature that displays changes about milestones or assignee in the history of a repo. When I assign a milestone, the history changes then it goes back to the previous state.

I also tried with Firefox 51.0.1 on windows 7. I also notice this bug but it seems to appear less often.
One time over 10 milestone changes approximately

On chromium, I tried more than 10 times and I never experienced this problem.

I don't know if is is related but after emptied firefox's cache, it gave me error 500.

@lunny lunny added the type/bug label Mar 16, 2017
@lunny lunny added this to the 1.2.0 milestone Mar 16, 2017
@lunny lunny added the topic/ui Change the appearance of the Gitea UI label Mar 16, 2017
@jhasse
Copy link

jhasse commented Mar 17, 2017

Shouldn't the milestone be 1.1.x? It's quite a critical regression IMHO.

@pgaskin
Copy link
Contributor

pgaskin commented Mar 17, 2017

My test server is working fine. https://staging.geek1011.net

The only difference is I have applied the openid patch.

@lunny
Copy link
Member

lunny commented Mar 18, 2017

It will be backport v1.1.x. All bugs should be fixed in v1.2 and backport if needed to stable versions.

@bkcsoft
Copy link
Member

bkcsoft commented Mar 20, 2017

Added the backport-label :)

@bkcsoft
Copy link
Member

bkcsoft commented Mar 20, 2017

Interesting, it works fine in Chrome, but not in Firefox 😂

@lunny
Copy link
Member

lunny commented May 31, 2017

fixed by #1728

@lunny lunny closed this as completed May 31, 2017
@flomine
Copy link
Author

flomine commented Jun 9, 2017

I update to last version (4a3f404) and I still have the issue. I tried to clear cache.. Still the same :-(

@flomine
Copy link
Author

flomine commented Jun 9, 2017

How can I help to give more info about this issue ?

@lunny
Copy link
Member

lunny commented Jun 9, 2017

@flomine could you make some repos or issues which will fail on https://try.gitea.io and paste the link here?

@flomine
Copy link
Author

flomine commented Jun 9, 2017

here the issue to test. I cannot set a milestone with firefox.
https://try.gitea.io/flomine2/test-_1271/issues/1

@flomine
Copy link
Author

flomine commented Jun 9, 2017

Same problem for Assignee. But it works for label.

@lunny
Copy link
Member

lunny commented Jun 9, 2017

But have tried https://try.gitea.io/flomine2/test-_1271/issues/1 it works well on firefox on macOS

@flomine
Copy link
Author

flomine commented Jun 9, 2017

it works with firefox on windows 7 but not with firefox on linux(52.1.0 ESR 64bits or 53.0.3 64bits both on archlinux) . It works with chromium on linux.
So compared to my first report, it is better since it is now working on windows. But it is still a problem for me.

@lunny lunny reopened this Jun 9, 2017
@flomine
Copy link
Author

flomine commented Jun 14, 2017

So actually here are my test results:
bug present with firefox 53.0.3 (64 bits) under ubuntu 16.04
bug present with firefox 53.0.3 (64 bits) under archlinux
bug present with firefox ESR 52.1.0 (64 bits) under archlinux
no bug with chromium under archlinux
no bug with firefox under android
no bug with firefox under Win7 (since #1728)

@sapk
Copy link
Member

sapk commented Jun 14, 2017

Do you have any error in your browser console ? (Ctrl + Shift + K on firefox)

@flomine
Copy link
Author

flomine commented Jun 14, 2017

@lafriks
Copy link
Member

lafriks commented Jun 14, 2017

If you open labels/milestones setting page does it show correctly or do you get 404 page? I have such situation for migrated gogs to gitea server. And then also labels/milestones/assignees can not be changed.

@flomine
Copy link
Author

flomine commented Jun 14, 2017

no everything is ok on setting page. No 404 page.
My server (migration from gogs to gitea) has this bug.
Nevertheless, the bug is also present here https://try.gitea.io/flomine2/test-_1271/issues/1

@schmittlauch
Copy link
Contributor

schmittlauch commented Jun 21, 2017

@flomine Which add-ons do you have installed? In #2021 I found Disconnect, PrivacyBadger, and FoxyProxy Standard Edition to cause this issue.

@flomine
Copy link
Author

flomine commented Jun 21, 2017

before #1728, bug was present under windows and Linux even without Firefox add-ons.
But now it is quite different (maybe not exactly the same bug). Indeed, if I deactivate Ghostery add-on, the bug disappers and sometimes leads to a 404 or 500 page.

@schmittlauch
Copy link
Contributor

Apparently the POST request to /user/repo/issues/1/assignee is never made with one of the add-ons enabled.

It'd be great if someone with better JS frontend debugging skills could take a look how the control flow differs with an add-on enabled vs. an add-on disabled. The issue is really easy to reproduce, just look at the particular add-on issues linking to #2021.

@bkcsoft
Copy link
Member

bkcsoft commented Jun 26, 2017

Running Fx 54.0. Disabling PB and Social Disconnect does not fix this issue 🙄

@schmittlauch
Copy link
Contributor

@bkcsoft Can you try again using a new Firefox profile (e.g. by using firefox --ProfileManager)?
If the issue doesn't appear in a fresh Firefox profile, you have to try out which of your normal addons causes this by deactivating all but one at a time. If the cause is a bug in Firefox's addon system itself, it's not unlikely that other addons can also cause this issue.

@bkcsoft
Copy link
Member

bkcsoft commented Jun 26, 2017

Well, I found the issue actually... It's a code issue, not a plugin issue :)

https://github.com/go-gitea/gitea/blob/master/public/js/index.js#L207 and https://github.com/go-gitea/gitea/blob/master/public/js/index.js#L233 aren't setting an appropriate action 🙄

EDIT: not it 🙄

@schmittlauch
Copy link
Contributor

If this fixes the issue - great. Nevertheless I ask myself why this issue didn't appear without certain addons being enabled and whether that's a valid behaviour (comparable to the old-days quirks mode)

@schmittlauch
Copy link
Contributor

@bkcsoft As you seem to be much fitter than I in frontend JS debugging, can you find out how the control flow/ code path differs in a fresh profile (given the issue doesn't appear there) and in a profile where this issue appears?
This can be very useful for add-on developers.

@bkcsoft
Copy link
Member

bkcsoft commented Jun 26, 2017

Well, it's a code-issue, it reloaded the page before it POSTed 😂 https://gist.github.com/bkcsoft/4b655d32f969ff905926bfedfb5f6f97 <-- patch

Buuut now I have to press "unassign" twice because the first time it throws a 500 error 😂 https://gist.github.com/bkcsoft/e934aacc064fb767a304db53da2ea128 <-- errorlog

@schmittlauch
Copy link
Contributor

schmittlauch commented Jun 27, 2017

In a Firefox with a fresh profile or when using Chromium, the XML http request changing the assignment is sent but the script doesn't wait for a response and just reloads the page, nevertheless having changed the assignment.
With a "bad" addon active the XHR is never sent though.

it reloaded the page before it POSTed

So at least in the "working" condition that's not true. It sends the POST XHR but doesn't wait for the response and instead reloads. (Still weird behaviour IMHO)

@knixeur
Copy link
Contributor

knixeur commented Jun 28, 2017

As @schmittlauch said this is because XHR is not finished before page reloads.
It works fine on Chrome, not on Firefox for me, and I bet it's not directly related to any plugin but to how events are handled and race conditions.
You can easily test this by settings a break point at index.js line 194 https://github.com/go-gitea/gitea/blob/master/public/js/index.js#L194
When that breakpoint is hit, you give Firefox enough time to complete the request and "it works".

I was reviewing the code and as function selectItem is only used for milestone and assigned the code could be changed to do a location.reload after issuing a updateIssuesMeta by sending an afterSuccess call back.
That location.reload is called from https://github.com/go-gitea/gitea/blob/master/public/js/index.js#L222 the event is trigged when the dropdown is hidden https://semantic-ui.com/modules/dropdown.html#/settings onHide https://github.com/go-gitea/gitea/blob/master/public/js/index.js#L192

knixeur added a commit to knixeur/gitea that referenced this issue Jun 28, 2017
location.reload was being called when the related dropdown
was hidden, even if a request initiated before to update this
value hadn't finished. This caused troubles on Firefox.
@lunny lunny closed this as completed in 858197b Jun 28, 2017
@UziTech
Copy link

UziTech commented Sep 28, 2017

I'm running into this issue on v1.2.0-rc3 and https://try.gitea.io

The first time I try to change the assignee it gives a 500 error. If I click on the same assignee again it works.

Version 62.0.3202.29 (Official Build) beta (64-bit)
Windows 10 Pro Build 16296.rs3

gitea-error

@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

No branches or pull requests

10 participants