WASM port of Endless Sky doesn't start download, and therefore unplayable

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
jobbautista9
Keeps coming back
Keeps coming back
Posts: 784
Joined: 2020-11-03, 06:47
Location: Philippines
Contact:

WASM port of Endless Sky doesn't start download, and therefore unplayable

Unread post by jobbautista9 » 2021-04-29, 10:09

There's this interesting WebAssembly port of Endless Sky, which is basically a spiritual successor to the Escape Velocity game. I'm really a fan of ES, I remember contributing to one of their missions, as well as writing some random alien hails. Anyway, the port is not working on Pale Moon. Here are the errors the browser's EC gave to me:

Code: Select all

Timestamp: Thursday, 29 April, 2021 06:00:27 PM PST
Error: downloadable font: rejected by sanitizer (font-family: "Ubuntu" style:normal weight:normal stretch:normal src index:0) source: http://play-endless-sky.com/Ubuntu-Regular.ttf
Source File: http://play-endless-sky.com/
Line: 11, Column: 18
Source Code:
@font-face {   font-family: "Ubuntu";   src: url("Ubuntu-Regular.ttf"); }

Timestamp: Thursday, 29 April, 2021 06:00:32 PM PST
Error: TypeError: response.body is undefined
Source File: http://play-endless-sky.com/js/cached-resource.js
Line: 85
I've reported this as well to the porters, and gave the error in the JavaScript (which seems to be the fatal cause here). Hopefully they could fix it, if possible. But even if it's fixed, it's probably going to run hella slow, since Firefox is struggling with it. This is not an issue of course, in Chromium.

Anyway, I don't understand the TypeError here. Why is response.body returning undefined? response is clearly defined as a constant with await fetch(this.resourceUrl) as its value a few lines back. Maybe a problem with our implementation of Fetch API?
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: 35599
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: WASM port of Endless Sky doesn't start download, and therefore unplayable

Unread post by Moonchild » 2021-04-29, 12:12

jobbautista9 wrote:
2021-04-29, 10:09
Maybe a problem with our implementation of Fetch API?
very unlikely.
response.body will also be undefined if the server simply doesn't provide a reply to the request. i.e. if it somehow blocks the request.
"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

ballingt

Re: WASM port of Endless Sky doesn't start download, and therefore unplayable

Unread post by ballingt » 2021-05-03, 03:52

In this case calling `response.text()` on the response works, it's just that the response doesn't seem to have body getter at all.

Here's a page that shows this: http://play-endless-sky.com/repro/repro.html

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

Re: WASM port of Endless Sky doesn't start download, and therefore unplayable

Unread post by Moonchild » 2021-05-03, 07:52

Ah, that's right. Response.body was added as part of Fetch Streams, it is not in the base Fetch spec. Sorry about my initial confusion - I don't have everything about all the specs at the forefront of my memory at all times - grey matter bank switching and all that.
Sorry but we don't support arbitrary Fetch data streams at this time; unless you specifically have a need for streams and stream processing in fetch requests, you should avoid using it. If you just want to get the body contents of arbitrary files asynchronously without further processing through Fetch Streams, use text(). If you want to send arbitrary binary data, convert it to a dataurl first or use blob() directly.
"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
jobbautista9
Keeps coming back
Keeps coming back
Posts: 784
Joined: 2020-11-03, 06:47
Location: Philippines
Contact:

Re: WASM port of Endless Sky doesn't start download, and therefore unplayable

Unread post by jobbautista9 » 2021-05-03, 09:00

The wasm now downloads, but the game still fails to start, even if I enable webgl.enable-draft-extensions and webgl.enable-privileged-extensions.

Error Console says:

Code: Select all

Timestamp: Monday, 03 May, 2021 04:57:53 PM PST
Warning: Error: WebGL: getExtension('MOZ_WEBGL_compressed_texture_s3tc'): MOZ_ prefixed WebGL extension strings are deprecated. Support for them will be removed in the future. Use unprefixed extension strings. To get draft extensions, set the webgl.enable-draft-extensions preference.
Source File: http://play-endless-sky.com/endless-sky.js
Line: 8272
Debug panel in the game simply says Error: Shader compilation failed.
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: 35599
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: WASM port of Endless Sky doesn't start download, and therefore unplayable

Unread post by Moonchild » 2021-05-03, 09:15

Game seems to start for me but it is very slow to initialize -- you may get an unresponsive script warning on which you have to press "continue".
Otherwise it seems to run just fine. If you have WebGL shader compilation issues you may need better WebGL hardware support.
Attachments
Image1.png
"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
jobbautista9
Keeps coming back
Keeps coming back
Posts: 784
Joined: 2020-11-03, 06:47
Location: Philippines
Contact:

Re: WASM port of Endless Sky doesn't start download, and therefore unplayable

Unread post by jobbautista9 » 2021-05-03, 09:20

I got an unresponsive script warning as well, and I clicked continue. But it doesn't start for me. Same happens in a fresh profile. I'm gonna try again in the official build (since I'm using stevepusser's deb builds), with a fresh profile.
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
jobbautista9
Keeps coming back
Keeps coming back
Posts: 784
Joined: 2020-11-03, 06:47
Location: Philippines
Contact:

Re: WASM port of Endless Sky doesn't start download, and therefore unplayable

Unread post by jobbautista9 » 2021-05-03, 09:28

Same problem in the official build, with fresh profile. Tried turning the draft extensions preference on, no luck. Seems like a Linux-specific problem.
endless-sky-wasm-pm.png
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: 35599
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: WASM port of Endless Sky doesn't start download, and therefore unplayable

Unread post by Moonchild » 2021-05-03, 09:29

As I said you probably need better WebGL hardware support to play this game. Your flavour of Linux may not provide it.
"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

New Tobin Paradigm

Re: WASM port of Endless Sky doesn't start download, and therefore unplayable

Unread post by New Tobin Paradigm » 2021-05-03, 15:25

Isn't WebGL dependent on hwaccel? Which is disabled by default on the linux for minefield reasons?

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

Re: WASM port of Endless Sky doesn't start download, and therefore unplayable

Unread post by Moonchild » 2021-05-03, 15:54

It is dependent on hwaccel or software emulation. I was assuming since a webgl game was attempted that hwaccel was enabled. But as said too it may simply not work well on the target system.
"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

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

Re: WASM port of Endless Sky doesn't start download, and therefore unplayable

Unread post by vannilla » 2021-05-03, 17:17

If it means anything, I can play the game, though I didn't go further than the moment I can control the ship.
It locks up the browser during initialization, but I don't get an unresponsive script message.
The game seems to run decently, for what I've played.
I'm on Linux.

Locked