forgejo/docs
31
58
Fork
You've already forked docs
249

Issue tracker preview weakness #579

Closed
opened 2024年05月01日 10:32:09 +02:00 by KalleMP · 4 comments

I experienced a failure in the issue tracker when trying to submit a comment in a issue thread 5 weeks ago and a week ago under what I think were similar conditions.

I have not tried to replicate further as it is not something that I expect will commonly happen and may even be hard to replicate for an active user.

I will link too an older issue here that MIGHT have something in common but I have no real experience as I am not an active coder or issue tracker user here or elsewhere.

This issue mentions preview and secrets so perhaps it may provide insight into the old problem or my experience.

My problem showed up twice in the following way. I type a long formatted reply in an issue and want to preview it to see that the formatting tags are correctly closed and working as expected. I receive some error and my submission is GONE and I see no way to retrieve it. Going back a page leave the issue in question and going forward has no edits.

What I think caused the issue is that the issue tracker page had been left open for a long duration of many days, perhaps more than a week (while I was debugging the application slowly) and had been through more than one Firefox restart and Linux Mint reboot in the time. I am assuming that some session cookies had expired and had I been omniscient or at least precognitive I would have known to reload the page before starting to edit so that pressing the preview button would not have caused the catastrophe. When drafting my new reply I prophylactically saved a copy of the markup text before selecting preview in case it would fail again but it has always worked if the issue has been recently refreshed. Granted that the issue in question had an interim submission the first time it failed and a title edit the second time it failed so that MIGHT have made the issue worse but I do not know.

Thank you for maintaining a great source repository and I hope my problem does not have far reaching harms. It seems unlikely to affect a regular user who replies to issues in the same session that they opened the thread as I have only had it happen on those two occasions.

EDIT:
As requested my best guess for how the problem appears.

  1. Open issue on issue tracking page in new tab
  2. Close browser
  3. reboot linux
  4. open browser
  5. Add reply comment
  6. Press Preview button
  7. Some strange error appears that made me think of sessions, cookies or permissions but not something I have seen before
  8. I think it was still in the Write tab but the tab was empty.
  9. Back button returned to previous page
  10. Forward button returns but edit tab is EMPTY
  11. New edit works as expected

Points 3 and/or 4 may have been repeated many times with the issues tab left open but not reloaded.

Further EDIT:

I tried to see if it would reproduce in this issue section after one browser close and one reboot and at least part of the problem reoccurred with an error message, possibly the same one that panicked me.

  1. After I edited this message yesterday.
  2. I Closed browser
  3. I closed laptop (I think it hibernated, login screen was activated)
  4. I logged in
  5. The browser was still open on this tab
  6. I started a new comment
  7. I pressed the Preview button and received the following error Bad Request: invalid CSRF token
  8. The preview was blank
  9. Pressing Write brought back my text (Yay)
  10. Pressing reload page preserved my text (Yay)
  11. Pressing Preview STILL showed a BLANK preview but no error
  12. Pressing Write returned to my text
  13. Editing a few characters and pressing Preview displayed the correct preview

It seems that had I not panicked and pressed Page Back on the error screen it might have preserved my text on returning to the Write tab and a Page Reload might have reset the CSRF token and allowed me to preserve my edit. I hope this is reproducible.

I am using recent install of Linux Mint, with a recent version of Firefox.

Mozilla Firefox for Linux Mint 
mint-001 - 1.0
Updates disabled by your system administrator
123.0.1 (64-bit)
System:
 Kernel: 5.15.0-105-generic x86_64 bits: 64 compiler: gcc v: 11.4.0 Desktop: Xfce 4.18.1
 tk: Gtk 3.24.33 info: xfce4-panel wm: xfwm 4.18.0 vt: 7 dm: LightDM 1.30.0
 Distro: Linux Mint 21.3 Virginia base: Ubuntu 22.04 jammy
I experienced a failure in the issue tracker when trying to submit a comment in a issue thread 5 weeks ago and a week ago under what I think were similar conditions. I have not tried to replicate further as it is not something that I expect will commonly happen and may even be hard to replicate for an active user. I will link too an older issue here that MIGHT have something in common but I have no real experience as I am not an active coder or issue tracker user here or elsewhere. This issue mentions [preview and secrets](https://codeberg.org/forgejo/docs/pulls/5) so perhaps it may provide insight into the old problem or my experience. My problem showed up **twice** in the following way. I type a long formatted reply in an issue and want to **preview** it to see that the formatting tags are correctly closed and working as expected. I receive some error and my submission is GONE and I see no way to retrieve it. Going back a page leave the issue in question and going forward has no edits. What I think caused the issue is that the issue tracker page had been left open for a **long duration** of many days, perhaps more than a week (while I was debugging the application slowly) and had been through more than one Firefox restart and Linux Mint reboot in the time. I am assuming that some session cookies had expired and had I been omniscient or at least precognitive I would have known to reload the page before starting to edit so that pressing the preview button would not have caused the catastrophe. When drafting my new reply I prophylactically saved a copy of the markup text before selecting preview in case it would fail again but it has always worked if the issue has been recently refreshed. Granted that the issue in question had an **interim submission** the first time it failed and a **title edit** the second time it failed so that MIGHT have made the issue worse but I do not know. Thank you for maintaining a great source repository and I hope my problem does not have far reaching harms. It seems unlikely to affect a regular user who replies to issues in the same session that they opened the thread as I have only had it happen on those two occasions. **EDIT:** As requested my best guess for how the problem appears. 1. Open issue on issue tracking page in new tab 2. Close browser 3. reboot linux 4. open browser 5. Add reply comment 6. Press **Preview** button 7. Some strange **error** appears that made me think of sessions, cookies or permissions but not something I have seen before 8. I think it was still in the **Write** tab but the tab was empty. 9. Back button returned to previous page 10. Forward button returns but edit tab is EMPTY 11. New edit works as expected Points 3 and/or 4 may have been repeated many times with the issues tab left open but not reloaded. **Further EDIT:** I tried to see if it would reproduce in this issue section after one browser close and one reboot and at least part of the problem reoccurred with an error message, possibly the same one that panicked me. 1. After I edited this message yesterday. 2. I Closed browser 3. I closed laptop (I think it hibernated, login screen was activated) 4. I logged in 5. The browser was still open on this tab 6. I started a new comment 7. I pressed the **Preview** button and received the following **error** `Bad Request: invalid CSRF token` 8. The preview was blank 9. Pressing **Write** brought back my text (Yay) 10. Pressing **reload** page preserved my text (Yay) 11. Pressing **Preview** STILL showed a BLANK preview but no **error** 12. Pressing **Write** returned to my text 13. Editing a few characters and pressing **Preview** displayed the correct preview It seems that had I not panicked and pressed **Page Back** on the error screen it might have preserved my text on returning to the Write tab and a Page Reload might have reset the **CSRF token** and allowed me to preserve my edit. I hope this is reproducible. I am using recent install of Linux Mint, with a recent version of Firefox. ``` Mozilla Firefox for Linux Mint mint-001 - 1.0 Updates disabled by your system administrator 123.0.1 (64-bit) ``` ``` System: Kernel: 5.15.0-105-generic x86_64 bits: 64 compiler: gcc v: 11.4.0 Desktop: Xfce 4.18.1 tk: Gtk 3.24.33 info: xfce4-panel wm: xfwm 4.18.0 vt: 7 dm: LightDM 1.30.0 Distro: Linux Mint 21.3 Virginia base: Ubuntu 22.04 jammy ```
Author
Copy link

Hmm, the link to the other issue (looks like it was a pull in the document repository) in the text above vanished.

I add it as text #5

Also as a direct link

And in facebook bowdlerized form codeberg . org / forgejo / docs / pulls / 5

It looks like the missing link was just too many square brackets

Hmm, the link to the other issue (looks like it was a pull in the document repository) in the text above vanished. I add it as text https://codeberg.org/forgejo/docs/pulls/5 Also as a [direct link](https://codeberg.org/forgejo/docs/pulls/5) And in facebook bowdlerized form codeberg . org / forgejo / docs / pulls / 5 It looks like the missing link was just too many square brackets
Contributor
Copy link

Could you describe how to reproduce the problem with chronological steps at https://codeberg.org/forgejo/forgejo/issues? It will be easier than explaining in plain English. This is a documentation repository and not the best fit for this kind of bugs. 🙏

Could you describe how to reproduce the problem with chronological steps at https://codeberg.org/forgejo/forgejo/issues? It will be easier than explaining in plain English. This is a documentation repository and not the best fit for this kind of bugs. 🙏

@KalleMP you should be able to edit your original message (... on the top right, then Edit). Which is better suited for the https://codeberg.org/forgejo/forgejo/issues issue tracker.

Apparently you did the following:

  • draft a comment
  • switch to the Preview tab
  • switch back to the Write tab
  • your comment was gone

I am unable to reproduce this issue (I drafted a comment and logged out in another tab: the Preview is broken, but going back to Write, the comment is still there).

@KalleMP you should be able to edit your original message (`...` on the top right, then `Edit`). Which is better suited for the https://codeberg.org/forgejo/forgejo/issues issue tracker. Apparently you did the following: - draft a comment - switch to the `Preview` tab - switch back to the `Write` tab - your comment was gone I am unable to reproduce this issue (I drafted a comment and logged out in another tab: the `Preview` is broken, but going back to `Write`, the comment is still there).
Contributor
Copy link

Closing as it is not reproducible.

Closing as it is not reproducible.
Sign in to join this conversation.
No Branch/Tag specified
next
v16.0
v15.0
v11.0
bp-v15.0-c7697f2
actions-remove-non-existing-strategy-options
v14.0
v13.0
v12.0
v7.0
v10.0
v9.0
v8.0
v1.21
v1.20
v1.19
v13.0.0-dev
Labels
Clear labels
404
Broken links or missing content
backport/v1.19
Changes which should be backported to the v1.19 docs

Archived

backport/v1.20
Changes which should be backported to the v1.20 docs

Archived

backport/v1.21
Changes which should be backported to the v1.21 docs

Archived

backport/v10.0
Automated backport to v10.0

Archived

backport/v11.0
Automated backport to v11.0
backport/v12.0
Automated backport to v12.0

Archived

backport/v13.0
Automated backport to v13.0

Archived

backport/v14.0
Automated backport to v14.0

Archived

backport/v15.0
Automated backport to v15.0
backport/v16.0
Automated backport to v16.0
backport/v7.0
Automated backport to the v7.0 docs

Archived

backport/v8.0
Automated backport to the v8.0 docs

Archived

backport/v9.0
Automated backport to the v9.0 docs

Archived

good first issue
This issue is suitable for "drive-by contributors" wanting to contribute for the first time, and fixing it should be straightforward.
meta
Tooling and processes for maintaining the docs
new docs
Content to be added to the documentation

Archived

User research - Accessibility
Requires input about accessibility features, likely involves user testing.
User research - Blocked
Do not pick as-is! We are happy if you can help, but please coordinate with ongoing redesign in this area.
User research - Community
Community features, such as discovering other people's work or otherwise feeling welcome on a Forgejo instance.
User research - Config (instance)
Instance-wide configuration, authentication and other admin-only needs.
User research - Errors
How to deal with errors in the application and write helpful error messages.
User research - Filters
How filter and search is being worked with.
User research - Future backlog
The issue might be inspiring for future design work.
User research - Git workflow
AGit, fork-based and new Git workflow, PR creation etc
User research - Labels
Active research about Labels
User research - Moderation
Moderation Featuers for Admins are undergoing active User Research
User research - Needs input
Use this label to let the User Research team know their input is requested.
User research - Notifications/Dashboard
Research on how users should know what to do next.
User research - Rendering
Text rendering, markup languages etc
User research - Repo creation
Active research about the New Repo dialog.
User research - Repo units
The repo sections, disabling them and the "Add more" button.
User research - Security
User research - Settings (in-app)
How to structure in-app settings in the future?
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/docs#579
Reference in a new issue
forgejo/docs
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?