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

Admin login fails without error" admin-auth/ 404 (Not Found)" since v2.0 #6367

Closed
Artim96 opened this issue May 7, 2024 · 7 comments
Closed

Comments

@Artim96
Copy link

Artim96 commented May 7, 2024

Describe the bug
After getting v2 to work, I just can't figure out how to log in to the admin settings page, Upon entering what's set in the settings.ini, the page tells me the login failed. Only in the browser developer console I see the error "admin-auth/ 404 (Not Found)" (and in etherpad.access.log I see >>"POST /admin-auth/ HTTP/2.0" 404 94<<). Even with v2.0.3 this isn't fixed. Running bin/run.sh does show that /admin is created though.

Server (please complete the following information):

  • Etherpad version: v2.0.3
  • OS: Debian 12.5
  • Node.js version (node --version): v22.1.0
  • npm version (npm --version): 10.7.0
  • Is the server free of plugins: yes
@SamTV12345
Copy link
Member

You normally navigate to /admin/ and then you should see the new admin console. If it says something like 404. You first need to build the admin panel by going to admin folder and doing pnpm build and copying the dist folder to template/admin

@Artim96
Copy link
Author

Artim96 commented May 10, 2024

I just had pnpm build inside admin. I guess with template/admin you mean src/templates/admin as there is no template directory in etherpads root directory. But which dist folder is supposed to be copied there? The only folders called dist are in /node_modules/.pnpm/. And there are 151 folders with that name.

@dcht00
Copy link
Collaborator

dcht00 commented May 17, 2024

There was also nothing for me at /admin, /src/templates/admin was missing.
Just a

"Sorry, something bad happened"

Running "pnpm build" in the /admin subdirectory of the EP install made those files. But now got an empty page.

The problem is with paths in admin's index.html
I changed

    <script type="module" crossorigin src="/admin/assets/index-6MWu4lkJ.js"></script>
    <link rel="stylesheet" crossorigin href="/admin/assets/index-E-lmtrZj.css">

to

     <script type="module" crossorigin src="assets/index-6MWu4lkJ.js"></script>
     <link rel="stylesheet" crossorigin href="assets/index-E-lmtrZj.css">

This made it work at http://localhost:9001/admin, but not https://localhost/pad/admin (how I usually access EP, via a proxypass), as there's more absolute paths in the .js files.

@SamTV12345
Copy link
Member

There was also nothing for me at /admin, /src/templates/admin was missing. Just a

"Sorry, something bad happened"

Running "pnpm build" in the /admin subdirectory of the EP install made those files. But now got an empty page.

The problem is with paths in admin's index.html I changed

    <script type="module" crossorigin src="/admin/assets/index-6MWu4lkJ.js"></script>
    <link rel="stylesheet" crossorigin href="/admin/assets/index-E-lmtrZj.css">

to

     <script type="module" crossorigin src="assets/index-6MWu4lkJ.js"></script>
     <link rel="stylesheet" crossorigin href="assets/index-E-lmtrZj.css">

This made it work at http://localhost:9001/admin, but not https://localhost/pad/admin (how I usually access EP, via a proxypass), as there's more absolute paths in the .js files.

This is also fixed and I also updated the wiki for it.

@SamTV12345
Copy link
Member

I just had pnpm build inside admin. I guess with template/admin you mean src/templates/admin as there is no template directory in etherpads root directory. But which dist folder is supposed to be copied there? The only folders called dist are in /node_modules/.pnpm/. And there are 151 folders with that name.

I added a new command in the admin directory. If you run pnpm run build-copy . It should also copy the assets in the correct directory.

@Artim96
Copy link
Author

Artim96 commented May 18, 2024

I added a new command in the admin directory. If you run pnpm run build-copy . It should also copy the assets in the correct directory.

I guess that will be available in 2.0.4? Let's hope I can use that version then. Right now I had to go back to 2.0.1 as using the APIKEY in 2.0.3 is broken.

@SamTV12345
Copy link
Member

Sure I'll create a release soon so that Etherpad can be used with the APIKEY again.

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