-
Notifications
You must be signed in to change notification settings - Fork 6
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
Error in JS Webpage #4
Comments
The only difference to the setup guide is i put the local NAS IP plus Port instead of quickconnect adress, as i dont use quickconnect. My NAS IP inserted as follows: 192.168.0.2:5000 (no https) |
I just figured out using port 5001 fixed the Problem. Now it works like a charm. |
I just found out that the links generated with https and no certificate set don't open in all browsers, and if so, only with the standard error message of untrusted certificate. To summarize: Right now: Docker env has to be set to NAS:5001 (iso 5000) Suggestion: Thank you very much once again for this project ;) |
Hi @grandmastermarco , thank you for all the feedbacks! Can you try to set NAS_IP without port? I have the same environment as yours and it works for me. Specify the port is not required since you set “photo” alias. About the other problem, I don't know how to solve it. If you don’t have a ssl or quickconnect, then the first time you open the webpage on any browser, you have to follow a link and ‘accept the risk’. The only thing I can think of is to specify this 'action to do' in the README, so that it seems like expected behavior. Anyway can you elaborate in which browser the webpage fails to open? |
This is exactly the issue. I am using Chrome / chromium right now, but I am 99% Sure this will be an issue on all Browsers. I will not use quickconnect for safety reasons (using a vpn for outside access). Would it be a lot of coding work to implement the suggested SSL / HTTPS environment variable? Thanks for feedback! |
I have the same error. But I cannot fix it by setting IP with 5001. Even Quickconnect URL does not work. I checked the API URLs. They do work. What could be the problem here? |
@marvin78 So you have quickconnect enabled on your nas? Can you share a screenshot of your settings in container manager? (hiding any sensitive info) |
So I changed network to host, changed the port and to FotoTeam in index.js and it works so far. The interesting fact is, that firewall cannot be the reason why it does not work in bridge mode. Even if I switch it of, it does not work. wget out of the console of the container cannot connect to the NAS-IP in bridge mode either. But no fotos are found (I take at least one foto every day). Not in month, day or week mode. I debugged it a little bit and I can see that the json return has fotos in it but after filtering for day, week or month there is nothing left. Any idea? Edit: I changed the following function and get a result (all photos):
I thinkt the filter(s) could be wrong. Second edit: I think it's a problem with the pure count of fotos. The fotos in stock are too old because the api does not return all of them. I think there should be a filter in the original request: https://${ip}/photo/webapi/entry.cgi?api=SYNO.FotoTeam.Browse.Item&version=1&method=list&type=photo&offset=0&limit=5000&_sid="${sid}"&additional=["thumbnail","resolution"] The limit is 5000. But it does not get the newest fotos in this limit. |
@marvin78 Interesting. I'll look into this tonight if I get some time. Is the email working properly if you click on the individual photo urls? |
I know what the problem is. I debugged it a lot. The problem is: The limit is 5000. I have much more Fotos in one year than 5000. So I never can get fotos from a year ago (and this is meant with memories or am I wrong there?). If I try to get more than 5000, I get errors from the API. So I think the real limit in the API is 5000. What I don't know is: Can we pre-filter in the API-request? Something like [...]&from_date=[year-1]-m-d&to_date= What photo URLs? I do not get fotos. The log says: "No photos to send." |
@marvin78 That makes sense! Thanks for bringing that up. I only have about 2k photos total, so I wasn't sure what would happen with more than 5k. I created a new branch with pagination added to the request, so it should work. Though I'm not entirely sure how it'll handle with a huge number. If you get some time, will you try pulling |
Thanks. If I alter the code and set Foto to FotoTeam than it works with this branch. It would be nice if that could be done over ENV or settings. This tool is great. One thing would be nice for the future: If it is possible (I did not look that far) to build Shared Albums over the API than this tool could build this Album with the selected fotos (name it October 2022 or Week 40 2022 or something like that and share it with users, set in the ENV or settings) to send and only send the link to this album. Than one would not need to click every single foto. :) EDIT: Alternative always could be to send the link to the webpage of this tool |
@marvin78 Great! Glad it's working now. I'll get that pushed to the latest image. Are you saying you're having to go into const photosResponse = await fetch(
`https://${ip}/photo/webapi/entry.cgi?api=SYNO.Foto.Browse.Item&version=1&method=list&type=photo&offset=${offset}&limit=${limit}&_sid=${sid}&additional=["thumbnail","resolution"]`
); I'm guessing that would just be because of what space your photos are in, but that shouldn't be hard to make optional in the settings. If that's the case, are you also changing it in the thumbnail request? I'm assuming not since it for the individual thumbnail - just want to make sure. function getThumbnailUrl(ip, sid, photo) {
const {
id,
additional: {
thumbnail: { cache_key }
}
} = photo
return `https://${ip}/photo/webapi/entry.cgi?api=SYNO.Foto.Thumbnail&version=1&method=get&mode=download&id=${id == cache_key.split('_')[0] ? id : cache_key.split('_')[0]}&type=unit&size=xl&cache_key=${cache_key}&_sid=${sid}`
} |
I changed It everywhere. I do not have fotos jn personal space. |
@marvin78 I just pushed an update to the |
I will try that at the earliest time possible. Thank you. |
Works fine. Thank you again |
Hi. I just installed your great docker project according to your guide in readme on my synology.
Trying to access the newly built in Webpage, i get the following error...
Any idea where this comes from or how to fis this?
Thanks in advance
The text was updated successfully, but these errors were encountered: