Gecko esr91 work (former "Flypig's gecko dev diary")

@direc85 would you be so kind to add build instructions for the webview here? I was planning in fixing something related to the screen for temporary accepting an invalid certificate (above), and would sure appreciate if the webview would build correctly to test hydrogen. Thanks.

(L.E. Hmm maybe it’s just cloning and sfdk build -p, I did that and it didn’t hurt)
(L.E. Added webview to the build wiki)

2 Likes

Well, basically almost so: Progressive Web Apps for Firefox – Get this Extension for 🦊 Firefox (en-US)

According to Wikipedia, Firefox doesn’t support PWA’s on Linux (nor on Windows), and it’s only partially supported on Android.

Firefox on Android is supposed to fully support PWAs [1] and the desktop Firefox v76 to v86 had the flag browser.ssb.enabled in about:config to enable PWAs. So the code is there, but the Firefox team decided in January 2021 it does not want to care about support requests and bug reports [2] WRT PWAs and desktop Firefox.

[1]: Installing and uninstalling web apps - Progressive web apps | MDN
[2]: 1682593 - Remove the SSB feature

I think it’s safe to say that Firefox has to build the feature first before Browser can offer that…

It is all there, just not officially supported on the desktop any longer.


@attah, for a primer on PWAs see Progressive web apps | MDN.
How they are handled in practice becomes clearer reading Making PWAs installable - Progressive web apps | MDN.

4 Likes

Hello,
while almost never writing in this forum, I enjoy the spirit that has come up with the browser update. I read the blogpost every morning even though I didn’t understand much.

Today I wanted to test the packages provided by flypig and followed his instructions. But I didn’t get it to run. In Terminal an error shows when in this line:
$ devel-su ln -s /usr/lib64/xulrunner-qt5-91.9.1/ /usr/lib64/xulrunner-qt5-78.15.1

since on my XA2 there is no lib64 but only lib I tried the following:
$ devel-su ln -s /usr/lib/xulrunner-qt5-91.9.1/ /usr/lib/xulrunner-qt5-78.15.1

which gives no error. But after starting the browser it is still on ESR78

Probably I made a stupid error.

1 Like

Yes, you did. A read error. :wink:
The installation instruction states in point one: An aarch64 Sailfish OS phone running 4.6 (Sauna).

1 Like

thanks! I suspected that - especially after the missing “lib64”. I kept just going on because a “uname -m” in terminal gave me “aarch64”. Now I know better.

1 Like


heres a screenshot of the "post text too short " popup on this forum. Still off,
maybe fixed with the ua patches?

EDIT:
Also I have alot of OOM crashes (?) when using outlook.com ; so this hasnt changed much from ESR 78

Evtl. Question was answered ?
Have anybody installed esr 91 on 32bit devices such xa2 or x
?

Apparently @direc85 has:

direc85

6d

I managed to build ESR91 for armv7h – hello from Xperia X!

However, WebView shows white screen for me, and eventually either gets SIGABRT or SIGSEGV, so there are definitely bugs to squash still!

I also used 4.6 target for this and deviated from the instructioms a bit, so there’s that, too.

Please expect bugs! confirmed :slight_smile:

1 Like

ah i see.
so @direc85
can you upload packages as well ?

I added a small PR while studying the underlying hydrogen error: rememberValidityOverride additional param by b100dian · Pull Request #101 · sailfishos/embedlite-components · GitHub

CORS error needs symbols and more debugging.
But I can no longer build locally from the final branch with patches because

 2:57.40 error: failed to determine package fingerprint for build script for selectors v0.22.0 (/home/porter/gecko-dev/gecko-dev/servo/components/selectors)
 2:57.40 Caused by:
 2:57.40   failed to determine the most recently modified file in /home/porter/gecko-dev/gecko-dev/servo/components/selectors
 2:57.40 Caused by:
 2:57.40   failed to determine list of files in /home/porter/gecko-dev/gecko-dev/servo/components/selectors

This is probably something introduced by the last 5 patches (UA changes etc) but I cannot find the error to be common rust by just duckduckgoing for it…

1 Like

Since Gecko 91 doesn’t announce Mobile in its useragent string, I was looking for a way to change it via about:config. According to browser - How do I change Firefox's user agent via about:config? - Super User this can be done by creating a new entry general.useragent.override

Unfortunately the UI of our web browser only allows to edit existing entries but not to add new ones.
So I added this entry manually in the file /home/defaultuser/.local/share/org.sailfishos/browser/.mozilla/prefs.js:

DON’T FORGET TO MAKE A BACKUP OF YOUR FILE prefs.js BEFORE EDITING
close / kill running instances of sailfish-browser before editing prefs.js

add this line to prefs.js:

user_pref("general.useragent.override", "Mozilla/5.0 (X11; Linux aarch64; Mobile; rv:91.0) Gecko/20100101 Firefox/91.0");

This fixes at least https://wetteronline.de showing desktop page. Switching to desktop version still works.

15 Likes

Intersting solution, thanks for sharing. Curious, does switching to desktop browser work (from the menu) in this case?

It seems that I wasn’t clear enough.

Before that modification, I always got the desktop version of e.g. https://wetteronline.de, no matter if I activated Dekstop version from the browser menu or not.
After the modification I get the mobile version by default and switching to Desktop version via browser menu works as with the original SF release of Gecko.

5 Likes

Oops, I missed the “switching to desktop still works” part, indeed. Thanks.

Shouldn’t the end of the useragent be "); instead of >?

5 Likes
user_pref("general.useragent.override", "Mozilla/5.0 (X11; Linux aarch64; Mobile; rv:91.0) Gecko/20100101 Firefox/91.0");

Works with the correct ending as mentioned above.

1 Like

For me too. Weather is now working again

1 Like

Uh, you’re right, I fixed it in my post.

Thanks for your hint!

4 Likes

error: failed to determine package fingerprint for build script for selectors

I didn’t manage to fix the error but it was not introduced by a commit as navigating to commits I know that have built didn’t fix it, nor did cleaning.

I did manage to “nuke” the whole environment, by uninstalling the SDK and re-installing it. By using the online installer, I got the non-EA newer version 3.11.1 of the SDK.
This continued to challenge me with these 3 changes:

  1. Specific to my setup - since I am running everything in an Ubuntu 20.04 VM (because the VM was set up to be a porting machine and that is what HADK uses for building Android bits), I was confronted with the fact that the SDK is now linked against GLIBC_2_34 —> I needed a “distribution upgrade” to Ubuntu 22.04 because of this. I didn’t find the specific symbol needed that version so I just assume a newer glibc was installed on the machine that builds the SDK.

  2. Since I am using 4.6 target images, I changed this spec line to read libclang.so.15 (see 4.6 Changelog)

  3. Finally, since the compiler was upgraded to 10.3 in the 4.6 OS/target (10.3.1 says the SDK link above) I needed to change this spec line to spell /usr/include/c++/10.3.1/ - the error thrown was inability to find “math.h” and the included path pointed to obj-build-mer-qt-xr/include which was linked to 8.3.0.

Let’s hope that I don’t have to search for changes 4. or 5. in the next hours and the build completes;)
(L.E. step 4 for fully debugging experience was to set chmod a+rx /home/.system where the symbols are → for some reason that was root-only access)

3 Likes

If memory serves this can be caused by building without the --with git_workaround flag (which you can add either directly or to your sfdk config).

I’m also going to have to restart with a fresh SDK to get the latest updates. Thank you for noting the changes you needed to make here as I can follow your advice now when I do.

3 Likes