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

http://localhost:3000/<locale>/_flaws locale page error #10653

Closed
3 tasks done
hochan222 opened this issue Mar 5, 2024 · 12 comments
Closed
3 tasks done

http://localhost:3000/<locale>/_flaws locale page error #10653

hochan222 opened this issue Mar 5, 2024 · 12 comments
Labels
flaw-system issues and feature requests related to the flaws system needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.

Comments

@hochan222
Copy link
Member

hochan222 commented Mar 5, 2024

Summary

The http://localhost:3000/ko/_flaws page shows

"No documents have been built, so no flaws can be found At the moment, you have to use the command line tools to build documents that we can analyze."

even though the yarn build was completed.

URL

http://localhost:3000/<locale>/_flaws

ex)
http://localhost:3000/ko/_flaws

Reproduction steps

  1. nvm use && yarn
  2. yarn build

The /yari/client/build/ko/index.json file was created normally.

Built 41,917 pages in 28.7 minutes, at a rate of 24.3 documents per second.
Peak heap memory usage: 1.60 GB
...
✨ Done in 1725.75s.

  1. yarn dev

Expected behavior

flaw page where flaw items are detected

Actual behavior

"No documents have been built, so no flaws can be found At the moment, you have to use the command line tools to build documents that we can analyze."

Device

Laptop

Browser

Chrome

Browser version

Stable

Operating system

Mac OS

Screenshot

image

Anything else?

more details: #10550 (comment)

Validations

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Mar 5, 2024
@hochan222 hochan222 changed the title [locale flaw page] locale flaw page error Mar 5, 2024
@hochan222 hochan222 changed the title locale flaw page error locale http://localhost:3000/<locale>/_flaws page error Mar 5, 2024
@hochan222 hochan222 changed the title locale http://localhost:3000/<locale>/_flaws page error http://localhost:3000/<locale>/_flaws locale page error Mar 5, 2024
@hochan222 hochan222 changed the title http://localhost:3000/<locale>/_flaws locale page error http://localhost:3000/<locale>/_flaws locale page error Mar 5, 2024
@hochan222
Copy link
Member Author

cc. mdn/translated-content#18056

@caugner
Copy link
Contributor

caugner commented Mar 15, 2024

@hochan222 Do you recall when this last worked, or has this always been broken?

@caugner caugner added the flaw-system issues and feature requests related to the flaws system label Mar 15, 2024
@hochan222
Copy link
Member Author

@caugner This always been broken. Also other contributor has confirmed that the same error happens.

@hochan222
Copy link
Member Author

If it is working properly, please let me know the execution steps after cloning and I will check it.

@caugner
Copy link
Contributor

caugner commented Mar 15, 2024

I actually think the problem is that you run yarn dev after yarn build, which overwrites the client/build directory (via yarn build:client). Can you try yarn start instead, or running yarn build after yarn dev has started the development server? (Note that you still need to run yarn client:build from time to time after pulling.)

Image

@hochan222
Copy link
Member Author

cc. @1ilsang

@hochan222
Copy link
Member Author

hochan222 commented Mar 16, 2024

@caugner Thank you. The flaws page looks good. I guess I'm missing something. Did you proceed as in case 1 below?

@1ilsang Is it going to work out? I'm not working well case 1 ~ 3. hmm...


  • case 1: git clone => nvm use => sudo yarn => create .env file (for CONTENT_TRANSLATED_ROOT, CONTENT_ROOT) => sudo yarn start => http://localhost:3000/ko/_flaws => fail
  • case 2: git clone => nvm use => sudo yarn => create .env file => sudo yarn start => sudo yarn client:build => sudo yarn start => http://localhost:3000/ko/_flaws => fail
  • case 3: git clone => nvm use => sudo yarn => create .env file => yarn client:build => sudo yarn start => http://localhost:3000/ko/_flaws => fail
  • case 4: git clone => nvm use => sudo yarn => create .env file => sudo yarn dev => sudo yarn build => sudo yarn start => http://localhost:3000/ko/_flaws => success

@hochan222
Copy link
Member Author

hochan222 commented Mar 16, 2024

@caugner Anyway, since I built it after yarn dev, it came out well! Thank you.

The build process seems to be essential, so it would be good to close the issue.

image

@caugner
Copy link
Contributor

caugner commented Mar 18, 2024

  • case 1: git clone => nvm use => sudo yarn => create .env file (for CONTENT_TRANSLATED_ROOT, CONTENT_ROOT) => sudo yarn start => http://localhost:3000/ko/_flaws => fail

  • case 2: git clone => nvm use => sudo yarn => create .env file => sudo yarn start => sudo yarn client:build => sudo yarn start => http://localhost:3000/ko/_flaws => fail

  • case 3: git clone => nvm use => sudo yarn => create .env file => yarn client:build => sudo yarn start => http://localhost:3000/ko/_flaws => fail

@hochan222 Two questions:

  1. Do you need to run yarn with sudo privileges? (This doesn't look right.)
  2. Is the failure you refer to this error: (This PR should fix that.)
    error: ENOENT: no such file or directory, open '/path/to/yari/popularities.json'
    

@hochan222
Copy link
Member Author

hochan222 commented Mar 18, 2024

@caugner Currently, the flaws page is not working in case 1. (main branch)

  1. It used to fail when running without sudo, but now it works fine even without sudo.

I don't remember the error, but I think a permission error occurred in the cloud-function-related download (maybe..?) when executing the yarn command. It's been happening for the past week when I recently ran yari, but it hasn't happened today..! (Or... I shut down the computer completely, but there may have been something wrong with me.)

It's working fine now.

  1. By failure I meant the _flaws page error below. Also, I'm getting the following error in the fix-yarn-start-add-popularities branch.
image

@caugner
Copy link
Contributor

caugner commented Mar 18, 2024

I don't remember the error, but I think a permission error occurred in the cloud-function-related download

I have seen a permission-related error here: #10717
Otherwise it could have been an error related to downloading @vscode/ripgrep, which regularly fails.

Please report the error message the next time you are seeing it.

2. By failure I meant the _flaws page error below. Also, I'm getting the following error in the fix-yarn-start-add-popularities branch.

It might be nice if the error message said what command to run, e.g.: "Run yarn build --locale ko to build all documents for the current locale." Feel free to open a PR! 😉

Since it is working fine for you now, I'm going ahead and close this issue as resolved. 🎉

@caugner caugner closed this as completed Mar 18, 2024
@hochan222
Copy link
Member Author

@caugner I understand! Confirmed that it works well!

Thank you very much for your help in resolving the difficulty.

Feel free to open a PR!😉

Yes I will. Also, I will write the ko locale guide related to current issues.

Have a good one :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaw-system issues and feature requests related to the flaws system needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.
Projects
None yet
Development

No branches or pull requests

2 participants