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

Argh... GitLab is broken again (regex/named capture groups) #45

Closed
dilworks opened this issue Feb 17, 2022 · 46 comments
Closed

Argh... GitLab is broken again (regex/named capture groups) #45

dilworks opened this issue Feb 17, 2022 · 46 comments
Labels
bug Something isn't working fixed

Comments

@dilworks
Copy link

Today must be a horrible day for everybody using source hosting sites which are hellbent on making life miserable to anyone not using Chrome®™ or a Chrome®™-compatible browser. Now GitLab is breaking again because they decided it was a good idea to deploy named capture groups on their regexes for no good reason at all.

Apparently the polyfills injected by the addon cause GitLab to load one of their scripts... which breaks because it now contains unsupported regexes. The error console logs this:

SyntaxError: invalid regexp group commons-pages.admin.topics.edit-pages.admin.topics.new-pages.groups.epics.new-pages.groups.epics.sho-59a8e774.9fc6fd37.chunk.js:1:285
	onStopRequest jar:file:///home/tomman/.mozilla/seamonkey/7b88ug1a.default/extensions/github-wc-polyfill@Off.JustOff.xpi!/bootstrap.js:430:7

Since SeaMonkey doesn't support named capture groups (yet), the entire tower of cards falls down there, and GitLab goes back to its usual behavior for anyone not using A Blessed Browser™ (i.e. everything broken, can't read anything but the first post on a issue, etc.)

When will the madness stop!? Maybe it's time to declare JavaScript and Google war criminals against mankind at the United Nations :/

@JustOff
Copy link
Owner

JustOff commented Feb 17, 2022

@JustOff JustOff added bug Something isn't working help wanted Extra attention is needed labels Feb 17, 2022
@SeaHOH
Copy link
Collaborator

SeaHOH commented Feb 17, 2022

What the good students are they?

@dirkf

This comment was marked as off-topic.

@JustOff
Copy link
Owner

JustOff commented Feb 18, 2022

Here is a dirty error bypass hack: 1.2.13b3.

@SeaHOH
Copy link
Collaborator

SeaHOH commented Feb 18, 2022

Fail to load right side bar in page diffs (May caused by my network). And hight CPU usage rate.

@JustOff
Copy link
Owner

JustOff commented Feb 18, 2022

Fail to load right side bar in page diffs.

An example URL. plz.

@AroKol78
Copy link

Fail to load right side bar in page diffs. And hight CPU usage rate.

I checked some GitLab addresses and it works fine on ST52

@SeaHOH
Copy link
Collaborator

SeaHOH commented Feb 18, 2022

Fail to load right side bar in page diffs.

An example URL. plz.

I restart my browser, and it work. May caused by my network.

@hiiamboris
Copy link

Haha I knew GL being the second worst won't stay out of this browser war for long! And their timing strongly suggests M$ insidership.

But that's enough. Where would you guys suggest I should move my projects? Codeberg?

@JustOff JustOff added fixed and removed help wanted Extra attention is needed labels Feb 18, 2022
@dilworks
Copy link
Author

Once again, thank you very much, @JustOff !!!

Another small victory in this endless cat-and-very-shiny-mouse chase. Can confirm that Gitlab works again on SeaMonkey.

Ironically, when you open the console there, you get a welcoming message to "make GitLab more lovable" (complete with emojis, ON A CONSOLE). Sure, right, "lovable". As long as you love Chrome®™, of course!

@roytam1
Copy link

roytam1 commented Mar 13, 2022

in https://foss.heptapod.net/seamonkey/mozilla-release it shows this error:

21:41:30.912 SyntaxError: invalid identity escape in regular expression 1 main.fb387d50.chunk.js:50:117850
	onStopRequest jar:file:///G:/palemoon/profile/extensions/github-wc-polyfill@Off.JustOff.xpi!/bootstrap.js:476:7

@AroKol78
Copy link

on ST52

Timestamp: 2022-03-13 15:12:42
Error: SyntaxError: invalid identity escape in regular expression
Source File: https://foss.heptapod.net/assets/webpack/main.fb387d50.chunk.js
Line: 50, Column: 117850
Source Code:
slice(r);return i&&n.push(i),n},i=t=>{if(t){const e=t.match(/^\p{Emoji}/u);return e?e[0]:t.charAt(0).toUpperCase()}retur

SeaHOH added a commit that referenced this issue Mar 13, 2022
@SeaHOH
Copy link
Collaborator

SeaHOH commented Mar 13, 2022

github-wc-polyfill-1.2.17b1
The main GL was droped escape emoji in regular expression, but some instances may not be.

@Vangelis66
Copy link

Vangelis66 commented Mar 17, 2022

The main GL was droped escape emoji in regular expression

😡 ; "main" GitLab is again BROKEN here (202203170045 UTC), due to them using unsupported (in UXP) regex syntax... 👎 😠

Latest St52+gh-wc-pf-1.2.16/1.2.17b1,
sample GL URL:
https://gitlab.com/seamonkey-project/seamonkey-2.53-mozilla/-/commit/1a9bb8dcae068ea13ddbabcb5620f4e5ab0ea1f8
Result:

GL

Error Console log:

Timestamp: 17/03/2022 02:57:00
Error: SyntaxError: invalid regexp group
Source File: https://gitlab.com/assets/webpack/commons-pages.admin.topics.edit-pages.admin.topics.new-pages.groups.epics.new-pages.groups.epics.sho-59a8e774.e7c29e61.chunk.js
Line: 1, Column: 285
Source Code:
,i=n.n(o),r=n("79X9"),s=n("oj/M");const a="[{text}](url)",l=/^(?<indent>\s*)(?<leader>((?<isUl>[*+-])|(?<isOl>\d+\.))( \

... Seems there's no end to this ordeal 😭 ; one day is GH, the next GL, and so on... 😞

@SeaHOH
Copy link
Collaborator

SeaHOH commented Mar 17, 2022

github-wc-polyfill-1.2.17b2

@MayaPosch

This comment was marked as off-topic.

@hiiamboris

This comment was marked as off-topic.

@Vangelis66
Copy link

Vangelis66 commented Mar 18, 2022

Both the beta github-wc-polyfill-1.2.17b2 and latest release github-wc-polyfill-1.2.17 mitigate the GitLab breakage I reported, so many thanks for the speedy fix! 🥇
And I've been meaning to ask:
SeaHOH, since you're the current active maintainer of this extension, what should the best course of action be the next time either GH/GL break?

  1. File a new, separate, issue, like I did in #58 (GH broke, albeit temporarily...)
  2. Post a comment in a previously existing closed issue, like I did this time (GL broke, I posted #45#issuecomment-1069796890 ) ?

Thanks a lot! 😄

@Vangelis66

This comment was marked as off-topic.

@SeaHOH
Copy link
Collaborator

SeaHOH commented Mar 18, 2022

  1. File a new, separate, issue, like I did in #58 (GH broke, albeit temporarily...)

This is better.

@l29ah
Copy link

l29ah commented Mar 19, 2022

gitlab doesn't work for me even with the latest update
https://gitlab.freedesktop.org/mesa/mesa/-/issues/6145 is empty

@SeaHOH
Copy link
Collaborator

SeaHOH commented Mar 19, 2022

@l29ah The site app is outdated, you should ask the manager to update, or use old add-on.

@AroKol78
Copy link

AroKol78 commented Mar 19, 2022

on ST52 + 1.2.17
I don't know if it matters, but on the given page I have it

https://gitlab.freedesktop.org/mesa/mesa/-/issues/6145 is empty

Timestamp: 2022-03-19 18:46:17
Error: SyntaxError: invalid regexp group
Source File: https://gitlab.freedesktop.org/assets/webpack/commons-pages.admin.topics.edit-pages.admin.topics.new-pages.groups.milestones.edit-pages.groups.mil-2c3731d7.227b1daa.chunk.js
Line: 1, Column: 285
Source Code:
,r=n.n(o),i=n("79X9"),s=n("oj/M");const a="[{text}](url)",l=/^(?<indent>\s*)(?<leader>((?<isOl>[*+-])|(?<isUl>\d+\.))( \

  • https://gitlab.freedesktop.org/mesa/mesa/-/issues/6145
    ok 1.2.16
    bad 1.2.17
  • https://gitlab.com/seamonkey-project/seamonkey-2.53-mozilla/-/commit/1a9bb8dcae068ea13ddbabcb5620f4e5ab0ea1f8
    bad 1.2.16
    ok 1.2.17

😕

@SlySven

This comment was marked as off-topic.

@AroKol78

This comment was marked as off-topic.

@SlySven

This comment was marked as off-topic.

@Vangelis66

This comment was marked as off-topic.

@SeaHOH
Copy link
Collaborator

SeaHOH commented Mar 20, 2022

@SlySven Please comment to the corresponding issue. #59

@roytam1
Copy link

roytam1 commented Apr 4, 2022

it happens again:

Error: SyntaxError: invalid regexp group

Source File: https://gitlab.com/assets/webpack/commons-pages.admin.topics.edit-pages.admin.topics.new-pages.groups.epics.new-pages.groups.epics.sho-59a8e774.e3a8a1a8.chunk.js

Line: 1, Column: 1627

which is: l=/^(?<indent>\s*)(?<leader>((?<isUl>[*+-])|(?<isOl>\d+\.))( \[([xX ])\])?\s)(?<content>.)?/,c=/^((\s{0,3}-+\s*-+\s*-+\s*[\s-]*)|(\s{0,3}\*+\s*\*+\s*\*+\s*[\s*]*))$/;

@Vangelis66
Copy link

Vangelis66 commented Apr 4, 2022

... Can also confirm (04/04/2022, ca. 16:50 UTC) 😞 ; gh-wc-pf-v1.2.17, Serpent v52.9.0 (2022-03-25) (32-bit), Error Console output follows for my GL test page:

Timestamp: 04/04/2022 19:51:23
Error: SyntaxError: invalid regexp group
Source File: https://gitlab.com/assets/webpack/commons-pages.admin.topics.edit-pages.admin.topics.new-pages.groups.epics.new-pages.groups.epics.sho-59a8e774.e3a8a1a8.chunk.js
Line: 1, Column: 1627
Source Code:
,o=n.n(r),i=n("79X9"),s=n("oj/M");const a="[{text}](url)",l=/^(?<indent>\s*)(?<leader>((?<isUl>[*+-])|(?<isOl>\d+\.))( \

FWIW, after my recent exchange with this extension's current maintainer, perhaps it would be better to open a new issue for this latest GL breakage 😉 ; though, to be fair, this issue has remained in an Open status ever since originally filed on Feb 18th...

@SeaHOH
Copy link
Collaborator

SeaHOH commented Apr 4, 2022

github-wc-polyfill-1.2.18b1.xpi

https://gitlab.com/gitlab-org/gitlab/-/commit/775a98516a5c4f35d7320ed1be2dc442937e367b

@Vangelis66
Copy link

v1.2.18b1 tested in St52 and found to successfully address this latest breakage! 👍

I don't want to sound ominous, but GitLab are announcing currently the release of their next major milestone, v15.0, scheduled for May 22nd; I expect (but hope against) several additional breakages till that date... 😞

@mittorn
Copy link

mittorn commented Apr 13, 2022

Still getting this after update

02:31:30.022 SyntaxError: invalid regexp group 1 commons-pages.admin.topics.edit-pages.admin.topics.new-pages.groups.milestones.edit-pages.groups.mil-2c3731d7.9d206744.chunk.js:1:285

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10525 (any MR)

@Vangelis66
Copy link

Vangelis66 commented Apr 13, 2022

@mittorn

See previous comments in this thread: 1, 2, 3; IOW:

  1. Contact the admins of gitlab.freedesktop.org and request they update the GitLab software version used in their GL instance 😉 , or
  2. For the purposes of using gitlab.freedesktop.org, deploy a different browser profile, with gh-wc-polyfill-v1.2.16 installed (instead of latest v1.2.18.1); make sure you disable extension auto-updates on that profile, so that v1.2.16 doesn't auto-update to the latest one (which is no-good for gitlab.freedesktop.org).

@SeaHOH
Copy link
Collaborator

SeaHOH commented Apr 14, 2022

Yep, just wait an update by them. Or take a rollback of addon.

@rofl0r
Copy link

rofl0r commented Apr 14, 2022

Yep, just wait an update by them. Or take a rollback of addon.

that seems impractical tbh. maybe there's a way (checksum of script) to detect which fix needs to be rolled out ?

@SeaHOH
Copy link
Collaborator

SeaHOH commented Apr 14, 2022

that seems impractical tbh. maybe there's a way (checksum of script) to detect which fix needs to be rolled out ?

It is a pity that this is not applicable to our framework of the addon.

@Vangelis66
Copy link

maybe there's a way (checksum of script) to detect which fix needs to be rolled out ?

Theoretically, this should still be possible, but I'm not a coder myself;
IINM, the gitlab.freedesktop.org self-hosted GL instance is picked-up by the extension according to:

const glmask = "^gitlab\\.|^((0xacab|framagit)\\.org|code\\.(briarproject\\.org|foxkit\\.us|videolan\\.org)|dev\\.gajim\\.org|forge\\.tedomum\\.net|foss\\.heptapod\\.net|git\\.(alchemyviewer\\.org|callpipe\\.com|cardiff\\.ac\\.uk|cit\\.bcit\\.ca|coop|drk\\.sc|drupalcode\\.org|empiresmod\\.com|feneas\\.org|fosscommunity\\.in|gnu\\.io|happy-dev\\.fr|immc\\.ucl\\.ac\\.be|jami\\.net|ligo\\.org|linux-kernel\\.at|najer\\.info|nzoss\\.org\\.nz|oeru\\.org|pleroma\\.social|pwmt\\.org|rockylinux\\.org|silence\\.dev|synz\\.io)|gitgud\\.io|gitplac\\.si|invent\\.kde\\.org|lab\\.libreho\\.st|mau\\.dev|mpeg\\.expert|opencode\\.net|repo\\.getmonero\\.org|salsa\\.debian\\.org|skylab\\.vc\\.h-brs\\.de|source\\.(joinmastodon\\.org|puri\\.sm|small-tech\\.org))$";

and is then "treated" (unsuccessfully 😞) with whatever GL-targeting code exists in latest v1.12.18.1;
what if an "exclusion rule" is added to that detection logic just for gitlab.freedesktop.org and then feed that GL-instance the (working) code extant in v1.12.16 ?
Is that within the realm of feasibility?
Of course, it would be an ugly (interim) kludge, susceptible to breakage whenever "freedesktop.org" eventually update their underlying GL-instance code...

@rofl0r
Copy link

rofl0r commented Apr 14, 2022

Of course, it would be an ugly (interim) kludge, susceptible to breakage whenever "freedesktop.org" eventually update their underlying GL-instance code...

indeed, it would be much nicer to detect that it needs the old fix by checksumming (or checking filesize) of the js script in question.

btw it seems salsa.debian.org also uses an older version of gitlab.

@micwoj92
Copy link

btw it seems salsa.debian.org also uses an older version of gitlab.

It's Debian, what do you expect :^)

@Vangelis66
Copy link

btw it seems salsa.debian.org also uses an older version of gitlab.

Confirmed 😞 (like in the case of gitlab.freedesktop.org, mostly individual merge_requests URIs seem to be affected, e.g.

https://salsa.debian.org/rust-team/debcargo-conf/-/merge_requests/292 )

@SeaHOH
Copy link
Collaborator

SeaHOH commented Apr 15, 2022

github-wc-polyfill-1.2.18.2.xpi
This release includes all the patches for "invalid regexp group".

@rofl0r
Copy link

rofl0r commented Apr 15, 2022

github-wc-polyfill-1.2.18.2.xpi
This release includes all the patches for "invalid regexp group".

that's great! i'm a bit amazed that i can't find a corresponding commit in the commit history. i'm curious how you implemented it.

@SeaHOH
Copy link
Collaborator

SeaHOH commented Apr 15, 2022

i can't find a corresponding commit in the commit history.

It will be commited later. And now, view it in xpi package.

@AroKol78
Copy link

please increase the version number in update.xml (1.2.18.1 and 29)

@SeaHOH
Copy link
Collaborator

SeaHOH commented Apr 16, 2022

please increase the version number in update.xml

Yep, it in the plan, but isn't pressing.

@SeaHOH SeaHOH closed this as completed Apr 17, 2022
Repository owner locked as resolved and limited conversation to collaborators Apr 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests