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

Unable to enter the main interface after enabling the kernel read-only mode #9086

Closed
3 tasks done
ttionya opened this issue Sep 1, 2023 · 0 comments
Closed
3 tasks done
Assignees
Labels
Milestone

Comments

@ttionya
Copy link

ttionya commented Sep 1, 2023

JavaScript error in Docker deployment with readonly mode

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

I started Docker in read-only mode, and when accessing the webpage, I encountered an error.

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'querySelector')
    at q (main.9a75b62f705f1d3e8e60.js:9:951)
    at Je (main.9a75b62f705f1d3e8e60.js:9:3241)
    at main.9a75b62f705f1d3e8e60.js:2677:3420
    at Generator.next (<anonymous>)
    at s (main.9a75b62f705f1d3e8e60.js:2677:2114)

This error is causing the page to stay on the logo screen, preventing access.

The problematic code appears to be

const messagesElement = document.getElementById("message").firstElementChild;
, as there is only an empty <div id="message"></div> tag without any child elements at this point.

The reason for this issue is that the /api/petal/loadPetals endpoint is returning an error with the message "This operation is not supported in read-only mode" as indicated by the code

ginServer.Handle("POST", "/api/petal/loadPetals", model.CheckAuth, model.CheckReadonly, loadPetals)

Expected result

Accessing it normally.

Screenshot or screen recording presentation

No response

Version environment

- Version: b3log/siyuan:latest (d98b12be149e20ac1ab577194a643ff670c9a0eea38c213feed8ded6e0dba9dc)
- Operating System: Windows 10
- Browser (if used): Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36

    * ver [2.10.2]
    * arch [amd64]
    * os [alpine]
    * pid [45]
    * runtime mode [prod]
    * working directory [/opt/siyuan]
    * read only [true]
    * container [docker]
    * database [ver=20220501]
    * workspace directory [/root/SiYuan]

Log file

More information

No response

@88250 88250 self-assigned this Sep 1, 2023
@88250 88250 changed the title JavaScript error in Docker deployment with readonly mode Unable to enter the main interface after enabling the kernel read-only mode Sep 1, 2023
@88250 88250 added the Bug label Sep 1, 2023
@88250 88250 added this to the 2.10.3 milestone Sep 1, 2023
@88250 88250 closed this as completed Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants