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

panic: runtime error: invalid memory address or nil pointer dereference #944

Open
UsefulVid opened this issue May 11, 2024 · 3 comments
Open
Labels
bug Something isn't working docker Related to deployment with Docker pending response A issue or PR which is waiting for clarifications from OP

Comments

@UsefulVid
Copy link

UsefulVid commented May 11, 2024

Describe the bug
Container fails to start

To Reproduce
Start the docker container

Expected behavior
Container should start

Screenshots
image

Your environment:
Feel free to remove and add what you think might be useful.

  • Are you using Docker? yes
  • Database not sure, is this not installed via docker?
  • Browser brave

Additional context
Just installed it on my synology with docker according to the readme.
Do I have to install the db additionally?



viktorstrate-photoview-1
date,stream,content
2024/05/11 19:16:13,stdout,	/app/server.go:45 +0x128

2024/05/11 19:16:13,stdout,main.main()

2024/05/11 19:16:13,stdout,	/app/database/database.go:177 +0x66

2024/05/11 19:16:13,stdout,github.com/photoview/photoview/api/database.MigrateDatabase(0xe5ab29?)

2024/05/11 19:16:13,stdout,	/go/pkg/mod/gorm.io/gorm@v1.23.7/gorm.go:395 +0x5e

2024/05/11 19:16:13,stdout,"gorm.io/gorm.(*DB).SetupJoinTable(0x3?, {0xdb2940, 0xc0002b7c70}, {0xe473c3, 0x6}, {0xd40d40, 0xc00020ab40})
"
2024/05/11 19:16:13,stdout,	/go/pkg/mod/gorm.io/gorm@v1.23.7/gorm.go:363 +0x18

2024/05/11 19:16:13,stdout,gorm.io/gorm.(*DB).getInstance(0x300000002?)

2024/05/11 19:16:13,stdout,goroutine 1 [running]:

2024/05/11 19:16:13,stdout,

2024/05/11 19:16:13,stdout,[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x7d8678]

2024/05/11 19:16:13,stdout,panic: runtime error: invalid memory address or nil pointer dereference

2024/05/11 19:16:08,stdout,"2024/05/11 17:16:08 WARN: Could not ping database: Environment variable PHOTOVIEW_MYSQL_URL missing, exiting. Will retry after 5 seconds
"
2024/05/11 19:16:03,stdout,"2024/05/11 17:16:03 WARN: Could not ping database: Environment variable PHOTOVIEW_MYSQL_URL missing, exiting. Will retry after 5 seconds
"
2024/05/11 19:15:58,stdout,"2024/05/11 17:15:58 WARN: Could not ping database: Environment variable PHOTOVIEW_MYSQL_URL missing, exiting. Will retry after 5 seconds
"
2024/05/11 19:15:53,stdout,"2024/05/11 17:15:53 WARN: Could not ping database: Environment variable PHOTOVIEW_MYSQL_URL missing, exiting. Will retry after 5 seconds
"
2024/05/11 19:15:48,stdout,"2024/05/11 17:15:48 WARN: Could not ping database: Environment variable PHOTOVIEW_MYSQL_URL missing, exiting. Will retry after 5 seconds
"
2024/05/11 19:15:48,stdout,2024/05/11 17:15:48 No .env file found

2024/05/11 19:15:48,stdout,2024/05/11 17:15:48 Starting Photoview...

@UsefulVid UsefulVid added the bug Something isn't working label May 11, 2024
@kkovaletp
Copy link
Contributor

@UsefulVid, it looks like the Photoview container doesn't have access to the DB. I guess that this is one of many issues, existing in the current docker-compose config from the master branch. Please try the config from my PR #863, where I fixed many previously detected issues.
Please let me know if that helps or not.

@kkovaletp kkovaletp added docker Related to deployment with Docker pending response A issue or PR which is waiting for clarifications from OP labels May 11, 2024
@UsefulVid
Copy link
Author

image
My Container Station is not happy with the github url. Which URL should I use?

@kkovaletp
Copy link
Contributor

@UsefulVid, you need to open that URL in your browser and read the changes in Readme file, then follow the instructions for the docker deployment and download the .env and docker-compose examples from this branch and edit them as described

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docker Related to deployment with Docker pending response A issue or PR which is waiting for clarifications from OP
Projects
None yet
Development

No branches or pull requests

2 participants