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

[Bug Report] Tagger unrecoverable after Saving Invalid Regex #5481

Open
mr-szgz opened this issue Nov 17, 2024 · 2 comments
Open

[Bug Report] Tagger unrecoverable after Saving Invalid Regex #5481

mr-szgz opened this issue Nov 17, 2024 · 2 comments
Labels
bug report Bug reports that are not yet verified

Comments

@mr-szgz
Copy link

mr-szgz commented Nov 17, 2024

Describe the bug
When using the tagger, if you save invalid regex, the next load of tagger will throw with invalid regex error. This becomes unrecoverable as tagger will no longer load on any page, blocking access to tagger.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Scene listing page
  2. Click on Tagger
  3. Scroll down to add blacklist and enter invalid regex /(/gi
  4. press save w/o thinking
  5. See error: SyntaxError: Invalid regular expression: /(/gi: Unterminated group

Failed attempts:

  • Refresh shows repeated error
  • Clear browser cache has no apparent effect

Expected behavior

  • I expect that an error like this can be displayed on the tagger options form so I can fix it.
  • I expect that clearing my cache would resolve my issue.

Screenshots
page error:

Something went wrong.
Details
SyntaxError: Invalid regular expression: /(/gi: Unterminated group
    at Ka (https://stash.example.com/assets/SceneList-1d983d41.js:1:20924)
    at gn (https://stash.example.com/assets/SceneList-1d983d41.js:1:43845)
    at div
    at div
    at Ja (https://stash.example.com/assets/SceneList-1d983d41.js:1:26511)
    at fn (https://stash.example.com/assets/SceneList-1d983d41.js:1:44735)
    at An (https://stash.example.com/assets/ItemList-20c3aa7d.js:1:34558)
    at div
    at Xn (https://stash.example.com/assets/ItemList-20c3aa7d.js:1:35222)
    at ob2 (https://stash.example.com/assets/index-e7ce1972.js:44:420331)
    at lb2 (https://stash.example.com/assets/index-e7ce1972.js:44:420983)
    at m32 (https://stash.example.com/assets/index-e7ce1972.js:44:419850)
    at cb2 (https://stash.example.com/assets/index-e7ce1972.js:44:420125)
    at m32 (https://stash.example.com/assets/index-e7ce1972.js:44:419850)
    at Jn (https://stash.example.com/assets/ItemList-20c3aa7d.js:1:37017)
    at Wa (https://stash.example.com/assets/SceneList-1d983d41.js:1:9078)
    at rt (https://stash.example.com/assets/SceneList-1d983d41.js:1:53484)
    at si (https://stash.example.com/assets/Performers-820aabb4.js:1:6284)
    at div
    at t (https://stash.example.com/assets/index-e7ce1972.js:44:3626)
    at https://stash.example.com/assets/index-e7ce1972.js:44:11914
    at https://stash.example.com/assets/index-e7ce1972.js:44:107939
    at div
    at https://stash.example.com/assets/index-e7ce1972.js:44:107041
    at cqe (https://stash.example.com/assets/index-e7ce1972.js:44:106407)
    at gV (https://stash.example.com/assets/index-e7ce1972.js:44:110011)
    at vi (https://stash.example.com/assets/Performers-820aabb4.js:1:25145)
    at div
    at div
    at div
    at div
    at bi (https://stash.example.com/assets/Performers-820aabb4.js:1:26485)
    at wi (https://stash.example.com/assets/Performers-820aabb4.js:1:29726)
    at t (https://stash.example.com/assets/index-e7ce1972.js:40:9217)
    at t (https://stash.example.com/assets/index-e7ce1972.js:40:11169)
    at Es (https://stash.example.com/assets/Performers-820aabb4.js:1:31116)
    at t (https://stash.example.com/assets/index-e7ce1972.js:40:9217)
    at t (https://stash.example.com/assets/index-e7ce1972.js:40:11169)
    at Suspense
    at MI (https://stash.example.com/assets/index-e7ce1972.js:44:527633)
    at div
    at po2 (https://stash.example.com/assets/index-e7ce1972.js:54:51419)
    at W02 (https://stash.example.com/assets/index-e7ce1972.js:49:3901)
    at B32 (https://stash.example.com/assets/index-e7ce1972.js:44:436983)
    at Suspense
    at F32 (https://stash.example.com/assets/index-e7ce1972.js:44:435063)
    at u32 (https://stash.example.com/assets/index-e7ce1972.js:44:416296)
    at t (https://stash.example.com/assets/index-e7ce1972.js:40:75570)
    at MI (https://stash.example.com/assets/index-e7ce1972.js:44:527633)
    at Object.apply (https://stash.example.com/assets/index-e7ce1972.js:44:433487)
    at Vy2 (https://stash.example.com/assets/index-e7ce1972.js:64:196511)
    at mj (https://stash.example.com/assets/index-e7ce1972.js:19:183832)
    at t (https://stash.example.com/assets/index-e7ce1972.js:40:5733)
    at t (https://stash.example.com/assets/index-e7ce1972.js:40:12243)

Stash Version: (from Settings -> About):
Version: v0.27.2
Build hash: 76648fe
Build time: 2024-10-15 22:17:23

Desktop (please complete the following information):

  • OS: macOs
  • Browser opera gx
  • Version LVL6 (core: 114.0.5282.202) (arm64) / Chromium version:128.0.6613.178

Smartphone (please complete the following information):

  • N/A

Additional context
As a work-around I can get into server files, maybe this is saved somewhere somewhat accessible out of band?

Thanks :)

@mr-szgz mr-szgz added the bug report Bug reports that are not yet verified label Nov 17, 2024
@github-project-automation github-project-automation bot moved this to To triage in Bug fixing Nov 17, 2024
@DogmaDragon
Copy link
Collaborator

As of v0.27.0, tagger configuration was moved from browser storage to config.yml to make it persistent. So clearing cache shouldn't be expected to work. You can remove invalid regex from config.yml file.

Search for

    taggerConfig:
        blacklist:

@electblake
Copy link

electblake commented Nov 18, 2024

@DogmaDragon ty ty

ui:
    taggerConfig:
        blacklist:
            - 1080p
  • after restarting container it worked and tagger loads again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Bug reports that are not yet verified
Projects
Status: To triage
Development

No branches or pull requests

3 participants