# Astro mosaic json file

**URL:** <https://forums.ruuth.xyz/t/astro-mosaic-json-file/109>\
**Category:** Uncategorized\
**Created:** [March 4, 2022, 9:46am UTC](https://forums.ruuth.xyz/t/astro-mosaic-json-file/109 "2022-03-04T09:46:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![legnol](https://forums.ruuth.xyz/letter_avatar_proxy/v4/letter/l/ba9def/32.png) [@legnol](https://forums.ruuth.xyz/u/legnol)\
**Post date:** [March 4, 2022, 9:46am UTC](https://forums.ruuth.xyz/t/astro-mosaic-json-file/109/1 "2022-03-04T09:46:59Z")

</div>

Hi  
i try to use the function to send a json file to configure my own telescope with your nice tools  
i copy our json file in the help page of website to try. i put it on a https site , [https://www.astrophotozone.com/am\_test\_service.json](https://www.astrophotozone.com/am_test_service.json)  
and i call your function :  
[Astro Mosaic Telescope Planner](https://ruuth.xyz/AstroMosaic.html?services_json=http://www.astrophotozone.com/am_test_service.json)

but i ve got an error , unable to fetch the json  
Problem accessing service [http://www.astrophotozone.com/am\_test\_service.json](http://www.astrophotozone.com/am_test_service.json). Fetch Error :  
the file is avaible on the net , i dont understant why it does work

can you help me ?  
thanks

---

<div class="post-metadata">

**Author:** ![jarmor](https://forums.ruuth.xyz/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@jarmor](https://forums.ruuth.xyz/u/jarmor)\
**Post date:** [March 4, 2022, 5:46pm UTC](https://forums.ruuth.xyz/t/astro-mosaic-json-file/109/2 "2022-03-04T17:46:57Z")

</div>

Hi,

This is an area I am not fully familiar with although I have hit the same problem many times. In my test with Url:

`https://ruuth.xyz/AstroMosaic.html?services_json=https://www.astrophotozone.com/am_test_service.json`

I get an error:

“Access to fetch at ‘[https://www.astrophotozone.com/am\_test\_service.json](https://www.astrophotozone.com/am_test_service.json)’ from origin ‘[https://ruuth.xyz](https://ruuth.xyz)’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.”

My understanding is that you need to set on your web server a setting as

Access-Control-Allow-Origin: \*

or

Access-Control-Allow-Origin: [https://ruuth.xyz](https://ruuth.xyz)

Otherwise browsers will block cross origin requests.

There are two solutions I can see:

1. Your server [https://www.astrophotozone.com](https://www.astrophotozone.com) should allow cross origin requests as described above. I changed setting on Access-Control-Allow-Origin setting to \* on my own site and it solved the problem when I got a similar error.
2. Copy AstroMosaic.html to your site and run it from there. Then you do not get automatic fix updates but avoid changing site settings.

It is also possible to set a browser extension that allows cross origin requests. But it is not a generic solution.

Here is a web site that explains the case quite well:

[https://medium.com/@dtkatz/3-ways-to-fix-the-cors-error-and-how-access-control-allow-origin-works-d97d55946d9](https://medium.com/@dtkatz/3-ways-to-fix-the-cors-error-and-how-access-control-allow-origin-works-d97d55946d9)

Jarmo

---

<div class="post-metadata">

**Author:** ![legnol](https://forums.ruuth.xyz/letter_avatar_proxy/v4/letter/l/ba9def/32.png) [@legnol](https://forums.ruuth.xyz/u/legnol)\
**Post date:** [March 4, 2022, 7:42pm UTC](https://forums.ruuth.xyz/t/astro-mosaic-json-file/109/3 "2022-03-04T19:42:24Z")

</div>

Thanks. I m going to check this. I m not a website dev , if I install astromsaic.htlm , I don’t have to put the JavaScript ?

---

<div class="post-metadata">

**Author:** ![jarmor](https://forums.ruuth.xyz/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@jarmor](https://forums.ruuth.xyz/u/jarmor)\
**Post date:** [March 5, 2022, 9:30am UTC](https://forums.ruuth.xyz/t/astro-mosaic-json-file/109/4 "2022-03-05T09:30:05Z")

</div>

I just tested and yes, you need to the the .js file too.

Maybe the easiest way is to go to [https://github.com/jarmoruuth/AstroMosaic/releases](https://github.com/jarmoruuth/AstroMosaic/releases), download the source code zip file and unzip all files to your destination folder. Then it is easy to update to the latest version if needed.

Jarmo

---

<div class="post-metadata">

**Author:** ![legnol](https://forums.ruuth.xyz/letter_avatar_proxy/v4/letter/l/ba9def/32.png) [@legnol](https://forums.ruuth.xyz/u/legnol)\
**Post date:** [March 14, 2022, 9:06am UTC](https://forums.ruuth.xyz/t/astro-mosaic-json-file/109/5 "2022-03-14T09:06:57Z")

</div>

Hi  
i ve test it this weekend , it works nice when i put the two file on my website .  
so i can make a link on a google sheet for my target list. Thanks for your work !

just a question , is your api able to catch only the rise , set and transit time of an object ?

---

<div class="post-metadata">

**Author:** ![jarmor](https://forums.ruuth.xyz/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@jarmor](https://forums.ruuth.xyz/u/jarmor)\
**Post date:** [March 14, 2022, 11:33am UTC](https://forums.ruuth.xyz/t/astro-mosaic-json-file/109/6 "2022-03-14T11:33:24Z")

</div>

Hi,

Nice to hear that you got it working.

My tool can show rise, set, transit and altitude of an object. Is there something else that would be useful to show?

Jarmo
