-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
500 Unexpected token < in JSON at position 0 SyntaxError: Unexpected token < in JSON at position 0 #170
Comments
Hello, did you specify |
Additionally, did you include the |
I did include the .env file. I haven’t added that as extra some where. Where should I put that link? |
So you have the key
Can you capture the console and network tab in the browser dev tool (F12) for me when you access the web page. |
The vite server address is correct, I set the same port as in the example text. The Ngnix page is reachable. But when changing port to access setup I get the message. I will get you the info |
Can you pull the new image and test it? I did a few bugs fixed and performance optimization earlier this morning. From the docker directory, run docker-compose pull immich-web && docker-compose pull immich-server |
Hi! Updated with same results. from console |
rror with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'. Updated with same results. IP changed to x.xx but is correct. |
hmm interesting, let's isolate the issue of the setup! Can you let me know what do you see when you enter |
same error here if i access http://your-ip:2283/server-info/ping i got {"res":"pong"} |
|
@spupuz I believe you are also running Immich using Portainer, correct? Can you help me spin up a completely new Immich instance/stack and check if you are still encountering the same issue? |
i can try.
Il giorno lun 23 mag 2022 alle ore 14:46 Alex ***@***.***> ha
scritto:
… @spupuz <https://github.com/spupuz> I believe you are also running Immich
using Portainer, correct? Can you help me spin up a completely new Immich
instance/stack and check if you are still encountering the same issue?
—
Reply to this email directly, view it on GitHub
<#170 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANELQALSOQEHBPWR5XS5MLVLN4YNANCNFSM5WSRMT3Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
database name is hardcoded for this reason can't spin up a double istance from scratch, i just have just one server :) |
Ah. Can you spin up a new instance that is not in Portainer? I have a feeling this is an issue that related to the server is not updated to the newest version, so the front end is looking for things that the server doesn't have yet. Can you remove the server docker |
Can you help me check this endpoint? |
i can try |
http://192.168.1.112:2283/server-info/version {"major":1,"minor":10,"patch":0,"build":14} |
hmm, this is the correct response. I will dig into this. |
With latest docker version server works but since I already have a user can create an admin user, how can I do? |
@spupuz After you log in on the web, if you have more than one account on the server, it will ask which account should be made admin. Otherwise, if you have only one account, it will make that account into the admin account :) |
Cool, just one point web interface does not adapt to browser in phone. |
@spupuz Understand, as it is not a priority right now, since you have a mobile app already to view/interact with the backup assets. |
Yah I know don't worry I'll put ideas and optmiziation as I see them, proud of being a test this is becoming a real piece of diamond |
@spupuz No problem, thank you for doing this. I just want to confirm that you can now access the web interface, correct? |
Yes I can will test it wider tomorrow with laptop |
I also have the same error, but I think caused by a different problem, since if I start docker-compose up without daemon option in the console I see this: `immich-web_1 | FetchError: request to https://192.168.3.2:2285/192.168.3.2:2283/user/count failed, reason: write EPROTO 140497463036720:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:331: ` |
i suppose on the latest docker version there was a regression `.svelte-kit/output/server/entries/fallbacks/error.svelte.js 0.72 KiB Run npm run preview to preview your production build locally.
vite v2.9.8 building for production... Run npm run preview to preview your production build locally.
|
This is my compose stack but I'm not able to get it works always
THE env file instead is this one
Why should VITE_SERVER_ENDPOINT point to port 2283 if it is not present in the compose? In any cane here the log IMMICH SERVER
Here IMMICH WEB
|
@mada199122 The reason you cannot access is that you removed the Nginx container. The server is served via Nginx via port 2283 which is mapped to port 80 of the Nginx container. |
I've VITE_SERVER_ENDPOINT=http://10.1.11.50:2283/, I get the following error
I'm able to access the below endpoints |
@badlandspray Are you using your own reverse proxy setup? Can you try to fix the After fixing that, can you access |
Ok thank you.
And now I have this error:
The log of the web container and the server container are exactly the same as the attached one of my previous post. But now I'm able to get this The log NGINX is the following one
|
@mada199122 there is the configuration file of Nginx in the 'docker' folder of the repo that you have to include in your setup. |
@alextran1502 Now, I'm able to access the
Console errors
|
@badlandspray is this from your access through the local IP or from the public domain that is proxied to the private IP? |
Local IP. I'm using caddy. I've tried setting |
@badlandspray If you start fresh from the beginning and follow the readme file, do you have any problems? |
Yes of course I've already put that file in the mount volume of nginx container But It seams from the log that nginx container is asking for a default configuration file from this line of the log
|
@mada199122 This is the location that the Nginx container is looking for the config file If you look at the I am not sure which tool you use to run the application so I don't have more information to fully provide support. |
But in docker compose the left path should be whatever I want in my host machine that it will be translated by docker to the path at the right side inside the container. Now I've modified the compose to include the two folder as suggeste but nothing has changed:(
|
@mada199122 I am not sure if you have uploaded the correct image but it seems to not the correct path you showed in the docker-compose file |
@mada199122 Let's try two things
|
tried both but nothing... always the same error.. |
@mada199122 Can you post your |
Yes I've removed completely all the container and re-created This is my actual compose
|
@mada199122 Before changing the content of the docker-compose, if you keep the same content and follow the direction in the readme file, with placing the |
sorry I my previous post I copied the wrong NGINX compose, now I correct... nginx.conf is in the correct location mapped in docker compose...
Could you explain me what is causing this of this error please?
So I can try to understand better what is wrong. from my limited point of view it seams that immich-web is not able to talk to nginx if it speaks to nginx or to the server... In immich-web log I see this
|
I get 404 Not Found, before i tried i ran "docker-compose pull immich-web && docker-compose pull immich-server" again. I can read the http://192.168.x.xx:2285/auth/login page but the http://192.168.x.xx:2285 page still throws the same error |
@wavesswe Can you try to clear the |
I am not sure why you are seeing that either, have you tried clearing the session in the cookie of the browser dev tool? |
Finally I got it working... I have two clues... this is my nginx compose now
In the code of the container immich-web, have you hardcoded the address of the nginx container by its name of the container? The second clue is that the last days I was using Safari browser during all the attempts, today accidentally I've tried to access immich-web with Firefox... |
@mada199122 I am glad it is working now for you. Perhaps you didn't shut down the container before when you perform the |
Closing this issue as this is mostly a configuration problem from the user's side and it has expanded into an issue with scattered information about a different topic. Please visit the Discord channel for additional help https://discord.gg/rxnyVTXGbM |
it works.
Il giorno lun 23 mag 2022 alle ore 15:58 Alex ***@***.***> ha
scritto:
… Can you help me check this endpoint?
http://your-ip:2283/server-info/version
—
Reply to this email directly, view it on GitHub
<#170 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANELQFTIZTRVZ6XNFORM63VLOFHBANCNFSM5WSRMT3Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Running the docker compose thru Portainer, everyting starts up, I can see that ngnix is running at http://xxxx.xxx.xx.xx:2283/
But get the following issue when trying to access : http://xxxx.xxx.xx.xx:2285/
500
Unexpected token < in JSON at position 0
SyntaxError: Unexpected token < in JSON at position 0
in the logs from the web container
SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse ()
at Proxy. (file:///usr/src/app/build/server/index.js:1586:29)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async load (file:///usr/src/app/build/server/entries/pages/index.svelte.js:6:25)
at async load_node (file:///usr/src/app/build/server/index.js:1605:14)
at async respond$1 (file:///usr/src/app/build/server/index.js:1844:20)
at async resolve (file:///usr/src/app/build/server/index.js:2182:105)
at async Object.handle (file:///usr/src/app/build/server/chunks/hooks-35f923f5.js:7:12)
at async respond (file:///usr/src/app/build/server/index.js:2139:22)
at async Array.ssr (file:///usr/src/app/build/handler-edaaddc2.js:841:3)
Additional context
Is it me that are doing something wrong here or is it broken?
The text was updated successfully, but these errors were encountered: