comick.app blank site

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
User avatar
TommyKing
Moongazer
Moongazer
Posts: 7
Joined: 2021-03-12, 13:02

comick.app blank site

Unread post by TommyKing » 2023-05-16, 22:19

expected behavior: comics website
actual behavior: blank page

error code:

Code: Select all

**ReferenceError: BigInt is not defined
Stack trace:
[71846]@https://comick.app/_next/static/chunks/main-eb29de117cf40087.js:1:43082
s@https://comick.app/_next/static/chunks/webpack-100014af72856f32.js:1:167
[42791]@https://comick.app/_next/static/chunks/main-eb29de117cf40087.js:1:39542
s@https://comick.app/_next/static/chunks/webpack-100014af72856f32.js:1:167
[12590]@https://comick.app/_next/static/chunks/main-eb29de117cf40087.js:1:36401
s@https://comick.app/_next/static/chunks/webpack-100014af72856f32.js:1:167
[84772]@https://comick.app/_next/static/chunks/main-eb29de117cf40087.js:1:40983
s@https://comick.app/_next/static/chunks/webpack-100014af72856f32.js:1:167
X@https://comick.app/_next/static/chunks/main-eb29de117cf40087.js:1:73567
m@https://comick.app/_next/static/chunks/main-eb29de117cf40087.js:1:27016
ei@https://comick.app/_next/static/chunks/main-eb29de117cf40087.js:1:13384**

User avatar
Nigaikaze
Board Warrior
Board Warrior
Posts: 1322
Joined: 2014-02-02, 22:15
Location: Chicagoland

Re: comick.app blank site

Unread post by Nigaikaze » 2023-05-16, 22:33

TommyKing wrote:
2023-05-16, 22:19

Code: Select all

**ReferenceError: BigInt is not defined
Currently not supported in UXP, but it's being worked on.
Nichi nichi kore ko jitsu = Every day is a good day.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: comick.app blank site

Unread post by Moonchild » 2023-05-16, 22:57

Of course use of BigInt (designed for dealing with very large integers) on a comics website is quite controversial. Why would they need specific data types for dealing with huge integer numbers? That's normally reserved for certain fields of science.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
adoxa
Fanatic
Fanatic
Posts: 153
Joined: 2019-03-16, 13:26

Re: comick.app blank site

Unread post by adoxa » 2023-05-17, 06:43

Here's a Modify HTTP Response filter to work around it.

Code: Select all

[["comick.app",["/_next\\/static\\/chunks\\/main-/",["BigInt.asUintN(a,i*l)","(i*l)&0xffffffff","/BigInt/g",""]]]]

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2018-05-05, 13:29

Re: comick.app blank site

Unread post by vannilla » 2023-05-17, 11:06

Moonchild wrote:
2023-05-16, 22:57
Of course use of BigInt (designed for dealing with very large integers) on a comics website is quite controversial.
For what is worth, the problem lies in the framework and not in the site.
But this is simply moving the blame: why does a web site framework need BigInt?
According to a brief research, BigInt has been added after someone opened an issue citing it was impossible to do some kind of thing with BigInts.
Unfortunately I can't tell if the problem is really in that commit: I managed to get a somewhat prettified version of the incriminated code and it seems that BigInt is used only to handle some kind of byte sizes, i.e.:

Code: Select all

let r = {
            32: BigInt(16777619),
            64: BigInt(1099511628211),
            128: BigInt(3094850098213451e11),
            256: BigInt(37414441915671115e34),
            512: BigInt(3583591587484487e88),
            1024: BigInt(5016456510113119e189)
        }
          , n = {
            32: BigInt(2166136261),
            64: BigInt(14695981039346655e3),
            128: BigInt(14406626329776981e22),
            256: BigInt(10002925795805258e61),
            512: BigInt(965930312949667e139),
            1024: BigInt(1419779506494762e271)
        };
        function a(e, t) {
            let {size: a=32, seed: o=0} = void 0 === t ? {} : t;
            if (!r[a])
                throw Error("The `size` option must be one of 32, 64, 128, 256, 512, or 1024");
            let i = n[a] ^ BigInt(o)
              , l = r[a]
              , s = !1;
            for (let t = 0; t < e.length; t++) {
                let r = e.charCodeAt(t);
                r > 127 && !s && (r = (e = unescape(encodeURIComponent(e))).charCodeAt(t),
                s = !0),
                i ^= BigInt(r),
                i = BigInt.asUintN(a, i * l)
            }
            return i
        }
but I can't find anything anywhere about this code, even if it's just searching that error message.
If I can get some time to investigate I can probably find which dependency generates this code, but to do that I'd first have to make a local development installation of NextJS and scan all the unminified sources.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: comick.app blank site

Unread post by Moonchild » 2023-05-17, 11:19

