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

Broken example since 3.3.0 #2900

Closed
0x26res opened this issue Jan 22, 2025 · 3 comments
Closed

Broken example since 3.3.0 #2900

0x26res opened this issue Jan 22, 2025 · 3 comments

Comments

@0x26res
Copy link

0x26res commented Jan 22, 2025

Hi think this change #2890 has changed how the API works.

It means that this example

const websocket = await perspective.websocket("ws://localhost:8080/websocket");
doesn't work any more.

As far as I can tell these is no websocket in the client? Or maybe the library isn't imported correctly?

@philippWassibauer
Copy link

philippWassibauer commented Feb 1, 2025

i ran into the same issue. i tried this:

const worker = perspective.default.shared_worker();
     const websocket = perspective.default.websocket(
          "ws://localhost:8080/websocket"
     );

but I couldn't get it to work.

@texodus
Copy link
Member

texodus commented Feb 1, 2025

Closing, please follow the Issue template before re-opening this.

@0x26res I don't think this PR is related to whatever you are seeing, but this example works fine for me on v3.3.1 following the developer instructions for building examples so this needs a repro.

Looking at the code, I could imagine the module-typed imports could be loaded out-of-order depending on other external variables (and we've made this order explicit in all other examples). So I've added an explicit import for @finos/perspective-viewer to the streaming example's index.html in the documentation update for v3.3.2.

@texodus texodus closed this as completed Feb 1, 2025
@0x26res
Copy link
Author

0x26res commented Feb 3, 2025

@texodus I got it to work by changing the import, and also removing the window.addEventListener("DOMContentLoaded", async function (), which was removed with this commit 37307ca

Thanks.

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

3 participants