5rahim / seanime

Open-source media server for anime and manga.
https://seanime.rahim.app
MIT License
402 stars 31 forks source link

bug: Cannot GET /index.html #124

Closed aicynide closed 2 months ago

aicynide commented 2 months ago

Checklist

Bug Severity

Usability is affected

Bug Area

UI / Web Interface

Bug Description / Steps to Reproduce

  1. Install seanime in termux pkg ins seanime
  2. Run seanime

Expected Behavior

No response

Screenshots

No response

Logs


        .-----.
       /    _ /
       \_..`--.
       .-._)   \
       \       /
        `-----'

    Seanime
        2.1.1
            Akagami

2024-09-10 10:56:33 INF - app > Seanime 2.1.1-Akagami
2024-09-10 10:56:33 INF - app > OS: android
2024-09-10 10:56:33 INF - app > Arch: arm64
2024-09-10 10:56:33 INF - app > Processor count: 6
2024-09-10 10:56:33 DBG - app > Initializing config
2024-09-10 10:56:33 INF - app > Data directory: /data/data/com.termux/files/home/.config/Seanime
2024-09-10 10:56:33 INF - app > Working directory: /data/data/com.termux/files/usr/bin
2024-09-10 10:56:33 INF - db > Database instantiated name=seanime.db
2024-09-10 10:56:33 DBG - db > Local files retrieved
2024-09-10 10:56:33 DBG - manga downloader > Reading download directory
2024-09-10 10:56:33 TRC - ws > Sending message type=refreshed-manga-download-data
2024-09-10 10:56:33 DBG - app > Refreshing modules
2024-09-10 10:56:33 TRC - torrent repo > Setting settings
2024-09-10 10:56:33 INF - discordrpc > Discord Rich Presence enabled
2024-09-10 10:56:33 ERR - discordrpc > rich presence enabled but failed to create discord rpc client error="dial unix /data/data/com.termux/files/usr/tmp/discord-ipc-0: connect: no such file or directory"
2024-09-10 10:56:33 ERR - app > Failed to login to qBittorrent error="Post \"http://127.0.0.1:8080/api/v2/auth/login\": dial tcp 127.0.0.1:8080: connect: connection refused"
2024-09-10 10:56:33 INF - watcher > Watching directory: "/data/data/com.termux/files/home/storage/shared/Download/Videos"
2024-09-10 10:56:33 INF - app > Refreshed modules
2024-09-10 10:56:33 DBG - manga > Initialized provider extension bank
2024-09-10 10:56:33 DBG - onlinestream > Initialized provider extension bank
2024-09-10 10:56:33 DBG - torrent repo > Initialized anime provider extension bank
2024-09-10 10:56:33 DBG - extensions > Loaded built-in manga provider extension id=comick
2024-09-10 10:56:33 DBG - extensions > Loaded built-in manga provider extension id=comick-multi
2024-09-10 10:56:33 DBG - extensions > Loaded built-in manga provider extension id=mangapill
2024-09-10 10:56:33 DBG - extensions > Loaded built-in manga provider extension id=mangasee
2024-09-10 10:56:33 DBG - extensions > Loaded built-in manga provider extension id=mangadex
2024-09-10 10:56:33 DBG - extensions > Loaded built-in manga provider extension id=manganato
2024-09-10 10:56:33 DBG - extensions > Loaded built-in onlinestream provider extension id=gogoanime
2024-09-10 10:56:33 DBG - extensions > Loaded built-in onlinestream provider extension id=zoro
2024-09-10 10:56:33 DBG - extensions > Loaded built-in anime torrent provider extension id=nyaa
2024-09-10 10:56:33 DBG - extensions > Loaded built-in anime torrent provider extension id=nyaa-sukebei
2024-09-10 10:56:33 DBG - extensions > Loaded built-in anime torrent provider extension id=animetosho
2024-09-10 10:56:33 DBG - extensions > Loaded built-in anime torrent provider extension id=seadex
2024-09-10 10:56:33 TRC - extensions > Loading external extensions
2024-09-10 10:56:33 TRC - extensions > Killing Goja VMs
2024-09-10 10:56:33 DBG - extensions > Killed Goja VMs
2024-09-10 10:56:33 TRC - extensions > Unloading external extensions
2024-09-10 10:56:33 DBG - extensions > Unloaded external extensions
2024-09-10 10:56:33 DBG - extensions > Loaded external extensions
2024-09-10 10:56:33 TRC - ws > Sending message type=extensions-reloaded
2024-09-10 10:56:33 DBG - app > Fetching Anilist data
2024-09-10 10:56:33 INF - app > Authenticated to AniList as triangleid
2024-09-10 10:56:33 DBG - anilist > Fetching anime collection username=triangleid
2024-09-10 10:56:33 INF - watcher > Library size: 9.0 GB
2024-09-10 10:56:34 DBG - animetosho > Loaded Sneedex Nyaa IDs count=1350
2024-09-10 10:56:35 WRN - anilist > Successful Request (slow) rlr=89 rtt=2.112s
2024-09-10 10:56:35 INF - app > Fetched Anilist data
2024-09-10 10:56:35 DBG - transcoder > Hardware acceleration: disabled
2024-09-10 10:56:35 INF - transcoder > Initialized
2024-09-10 10:56:35 INF - mediastream > Transcoder module initialized
2024-09-10 10:56:35 INF - mediastream > Module initialized
2024-09-10 10:56:35 INF - torrentstream > Initialized torrent client on port 43213
2024-09-10 10:56:35 TRC - torrentstream > Dropping all torrents
2024-09-10 10:56:35 DBG - torrentstream > Dropped all torrents
2024-09-10 10:56:35 INF - torrentstream > Creating streaming server on 0.0.0.0:43214
2024-09-10 10:56:35 INF - torrentstream > Module initialized
2024-09-10 10:56:35 INF - app > Serving embedded web interface
2024-09-10 10:56:35 INF - app > Web assets path: /data/data/com.termux/files/home/.config/Seanime/assets
2024-09-10 10:56:35 INF - app > Manga downloads path: /storage/emulated/0/Tachiyomi/local
2024-09-10 10:56:35 INF - app > Server Address: 0.0.0.0:43211
2024-09-10 10:56:35 INF - app > Seanime started at :43211
2024-09-10 10:56:45 WRN - api > Client error error="Cannot GET /index.html" latency="56.563µs" method=GET url=/
2024-09-10 10:56:48 WRN - api > Client error error="Cannot GET /index.html" latency="53.958µs" method=GET url=/

Debugging Checklist

App Version

v2.1.1

Operating System

Linux

aicynide commented 2 months ago

@5rahim

5rahim commented 2 months ago

This issue doesn't occur in any of the published binaries, even the Linux one. This is an issue with the web framework package not supporting the Termux environment or something else, idk. Not on my end.

aicynide commented 2 months ago

Since v2.1.1 this error is happening, v2.1.0 works just fine in android. Was anything changed in seanime react code? v2.1.0 link https://github.com/termux/termux-packages/actions/runs/10779296063

5rahim commented 2 months ago

Nothing in the build process was changed

aicynide commented 2 months ago

@5rahim check the buildscript; https://github.com/termux/termux-packages/blob/master/packages/seanime/build.sh ; you are the one able to fix it

5rahim commented 2 months ago

If like you said 2.1.0 works then there's nothing to fix there since the build process did not change. Try and build 2.1.1 yourself for termux, if the error doesn't occur then this is an issue with the termux release.

SonaliBendre commented 2 months ago

@5rahim react build has some issue


> seanime-web@0.1.0 build
> next build

Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry

  ▲ Next.js 14.2.7

   Creating an optimized production build ...
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
 Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
 ✓ Compiled successfully
   Linting and checking validity of types  ...Failed to compile.

./src/api/hooks/anime_entries.hooks.ts:11:24
Type error: '"@/api/generated/types"' has no exported member named 'Anime_AnimeEntry'. Did you mean 'Anime_Entry'?

   9 | } from "@/api/generated/endpoint.types"
  10 | import { API_ENDPOINTS } from "@/api/generated/endpoints"
