ImranR98 / apps.obtainium.imranr.dev

Collection of suggested apps for Obtainium.
https://apps.obtainium.imranr.dev
GNU General Public License v3.0
122 stars 33 forks source link

The last attempt to merge the last three pull requests failed. Cloudflare was not able to build the website. Have you noticed that yet? Any ideas? #61

Closed DwainZwerg closed 3 months ago

DwainZwerg commented 3 months ago

@ImranR98 The last attempt to merge the last three pull requests failed. Cloudflare was not able to build the website. Have you noticed that yet? Any ideas?

Mikaela commented 3 months ago

I suspect it's related to the Firefox and Firefox beta not parsing as valid json:

└┌(%:~/src/github.com/Mikaela/apps.obtainium.imranr.dev)┌- pre-commit run --all-files
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...............................................................Passed
check for added large files..............................................Passed
check json...............................................................Failed
- hook id: check-json
- exit code: 1

data/apps/org.mozilla.firefox_beta.json: Failed to json decode (Invalid \escape: line 9 column 94 (char 359))
data/apps/org.mozilla.firefox.json: Failed to json decode (Expecting property name enclosed in double quotes: line 9 column 8 (char 1513))

These could be detected automatically by https://pre-commit.ci which would already be configured. Login by GitHub account, add installation and choose this repository.

DwainZwerg commented 3 months ago

@Mikaela Any ideas to get round this?

Mikaela commented 3 months ago

https://github.com/ImranR98/apps.obtainium.imranr.dev/pull/63 is my best idea since I rely on FFUpdater to handle Firefoxes for me.

DwainZwerg commented 3 months ago

It is necessary to remove Firefox Beta because the AppID (org.mozilla.firefox_beta.json) is so weird?

Something should go wrong in line 9 column 94: "customLinkFilterRegex\":\"[0-9]+ \ .[0-9]b[0-9]+/$\" What this is supposed to be is not clear to me (yes, of course there is a backslasch, but it belongs there in terms of regex and is also somewhere else and doesn't cause any problems there). But I'm not a js or json expert either.

Mikaela commented 3 months ago

The issue is that the json file seems to repeat the same things four times alongside having a json issue somewhere that I am not spotting and the proper solution would be to recreate it without either the duplicates or syntax errors.

DwainZwerg commented 3 months ago

Json Lint finds no error. Neither do I.

repeat the same things four times

The difference is the individual configs: One for each arch.

Edit: OK: JsonLint now finds an error after all. I'll investigate further. It will probably be fixed tonight.

Edit2: I have already found the correct position: It is the first backslash marked one above. It causes the input to end ("escape"). However, if I remove it, the regex should no longer work. We can try it out anyway. This would be the code without the backslash (mean without JsonErrors, but probably with broken regex)

Mikaela commented 3 months ago

👍🏻 I picked it into #63 with you as a co-author in hopes of avoiding a potential merge conflict.

ImranR98 commented 3 months ago

Thanks guys. Added this repo to pre-commit.ci

DwainZwerg commented 3 months ago

Ahm: The Website is now fully broken. But I'm sure it's couldn't the Beta config because it's valid json.

ImranR98 commented 3 months ago

Hmm. Must be something the pre commit didn't catch.

Mikaela commented 3 months ago

I see a lot of complaints about blocked fonts, but the relevant part seems to be:

Request for font "Nimbus Sans Narrow" blocked at visibility level 1 (requires 3)
index.js:1391:42
[PeerTube Companion] Retrieved item "getUrlService-apps.obtainium.imranr.dev" from cache redirection-content-script.f3b7260b.js:1:21762
Object { id: "org.mozilla.firefox_beta", url: "https://download.cdn.mozilla.net/pub/fenix/releases/", author: "Mozilla Foundation", name: "Firefox Beta", preferredApkIndex: 0, additionalSettings: '{"intermediateLink":[{"customLinkFilterRegex":"[0-9]+.[0-9]b[0-9]+/$","filterByLinkText":false,"skipSort":false,"reverseSort":false,"sortByLastLinkSegment":false},{"customLinkFilterRegex":"android/$","filterByLinkText":false,"skipSort":false,"reverseSort":false,"sortByLastLinkSegment":false},{"customLinkFilterRegex":"fenix-[0-9]+.[0-9]b[0-9]+-android-x86_64","filterByLinkText":false,"skipSort":false,"reverseSort":false,"sortByLastLinkSegment":false}],"customLinkFilterRegex":"","filterByLinkText":false,"skipSort":false,"reverseSort":false,"sortByLastLinkSegment":false,"versionExtractWholePage":false,"requestHeader":[{"requestHeader":"User-Agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36"}],"defaultPseudoVersioningMethod":"APKLinkHash","trackOnly":false,"versionExtractionRegEx":"","matchGroupToUse":"","versionDetection":false,"useVersionCodeAsOSVersion":false,"apkFilterRegEx":"","invertAPKFilter":false,"autoApkFilterByArch":true,"appName":"Mozilla Firefox","shizukuPretendToBeGooglePlay":false,"exemptFromBackgroundUpdates":false,"skipUpdateNotifications":false,"about":"","supportFixedAPKURL":false', pinned: false, releaseDate: null, changeLog: null, overrideSource: "HTML", … }
script.js:96:21
SyntaxError: JSON.parse: end of data after property value in object at line 1 column 1182 of the JSON data
    getAppConfigString https://apps.obtainium.imranr.dev/script.js?v=20240113:94
    getAppEntryHTML https://apps.obtainium.imranr.dev/script.js?v=20240113:152
    getAppEntryHTML https://apps.obtainium.imranr.dev/script.js?v=20240113:147
    getAppEntriesHTML https://apps.obtainium.imranr.dev/script.js?v=20240113:178
    getAppEntriesHTML https://apps.obtainium.imranr.dev/script.js?v=20240113:178
    render https://apps.obtainium.imranr.dev/script.js?v=20240113:190
    <anonymous> https://apps.obtainium.imranr.dev/script.js?v=20240113:205
script.js:207:21

I have no idea what could be wrong with the Firefox beta (other than it being overwhelmingly big file for me). pre-commit doesn't complain either.

% git last;echo;pre-commit run --all-files
tree 5574423183dbaf707395c12e2fe22400078e21a8
parent 12bb22eca25651f46be795104b6062592bdaeabb
parent d9d242703f7e6a002200b2f79711933d2e576be1
author Imran <30463115+ImranR98@users.noreply.github.com> 1716988360 -0400
committer GitHub <noreply@github.com> 1716988360 -0400
gpgsig -----BEGIN PGP SIGNATURE-----

 wsFcBAABCAAQBQJmVynICRC1aQ7uu5UhlAAAFp4QAGci5SSpUIfSnpGDO5GlJCXb
 VGoRqq8gFHCaQIAR3nNG0BsoeN3c+7Lo0yKj/+eM/dgZZkXsgjPAAy6SVd5oFRMa
 qs5nn/56SRemakbezm+K5phuu8UwKqAehZbb89Azhli70ybPCSHd+HICb4GGx1To
 hFVk74+hQviW9ttC+o8Z/HqufKUFYSEu4mWURsxsY7X1asVxmSjbAohy9dmlW1ce
 iUDS/DjXsktkJ53btMxNbs5uYEjMXNtOYQ92Tn9DqzwuRbw2E5vyFmponnThLT4T
 s7N8pma5w6N0PPIeAC5p8Z/Hi9cFR97cE+ZohxcssnoF/fOipSnPgTsvnMQQop56
 ynJ7vKUu+Xt59ErWd9V7H25bRgUto1TWurtO/PgBwHYETLEOlUs0hTvfbtnQ4Ke4
 KkdWmL94o8Ys/ODDu0PW9H0D6zGN4+aktU2xQfugMnzuJvZDgxqnOr85j6A/NhYI
 pd7swfusguqtnkAfCNJaVYa4/EKJVWGpBttf6vyzmDpxEz1mX7K+mb0A7pFrmjGe
 GfOR4EiYCKuCgAc3Na0SQRLb5DYOuCI1g7/IhnwTR40kLLjLywAH09A/7QaZUBsS
 nnwRwrPpIshK1R+UsT04gjVqXKsKn+/e9kIavhNj8e/rPIRD98n8WCkSLt8xguBD
 d8v+JV4Q3n1mPbKzfI9I
 =0aTD
 -----END PGP SIGNATURE-----

Merge pull request #65 from Jean-BaptisteC/ep

Add exodus app in repository
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...............................................................Passed
check for added large files..............................................Passed
check json...............................................................Passed
DwainZwerg commented 3 months ago

I don't understand either. Then we should definitely throw out the firefox beta config for now.

I see a lot of complaints about blocked fonts

Where do they come from? I mean, I don't request any fonts in the config file.

Mikaela commented 3 months ago

I see a lot of complaints about blocked fonts

Where do they come from? I mean, I don't request any fonts in the config file.

They aren't really relevant, but it might be the upstream https://cdn.jsdelivr.net/npm/bulma@1.0.0/css/bulma.min.css not specifying a font-family (that I can see) and Firefox fingerprinting protection then deciding to block everything in order of them appearing in my system.

I think you could reproduce by setting privacy.resistFingerprinting to false and privacy.fingerprintingProtection to true and possibly privacy.fingerprintingProtection.overrides to +AllTargets (I have it as +AllTargets,-KeyboardEvents,-SpeechSynthesis,-CSSPrefersColorScheme,-CSSPrefersReducedMotion,-NavigatorUserAgent,-JSDateTimeUTC)

DwainZwerg commented 3 months ago

Okay, that's right. I have that too (yes, I probably use similar tracking protection in Firefox).

ImranR98 commented 3 months ago

The Firefox configs were missing a } in some of the additionalSettings props - fixed that. Also modified the build script so it crashes if there are ever any invalid additionalSettings entries.