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

relative imports in .js are not loaded #883

Open
steph-nb opened this issue Feb 16, 2024 · 0 comments
Open

relative imports in .js are not loaded #883

steph-nb opened this issue Feb 16, 2024 · 0 comments

Comments

@steph-nb
Copy link

Expected behavior

The page https://www.kunsthoch-luzern.ch/ (recorded with Heritrix) should be visible

What actually happened

The page https://www.kunsthoch-luzern.ch/ (recorded with Heritrix) stays completely white in the replay with pywb 2.7.4
Whereas the same crawl can be replayed with openwayback...

##Assumed cause
Imports in js using relative paths are not getting requested/loaded:

The page uses this js:
https://www.kunsthoch-luzern.ch/ressources/js/main.js

which imports these .js:

import {NullSwiper as e} from "./mods/nullswiper.js";
import {ViewportFix as t} from "./helpers/viewportFix.js";
import {ClientInformations as o} from "./helpers/clientInformations.js";
import {EventHandler as r} from "./helpers/eventHandler.js";
import {Simplify as a} from "./helpers/simplify.js";
import {AddNullInteract as n} from "./helpers/nullInteract.js";
import {menuHandler as i} from "./static/menuHandler.js";
import {SubMenu as s} from "./static/submenu.js";
import {Cookie as l} from "./static/cookie.js";
import {Cursor as c} from "./static/cursor.js";
import {MapHandler as m} from "./dynamic/map.js";

With the rewritten form served by pywb which looks like this:

var WB$wombat$assign$function = function(name) {
return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name];
};
if (!self.__WB_pmw) {
self.__WB_pmw = function(obj) {
this.__WB_source = obj;
return this;
}
}
{
let window = WB$wombat$assign$function("window");
let self = WB$wombat$assign$function("self");
let document = WB$wombat$assign$function("document");
let location = WB$wombat$assign$function("location");
let top = WB$wombat$assign$function("top");
let parent = WB$wombat$assign$function("parent");
let frames = WB$wombat$assign$function("frames");
let opener = WB$wombat$assign$function("opener");
let arguments;

{
    import {NullSwiper as e} from "./mods/nullswiper.js";
    import {ViewportFix as t} from "./helpers/viewportFix.js";
    import {ClientInformations as o} from "./helpers/clientInformations.js";
    import {EventHandler as r} from "./helpers/eventHandler.js";
    import {Simplify as a} from "./helpers/simplify.js";
    import {AddNullInteract as n} from "./helpers/nullInteract.js";
    import {menuHandler as i} from "./static/menuHandler.js";
    import {SubMenu as s} from "./static/submenu.js";
    import {Cookie as l} from "./static/cookie.js";
    import {Cursor as c} from "./static/cursor.js";
    import {MapHandler as m} from "./dynamic/map.js";
    const u = {
        viewportFix: new t,

...

These js-files are not requested by the browser.

Browser and pywb

  • pywb 2.7.4
  • OS: Windows 11
  • Browser : Chrome
  • Version : 111.0.5563.111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant