ownphotos
ownphotos copied to clipboard
Cannot read property 'status' of undefined
When attempting to login with latest build, receive the following:
Chrome: "Cannot read property 'status' of undefined" Firefox: "e.response is undefined" IE: "Unable to get property 'status' of undefined or null reference"
Login does not complete
Do you mean the latest build being hooram/ownphotos:dev
? I wouldn't recommend running that because it might not have all the necessary changes reflected. Either way, I pushed some changes that should fix the problem. See 60eaae8027bd5af4fc7e107b76a39a13c78f4897.
FYI, tried both main and the latest dev (with your proposed patch), I still see same issue.
Also narrowed down not Nginx config - bypassed it and connecting port directly (8001), still see the auth problem
Sorry about that, it's working for me with a fresh database container. Are you using the same database container that you used for another ownphotos container? The run script doesn't really handle migrations with an existing DB, so you will probably have to nuke the previous one.
FYI, the following works for me: (point the browser to localhost:8001)
docker kill ownphotos-db
docker rm ownphotos-db
docker kill ownphotos-redis
docker rm ownphotos-redis
docker kill ownphotos
docker rm ownphotos
docker run \
--name ownphotos-db \
-e POSTGRES_PASSWORD=CHANGEME \
-e POSTGRES_DB=ownphotos \
-d postgres
docker run \
--name ownphotos-redis \
-d redis
docker run \
-v /host/path/to/photos:/data \
-v /host/path/to/media:/code/media \
--link ownphotos-db:ownphotos-db \
--link ownphotos-redis:ownphotos-redis \
-e SECRET_KEY=CHANGEME \
-e ADMIN_EMAIL=CHANGEME \
-e ADMIN_USERNAME=admin \
-e ADMIN_PASSWORD=CHANGEME \
-e DEBUG=false \
-e DB_BACKEND=postgresql \
-e DB_NAME=ownphotos \
-e DB_USER=postgres \
-e DB_PASS=CHANGEME \
-e DB_HOST=ownphotos-db \
-e DB_PORT=5432 \
-e REDIS_HOST=ownphotos-redis \
-e REDIS_PORT=6379 \
-e MAPBOX_API_KEY=CHANGEME \
-e BACKEND_HOST=localhost:8000 \
-p 8000:80 \
-p 8001:3000 \
--name ownphotos \
hooram/ownphotos:dev
It is fixed for me now.
I appreciate you sharing time. I have followed your instructions, problem still exists.
I next started with a fresh new VM/docker and applied latest dev against it (in case I was still missing something) with your exact instructions above, still seeing same issue.
I have also started with DEBUG=true to try and capture anything from console, nothing being reported on-screen. Is there an embedded log I can parse out to try and get better details on the error?
@gonzarthegreat are you running it in HTTPS by chance?
Getting the exact same error. Tried both readme instructions and what’s mentioned above here. Both gives me the error on a brand new server running docker on Ubuntu.
As previously mentioned, connecting straight to the port (versus through Nginx proxy where may or may not do HTTPs) still shows error.
Issue exists on both Ubuntu 17 & 16 docker base.
What base Linux are you running where this is successful?
I think that JS is doing a request to the wrong url, because the url that's requesting (http://localhost/api/auth/token/obtain/) doesn't point to anything, while the correct url is http://localhost:8000/api/auth/token/obtain/ which points to API.
im running into the same issue right now. just setup a brand new postgres, redis and ownphotos dockers
You're right, it's a problem of port.
If you change the backend docker run call to listen on port 80 instead of 8000 (by using -p 80:80), then it work. If you have an nginx instance, redirecting port 80 to port 8000 like in the instruction, then it also does work. What the instruction miss to say, is that you need this redirection, otherwise it doesn't work.
But for now, if you don't have any other service listening on port 80, you can simply use the port 80 instead of 8000.
I just had this problem. For information, ownphotos doesn't support https on the backend. So you need to remove the http -> https redirection and it works. (just insecurely)
I have tried to get this to work every which way - using the .yaml above, using the exact lines from hooram's post above - but i always get exactly the same thing - "Cannot read property 'status' of undefined" Really wanted to get this running...
I have the same problem. Any updates? Anyone able to resolve this issue or have working installation guide. I have done numerous install on Ubuntu 16.04 and with all suggestion above but still getting the same error.
I solved it here. The issue is that you should not install from master (yet). Last week the updated docker has been merged and I suggest you use that. This error tends to appear if the frontend can't connect to the backed, if there is CORS problems and more. Using the docker deployment solves all this. Please follow this: https://github.com/hooram/ownphotos-frontend/issues/8#issuecomment-447003146
I suggest you try these two lines and try and deploy that way, confirmed its fixes and we can close this.