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

Benchmarks are broken: window.maplibreglBenchmarks is undefined #3894

Closed
kubapelc opened this issue Mar 25, 2024 · 3 comments · Fixed by #3908
Closed

Benchmarks are broken: window.maplibreglBenchmarks is undefined #3894

kubapelc opened this issue Mar 25, 2024 · 3 comments · Fixed by #3908
Labels
bug Something isn't working

Comments

@kubapelc
Copy link
Collaborator

maplibre-gl-js version: v4.0.0-pre5, and any newer version up to current v4.1.1

browser: Firefox 115.9.1esr, Chrome 122.0.6261.131

Steps to Trigger Behavior

  1. npm run start-bench
  2. Open any benchmark in the browser, such as http://localhost:9966/test/bench/versions/index.html#Layout

Expected Behavior

An empty benchmark graph appears and the benchmark starts executing. No errors in console.

Actual Behavior

Empty page with errors in the console.

On firefox:

TypeError: can't convert undefined to object
    runComparison http://localhost:9966/test/bench/versions/index.html#Layout:33

On Chrome:

Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME

index.html:69 TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at runComparison (index.html:33:50)

Notes

I've tried to binary search for the commit that broke this, and the first commit with broken benchmarks is 15afd542, which is a merge of #3601

@kubapelc kubapelc changed the title Benchmarks are broken Benchmarks are broken: window.maplibreglBenchmarks is undefined Mar 25, 2024
@HarelM
Copy link
Collaborator

HarelM commented Mar 25, 2024

Bummer, I should've ran the benchmarks to see that they still run after this commit.
Thanks for the update!
Let me know if you prefer to let me handle this or open a PR to solve this.

@HarelM HarelM added the bug Something isn't working label Mar 25, 2024
@kubapelc
Copy link
Collaborator Author

I prefer to let you handle it, I have no idea what might be causing this or how to fix it. I would try to binary search the commits of the PR to see what actually caused the benchmarks to break and look for clues there, but that branch doesn't seem to be around anymore.

@HarelM
Copy link
Collaborator

HarelM commented Mar 25, 2024

The changes there are minimal in terms of code, it's more about how maplibre is packed and exposed. Since the benchmark are also packing maplibre in a different way I can imagine why this broke, but I'll still need to find where to fix it.
It might take a few days though...

@HarelM HarelM mentioned this issue Mar 26, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants