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

TypeError: handler is not a function #1

Open
Cthalin opened this issue Oct 19, 2022 · 7 comments
Open

TypeError: handler is not a function #1

Cthalin opened this issue Oct 19, 2022 · 7 comments

Comments

@Cthalin
Copy link

Cthalin commented Oct 19, 2022

Hi,
I wanted to try out your gallery on a Synology NAS via Docker.
Upon start this error happens

TypeError: handler is not a function
    at Server.<anonymous> (/app/server.js:19:11)
    at Server.emit (node:events:513:28)
    at parserOnIncoming (node:_http_server:980:12)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
Error regenerating...
Request failed with status code 500

Found your r/selfhosted thread and someone there had the same issue it seems on another NAS. (https://www.reddit.com/r/selfhosted/comments/y1lig3/first_release_of_thephotogallery_a_simple/)

@Inlustra
Copy link
Owner

Thanks for taking the time to document your issue!
Can I ask what the NAS is? I'm wondering if this is an x86 vs arm or multi-platform issue as I've been unable to reproduce with the hardware I have available.

@Cthalin
Copy link
Author

Cthalin commented Oct 19, 2022

Sure, should have added it in the first post already. The NAS is a 920+ from Synology. It has a Celeron J4125 CPU.

@Inlustra
Copy link
Owner

Thanks again, did you deploy with Docker and docker-compose?

@Inlustra
Copy link
Owner

Just trying to gleam as much info as poss!

@Cthalin
Copy link
Author

Cthalin commented Oct 19, 2022

I did not use docker-compose. Just ran docker run via scheduled task like I mostly do.

docker run -d --name=thephotogallery \
-p 3600:3000 \
-e PAGE_TITLE=Test \
-e PAGE_HEADER_TEXT=Test \
-e PAGE_SHOW_FULLSCREEN_BUTTON=true \
-e PHOTO_SORT=numerical_file_name \
-e PHOTO_DEFAULT_REVERSE=false \
-v /volume1/docker/thephotogallery/public:/app/public/photos:ro \
-v /volume1/docker/thephotogallery/storage:/app/storage \
--restart always \
inlustra/the-photo-gallery:0.0.3

@bumgarb
Copy link

bumgarb commented Oct 23, 2022

I'm having the same issue on a DS1520+ which is also a Celeron J4125 CPU.
I'm following this guide from Marius Hosting:
https://mariushosting.com/how-to-install-the-photo-gallery-on-your-synology-nas/

which has this docker run command (only I updated to 0.0.3) and the title/header:

docker run -d --name=thephotogallery \
-p 3600:3000 \
-e PAGE_TITLE=<change title> \
-e PAGE_HEADER_TEXT=<change header> \
-e PAGE_SHOW_FULLSCREEN_BUTTON=true \
-e PHOTO_SORT=numerical_file_name \
-e PHOTO_DEFAULT_REVERSE=false \
-v /volume1/docker/thephotogallery/public:/app/public/photos:ro \
-v /volume1/docker/thephotogallery/storage:/app/storage \
--restart always \
inlustra/the-photo-gallery:0.0.3

@Inlustra
Copy link
Owner

Unfortunately I'm a little lost on how to fix this one myself as I have no access to such a machine.
It might be something obvious but a little google doesn't really seem to help an multi-arch images are not really something I've dabbled in.

Perhaps someone could try cloning, running yarn install --frozen-lockfile && yarn dev?

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