> 11 | import { AL_BaseAnime, Anime_AnimeEntry, Anime_LocalFile, Anime_MissingEpisodes, Nullish } from "@/api/generated/types"
     |                        ^
  12 | import { useQueryClient } from "@tanstack/react-query"
  13 | import { toast } from "sonner"
  14 |
SonaliBendre commented 2 months ago

wtf!!😂😂😂 image

SonaliBendre commented 2 months ago

wtf seanime is building even after i delete many files in web directory i ran and getting the same error which is obvious You have to write a script to detect all web-ui assets properly and throw error if any single file missing

5rahim commented 2 months ago

You need to build from the latest tagged commit because obviously the later commits are work in progress.

aicynide commented 2 months ago

You need to build from the latest tagged commit because obviously the later commits are work in progress.

Its latest tagged commit https://github.com/termux/termux-packages/blob/master/packages/seanime/build.sh#L5-L7

What i'm saying is build system need to fix because it builds the app even when some web-ui files are missing

5rahim commented 2 months ago

You need to build from the latest tagged commit because obviously the later commits are work in progress.

I'm talking about your local build

build system need to fix because it builds the app even when some web-ui files are missing

You can do that yourself by checking that the web folder is not empty before building the server

SonaliBendre commented 2 months ago

build system need to fix because it builds the app even when some web-ui files are missing

You can do that yourself by checking that the web folder is not empty before building the server

even if 1 single .html file is missing its have this error

SonaliBendre commented 2 months ago

build system need to fix because it builds the app even when some web-ui files are missing

You can do that yourself by checking that the web folder is not empty before building the server

how exactly will i be able to check it in Github Actions? https://github.com/termux/termux-packages/actions/runs/10819176659/job/30016456462

SonaliBendre commented 2 months ago

do you use any special kind of Github Actions?

5rahim commented 2 months ago

Just ls the web folder and check that it's not empty. The next.js build won't just simply miss some files so there's no need to check individual files.

5rahim commented 2 months ago

Closing as this is not a bug related to the current releases.

SonaliBendre commented 2 months ago

Just ls the web folder and check that it's not empty. The next.js build won't just simply miss some files so there's no need to check individual files.

is your Github Actions can be used interactive mode? well, the Github Actions that termux and probably many other projects use don't let to do this

termux package policy don't accept PR for uunnecassary thing like "ls"

5rahim commented 2 months ago

I can't help you with that, there might be an issue with the termux build process failing to adequately copy the web files. Also, I don't check the web folder in my github actions because I don't see the need.

SonaliBendre commented 2 months ago

Closing as this is not a bug related to the current releases.

it is https://github.com/5rahim/seanime/issues/124#issuecomment-2351993901 https://github.com/5rahim/seanime/issues/124#issuecomment-2352036221

5rahim commented 2 months ago

it is https://github.com/5rahim/seanime/issues/124#issuecomment-2351993901

It's not, you tried to build from an untagged commit which was a work in progress with bugs.

SonaliBendre commented 2 months ago

it is #124 (comment)

It's not, you tried to build from an untagged commit which was a work in progress with bugs.

clearly mentioned in the issue report that the bug is regarding termux and not my local build image

SonaliBendre commented 2 months ago

Also, I don't check the web folder in my github actions because I don't see the need.

understandable https://repology.org/project/seanime/versions

5rahim commented 2 months ago

clearly mentioned in the issue report that the bug is regarding termux and not my local build

  1. Your comment about "react build has some issue" is due to the fact that you tried to build from an untagged commit.
  2. Your bug report is not related the current Seanime releases, which is a fact since none of them have this issue. It's most likely related to the Termux build process, so I can't help you with that.
5rahim commented 2 months ago

image

You're copying the out directory itself under web, instead of its content. It should be cp -r $TERMUX_PKG_HOSTBUILD_DIR/seanime-web/out/* $TERMUX_PKG_SRCDIR/web/