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

[Replay Bug]: Star Citizen ARK Starmap - stuck on loading #277

Open
ZheniaZuser opened this issue Jan 7, 2024 · 4 comments
Open

[Replay Bug]: Star Citizen ARK Starmap - stuck on loading #277

ZheniaZuser opened this issue Jan 7, 2024 · 4 comments
Labels
replay bug Archived content is not displaying as expected

Comments

@ZheniaZuser
Copy link

ZheniaZuser commented Jan 7, 2024

https://robertsspaceindustries.com/starmap
image

using Brave

@Shrinks99
Copy link
Member

Can replicate, looks like a replay issue? Moving to ReplayWebpage.

@Shrinks99 Shrinks99 transferred this issue from webrecorder/archiveweb.page Jan 8, 2024
@Shrinks99 Shrinks99 added the replay bug Archived content is not displaying as expected label Jan 8, 2024
@ikreymer
Copy link
Member

ikreymer commented Jan 9, 2024

Took a quick look. This may actually be a capture issue under the hood - there is an empty POST request that is being incorrectly recorded as a GET request. However, there may be also additional issues on top of that.

@Shrinks99
Copy link
Member

sigh oops. This is the https://robertsspaceindustries.com/api/starmap/bootup 404? Seems to be within the WACZ I made. Unsure about the request type though.

@ikreymer
Copy link
Member

ikreymer commented Jan 9, 2024

This is fixable but involves not 1 but 2 tricky edge case scenarios:

  1. When storing a POST request with no/empty body, ArchiveWeb.page actually just treats it as a GET request, because the body is missing. However, ReplayWeb.page attempts to match it as a POST request. This should be addressed by either changing ArchiveWeb.page, or changing ReplayWeb.page to behave the same way (if no POST data, even though a POST request is made, just treat it as a GET, and not look for &__wb_method=POST query arg).

  2. The site uses an <object> tag for SVG rendering, however, <object> tag don't work well with service workers (see: object/embed w3c/ServiceWorker#249). The best option is to actually rewrite an <object> tag to an iframe if the type is image/svg+xml. We also want the same behavior for PDFs, already partially implemented. For server side rewriting, can just replace <object> -> <iframe> if the type attribute matches. However, it becomes a bit more tricky when the element is created dynamically and events are added, eg:

const element = document.createElement("object")
element.type = "image/svg+xml";
element.addEventListener("load", ...)

We need a way to create either an <object> or an <iframe> based on the object type, but it is set later, so can't determine it in createElement. Replacing the element later is also tricky, as calling code will be pointing to a dead element.

In testing, when forcing all object -> iframe, this works, but this may break other things (eg. if is a flash, etc..). A possible workaround may be to create some intermediate proxy object, and actually create an object or iframe when appendChild() is called...

Just forcing the object to iframe does result in a working replay:
Screenshot 2024-01-09 at 12 14 00 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
replay bug Archived content is not displaying as expected
Projects
None yet
Development

No branches or pull requests

3 participants