vannilla wrote:
2023-05-17, 11:06
According to a brief research, BigInt has been added after someone opened an issue citing it was impossible to do some kind of thing with BigInts.
The one opening the issue seems to have just wanted to use copypasta code from someone else and the framework didn't like the suffix.
Seems the issue had no other substance than adding BigInt (and its requirement in browsers) because "it was there". No fallback. Dunno what else to say.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
TommyKing
Moongazer
Moongazer
Posts: 7
Joined: 2021-03-12, 13:02

Re: comick.app blank site

Unread post by TommyKing » 2023-05-24, 11:43

seems like next.js fixed the problem. palemoon is able to browse the site now. (ios13 was in blank page too apparently)

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2018-05-05, 13:29

Re: comick.app blank site

Unread post by vannilla » 2023-05-24, 13:18

Thanks to TommyKing's notice I could get a glimpse of the Next.js BigInt rabbit hole.

I'm going to put it inside a hidden tag because it's long (mostly because of explanations on how certain things work behind the scene) and sort of off-topic.
First, the link in my previous post is a red herring: even though Next.js is involved it really is something handled by the website, not the framework.
Still, Next.js does use BigInt internally and that is what breaks everything, including old versions of Safari which prompted the fix that also benefited Pale Moon.

From what I could gather, BigInt is used (or "was used", as the code has been refactored to not use BigInt anymore, apparently) to create a Bloom filter.
In short, a Bloom filter is an algorithm to know if the requested element is present inside a set within a certain margin of error. For a more detailed explanation go to Wikipedia or something, all we need to know here is that Bloom filters are used to recognize whether a certain element has a certain property.
Naturally, one has to wonder why a web framework even need a bloom filter. Intuitively a framework just needs to provide some ready-made blocks (functions, classes, etc.) to quickstart the actual application. It is then up to the application developers to define all the paths, the objects to handle requests, etc.

Here is the catch: Next.js also intercepts "routing" and guides the browser to send requests differently than what is displayed in the user interface (e.g. the address bar). "Routing" in this case, is the process of assigning a certain content with an arbitrary string, which is then displayed as the "resource path" in the browser's address bar.
In the old days, requesting the resource http://domain.tld/path/to/resource/file.html would make the server literally access the file system to access the folders path/to/resource and then grab the actual file "file.html" from there, which would then be served to the client in the HTTP response body.
For many reasons this behaviour was considered undesirable, thus server-side framework (e.g. Ruby on Rails) started blocking this file system scan, instead directing every resource request to their internal code --- what has been called routing. Through this routing, requesting the path/to/resource/file.html resource does not mean actually accessing the path/to/resource/file.html file; instead, it means the framework will check an internal data structure for an object associated with the requested resource, will then execute some action on this object (e.g. the object is an instance of a class in the OOP paradigm and the framework executes one or more of its methods) and the result of this action is then given to the client.
This behaviour allowed for URLs that would've otherwise be impossible or very hard to manage. For example, it allows URLs like https://domain.tld/accounts/1 to uniquely identify the account page of the registered user whose identifier is 1 (e.g. inside a database) with extreme ease.

During the time web developers started pushing for single-page applications, that is, sites whose content was served all in one request and "navigation" was entirely handled by javascript, this routing could not be handled by the server anymore, since the whole point of the paradigm was to use the server for nothing more than provide JSON or some other serialized data. As such, these SPA frameworks used what is called "client-side routing", which works the same way as server-side routing in that the address being shown by the browser is intercepted and looked up in an internal structure and the result is used to request some JSON to the server using asynchronous requests. The server will also most likely route internally, so there are two levels or routing.
Even though SPAs have been ironically abandoned for the past three or four years, web frameworks still use client-side routing for one reason or another, usually to avoid the "empty page" problem when navigating between two actual pages.

Client-side routing is the cause of the problem at hand, i.e. the use of BigInt inside Next.js. The example of routing used above, https://domain.tld/accounts/1, is an instance of "dynamic routes", that is, a route, or path, in which one or more elements are not known until the browser actually requests it. In the example's case, the dynamic part is the 1, as it can also be 2, 100 or even a string representing the account's name.

Because of this property, it is possible to create a route /some/path/resource.json that serves HTML (maybe showing the "resource.json" file) instead of JSON.
That in itself would not be a problem for server-side routing, but in client-side routing the browser does not perform a real navigation; instead, the address is changed by a script and a new entry in the browser history is pushed again by a script. Therefore, as it was the case in Next.js, certain dynamic routes can confuse the framework ending up with an element in the browser history that should've not been there, or the lack of a navigation when it should've been there.

In the specific case of Next.js, this confusion was solved by employing a Bloom filter for known static routes and a Bloom filter for known dynamic routes. If the route entered in the address bar or requested by following a link is part of one of these two set, then the browser will "navigate" towards the requested page, otherwise it will treat is as an asynchronous request to be handled in the background.
In the broken Next.js version, these Bloom filters were handled using a third-party library which used BigInt internally.

In conclusion of this wall of text: web framework are madness and single-page applications are madness on top of madness and trying to recover from this madness created even more madness. :angel:

User avatar
jobbautista9
Keeps coming back
Keeps coming back
Posts: 782
Joined: 2020-11-03, 06:47
Location: Philippines
Contact:

Re: comick.app blank site

Unread post by jobbautista9 » 2023-05-24, 13:58

vannilla wrote:
2023-05-24, 13:18
Still, Next.js does use BigInt internally and that is what breaks everything, including old versions of Safari which prompted the fix that also benefited Pale Moon.
Off-topic:
Shit like this is why I'm very sympathetic to Safari even if I'm not really an Apple fan (I don't even use a Mac, and the only Apple product I have is the 1st generation iPad mini). Tabs on bottom, a sane UI, a respectable feature set, and not adopting useless shiny features (forcibly pushed by Google!) too quickly... IMHO they're more relevant than Mozilla in keeping the web actually open.

Then there are webshit techbros salty about not being able to use a niche Google feature (it's like they're gonna die from a heart attack if they see a browser not supporting the next shiny that will give them job security) denigrating Safari as the "new IE", which couldn't be further from the truth that one has to wonder whether they're actually paid by Google to distract the public from Chrome's monopoly...
Image

merry mimas

XUL add-ons developer. You can find a list of add-ons I manage at http://rw.rs/~job/software.html.

Mima avatar by 絵虎. Pixiv post: https://www.pixiv.net/en/artworks/15431817

Image

User avatar
Eduardo Lucas
Moon lover
Moon lover
Posts: 94
Joined: 2021-07-08, 13:08
Location: São Paulo, Brazil

Re: comick.app blank site

Unread post by Eduardo Lucas » 2023-05-24, 14:57

jobbautista9 wrote:
2023-05-24, 13:58
Off-topic:
Shit like this is why I'm very sympathetic to Safari even if I'm not really an Apple fan (I don't even use a Mac, and the only Apple product I have is the 1st generation iPad mini). Tabs on bottom, a sane UI, a respectable feature set, and not adopting useless shiny features (forcibly pushed by Google!) too quickly... IMHO they're more relevant than Mozilla in keeping the web actually open.

Then there are webshit techbros salty about not being able to use a niche Google feature (it's like they're gonna die from a heart attack if they see a browser not supporting the next shiny that will give them job security) denigrating Safari as the "new IE", which couldn't be further from the truth that one has to wonder whether they're actually paid by Google to distract the public from Chrome's monopoly...
Off-topic:
On the other side, saying Chromium is the new IE is like a crime to the same people you mention.

User avatar
jobbautista9
Keeps coming back
Keeps coming back
Posts: 782
Joined: 2020-11-03, 06:47
Location: Philippines
Contact:

Re: comick.app blank site

Unread post by jobbautista9 » 2023-05-24, 15:17

Off-topic:
Maybe for a change I should write an article about why Firefox is the new IE. That will get the pitchforks from all sides for sure! :P
Image

merry mimas

XUL add-ons developer. You can find a list of add-ons I manage at http://rw.rs/~job/software.html.

Mima avatar by 絵虎. Pixiv post: https://www.pixiv.net/en/artworks/15431817

Image

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: comick.app blank site

Unread post by Moonchild » 2023-05-24, 16:28

jobbautista9 wrote:
2023-05-24, 15:17
Off-topic:
Maybe for a change I should write an article about why Firefox is the new IE. That will get the pitchforks from all sides for sure! :P
pitchforks.gif
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 933
Joined: 2021-01-26, 11:18

Re: comick.app blank site

Unread post by Kris_88 » 2023-05-24, 16:40

vannilla wrote:
2023-05-24, 13:18
In conclusion of this wall of text: web framework are madness and single-page applications are madness on top of madness and trying to recover from this madness created even more madness. :angel:
However, here I would like to stand up for the client-side application. This technology greatly saves traffic, which is especially important for such huge services as Google or social networks. The problem is that the scripts for websites were usually written by students and with the help of the left hind leg. For an ordinary site, where scripts are nothing more than decoration, this approach was acceptable. But they do the same for applications, and we are now seeing the results. They constantly lack some kind of convenience, they constantly "improve" the language, they write tens of megabytes of code where kilobytes would be enough. Etc...
In fact, this is a common lack of professionalism.

dbsoft
Project Contributor
Project Contributor
Posts: 407
Joined: 2020-02-21, 17:35

Re: comick.app blank site

Unread post by dbsoft » 2023-05-24, 19:37

Only complaint is one less site to test my BigInt support on! :P

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: comick.app blank site

Unread post by moonbat » 2023-05-24, 23:24

Off-topic:
Here's a much more pitchfork worthy take - Chrome is better at being IE than the original IE could have dreamed of, and Pale Moon is the new FIrefox (in spirit as it existed until version 4) :twisted:
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Locked