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

Application Crash on Single Character Search #489

Open
colistro123 opened this issue Oct 13, 2024 · 2 comments
Open

Application Crash on Single Character Search #489

colistro123 opened this issue Oct 13, 2024 · 2 comments

Comments

@colistro123
Copy link
Contributor

Description

Typing single characters into the search bar such as 'd', 'b', 't', 'y', i', 'p', or 'c' causes the application to crash with the following exception:

framework-bb5c596eafb42b22.js:1  TypeError: Cannot read properties of undefined (reading '_index')
    at s.Index.query (487-fa5e521920c20672.js:1:43662)
    at 866-f4055ad1abfad8d2.js:1:7281
    at 162-b0a12650f642b97f.js:1:27716
    at 162-b0a12650f642b97f.js:1:27331
    at Ye (e82996df-2860872e62a5626f.js:1:17280)
    at t.track (e82996df-2860872e62a5626f.js:1:21616)
    at E (162-b0a12650f642b97f.js:1:27307)
    at s (162-b0a12650f642b97f.js:1:27695)
    at oo (framework-bb5c596eafb42b22.js:1:59416)
    at Wo (framework-bb5c596eafb42b22.js:1:68983)

Steps to reproduce

  1. Go to docs.fivem.net.
  2. Type 'd' (or any other character mentioned above) into the search bar.
  3. See error in the browser's developer console.

Expected behavior

The results should be mapped and displayed in the end-user's navigation menu.

@AvarianKnight
Copy link
Collaborator

This is caused by lunr.js index's getting corrupted (from what I'm assuming is the static files not getting updated).

@colistro123
Copy link
Contributor Author

colistro123 commented Oct 13, 2024

This is caused by lunr.js index's getting corrupted (from what I'm assuming is the static files not getting updated).

Yeah, I also believe this is an issue related to the lunr.js node package; I have a hunch it's happening during page load. I would try to replicate this by running it locally with an exact copy of what's on the server and actually using source maps for easier debugging, since it's difficult to debug when using minified js files, especially in production builds.

Chrome and Firefox are also able to load source maps.

Ideally I would also run it on Visual Studio code using NodeJS debug launch configuration so the typescript files can be debugged line by line.

You have a great weekend nonetheless 😊

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

2 participants